all: autogenerated update (2018-12-12)
Add:
- cloudbuild/v1alpha1
- content/v2.1
- iap/v1
Update:
- adexchangebuyer2/v2beta1
- alertcenter/v1beta1
- bigquery/v2
- cloudasset/v1beta1
- cloudkms/v1
- cloudsearch/v1
- compute/v0.alpha
- compute/v0.beta
- compute/v1
- container/v1beta1
- content/v2
- dataflow/v1b3
- dataproc/v1
- dataproc/v1beta2
- deploymentmanager/v0.alpha
- deploymentmanager/v2
- deploymentmanager/v2beta
- dialogflow/v2
- dlp/v2
- firestore/v1
- gmail/v1
- iap/v1beta1
- monitoring/v3
- runtimeconfig/v1beta1
- serviceconsumermanagement/v1
- servicenetworking/v1beta
- serviceusage/v1
- serviceusage/v1beta1
- speech/v1
- speech/v1p1beta1
- streetviewpublish/v1
- texttospeech/v1beta1
- vision/v1
diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json
index f6c063a..153fc2d 100644
--- a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json
+++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json
@@ -2521,7 +2521,7 @@
}
}
},
- "revision": "20181127",
+ "revision": "20181210",
"rootUrl": "https://adexchangebuyer.googleapis.com/",
"schemas": {
"AbsoluteDateRange": {
@@ -2967,7 +2967,7 @@
"type": "object"
},
"Creative": {
- "description": "A creative and its classification data.\n\nNext ID: 38",
+ "description": "A creative and its classification data.\n\nNext ID: 39",
"id": "Creative",
"properties": {
"accountId": {
diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go
index 185ae3a..f553968 100644
--- a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go
+++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go
@@ -1307,7 +1307,7 @@
// Creative: A creative and its classification data.
//
-// Next ID: 38
+// Next ID: 39
type Creative struct {
// AccountId: The account that this creative belongs to.
// Can be used to filter the response of the
diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json
index e13df0a..ea5a903 100644
--- a/alertcenter/v1beta1/alertcenter-api.json
+++ b/alertcenter/v1beta1/alertcenter-api.json
@@ -1,4 +1,13 @@
{
+ "auth": {
+ "oauth2": {
+ "scopes": {
+ "https://www.googleapis.com/auth/apps.alerts": {
+ "description": "See and delete your domain's G Suite alerts, and send alert feedback"
+ }
+ }
+ }
+ },
"basePath": "",
"baseUrl": "https://alertcenter.googleapis.com/",
"batchPath": "batch",
@@ -121,7 +130,10 @@
"path": "v1beta1/alerts/{alertId}",
"response": {
"$ref": "Empty"
- }
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/apps.alerts"
+ ]
},
"get": {
"description": "Gets the specified alert.",
@@ -147,7 +159,10 @@
"path": "v1beta1/alerts/{alertId}",
"response": {
"$ref": "Alert"
- }
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/apps.alerts"
+ ]
},
"list": {
"description": "Lists the alerts.",
@@ -186,7 +201,37 @@
"path": "v1beta1/alerts",
"response": {
"$ref": "ListAlertsResponse"
- }
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/apps.alerts"
+ ]
+ },
+ "undelete": {
+ "description": "Restores, or \"undeletes\", an alert that was marked for deletion within the\npast 30 days. Attempting to undelete an alert which was marked for deletion\nover 30 days ago (which has been removed from the Alert Center database) or\na nonexistent alert returns a `NOT_FOUND` error. Attempting to\nundelete an alert which has not been marked for deletion has no effect.",
+ "flatPath": "v1beta1/alerts/{alertId}:undelete",
+ "httpMethod": "POST",
+ "id": "alertcenter.alerts.undelete",
+ "parameterOrder": [
+ "alertId"
+ ],
+ "parameters": {
+ "alertId": {
+ "description": "Required. The identifier of the alert to undelete.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1beta1/alerts/{alertId}:undelete",
+ "request": {
+ "$ref": "UndeleteAlertRequest"
+ },
+ "response": {
+ "$ref": "Alert"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/apps.alerts"
+ ]
}
},
"resources": {
@@ -219,7 +264,10 @@
},
"response": {
"$ref": "AlertFeedback"
- }
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/apps.alerts"
+ ]
},
"list": {
"description": "Lists all the feedback for an alert.",
@@ -250,14 +298,17 @@
"path": "v1beta1/alerts/{alertId}/feedback",
"response": {
"$ref": "ListAlertFeedbackResponse"
- }
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/apps.alerts"
+ ]
}
}
}
}
}
},
- "revision": "20181121",
+ "revision": "20181207",
"rootUrl": "https://alertcenter.googleapis.com/",
"schemas": {
"AccountWarning": {
@@ -781,6 +832,17 @@
}
},
"type": "object"
+ },
+ "UndeleteAlertRequest": {
+ "description": "A request to undelete a specific alert that was marked for deletion.",
+ "id": "UndeleteAlertRequest",
+ "properties": {
+ "customerId": {
+ "description": "Optional. The unique identifier of the G Suite organization account of the\ncustomer the alert is associated with.\nInferred from the caller identity if not provided.",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
},
"servicePath": "",
diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go
index 1c3b85d..23b9ff9 100644
--- a/alertcenter/v1beta1/alertcenter-gen.go
+++ b/alertcenter/v1beta1/alertcenter-gen.go
@@ -50,6 +50,12 @@
const apiVersion = "v1beta1"
const basePath = "https://alertcenter.googleapis.com/"
+// OAuth2 scopes used by this API.
+const (
+ // See and delete your domain's G Suite alerts, and send alert feedback
+ AppsAlertsScope = "https://www.googleapis.com/auth/apps.alerts"
+)
+
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
@@ -1015,6 +1021,38 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// UndeleteAlertRequest: A request to undelete a specific alert that was
+// marked for deletion.
+type UndeleteAlertRequest struct {
+ // CustomerId: Optional. The unique identifier of the G Suite
+ // organization account of the
+ // customer the alert is associated with.
+ // Inferred from the caller identity if not provided.
+ CustomerId string `json:"customerId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CustomerId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CustomerId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *UndeleteAlertRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod UndeleteAlertRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// method id "alertcenter.alerts.delete":
type AlertsDeleteCall struct {
@@ -1156,7 +1194,10 @@
// "path": "v1beta1/alerts/{alertId}",
// "response": {
// "$ref": "Empty"
- // }
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/apps.alerts"
+ // ]
// }
}
@@ -1309,7 +1350,10 @@
// "path": "v1beta1/alerts/{alertId}",
// "response": {
// "$ref": "Alert"
- // }
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/apps.alerts"
+ // ]
// }
}
@@ -1514,7 +1558,10 @@
// "path": "v1beta1/alerts",
// "response": {
// "$ref": "ListAlertsResponse"
- // }
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/apps.alerts"
+ // ]
// }
}
@@ -1540,6 +1587,153 @@
}
}
+// method id "alertcenter.alerts.undelete":
+
+type AlertsUndeleteCall struct {
+ s *Service
+ alertId string
+ undeletealertrequest *UndeleteAlertRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Undelete: Restores, or "undeletes", an alert that was marked for
+// deletion within the
+// past 30 days. Attempting to undelete an alert which was marked for
+// deletion
+// over 30 days ago (which has been removed from the Alert Center
+// database) or
+// a nonexistent alert returns a `NOT_FOUND` error. Attempting
+// to
+// undelete an alert which has not been marked for deletion has no
+// effect.
+func (r *AlertsService) Undelete(alertId string, undeletealertrequest *UndeleteAlertRequest) *AlertsUndeleteCall {
+ c := &AlertsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.alertId = alertId
+ c.undeletealertrequest = undeletealertrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AlertsUndeleteCall) Fields(s ...googleapi.Field) *AlertsUndeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AlertsUndeleteCall) Context(ctx context.Context) *AlertsUndeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AlertsUndeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AlertsUndeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletealertrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/alerts/{alertId}:undelete")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "alertId": c.alertId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "alertcenter.alerts.undelete" call.
+// Exactly one of *Alert or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Alert.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *AlertsUndeleteCall) Do(opts ...googleapi.CallOption) (*Alert, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Alert{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Restores, or \"undeletes\", an alert that was marked for deletion within the\npast 30 days. Attempting to undelete an alert which was marked for deletion\nover 30 days ago (which has been removed from the Alert Center database) or\na nonexistent alert returns a `NOT_FOUND` error. Attempting to\nundelete an alert which has not been marked for deletion has no effect.",
+ // "flatPath": "v1beta1/alerts/{alertId}:undelete",
+ // "httpMethod": "POST",
+ // "id": "alertcenter.alerts.undelete",
+ // "parameterOrder": [
+ // "alertId"
+ // ],
+ // "parameters": {
+ // "alertId": {
+ // "description": "Required. The identifier of the alert to undelete.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1beta1/alerts/{alertId}:undelete",
+ // "request": {
+ // "$ref": "UndeleteAlertRequest"
+ // },
+ // "response": {
+ // "$ref": "Alert"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/apps.alerts"
+ // ]
+ // }
+
+}
+
// method id "alertcenter.alerts.feedback.create":
type AlertsFeedbackCreateCall struct {
@@ -1684,7 +1878,10 @@
// },
// "response": {
// "$ref": "AlertFeedback"
- // }
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/apps.alerts"
+ // ]
// }
}
@@ -1856,7 +2053,10 @@
// "path": "v1beta1/alerts/{alertId}/feedback",
// "response": {
// "$ref": "ListAlertFeedbackResponse"
- // }
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/apps.alerts"
+ // ]
// }
}
diff --git a/api-list.json b/api-list.json
index 646fe61..9ed8f2a 100644
--- a/api-list.json
+++ b/api-list.json
@@ -1131,6 +1131,22 @@
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
},
"documentationLink": "https://developers.google.com/shopping-content",
+ "preferred": false
+ },
+ {
+ "kind": "discovery#directoryItem",
+ "id": "content:v2.1",
+ "name": "content",
+ "version": "v2.1",
+ "title": "Content API for Shopping",
+ "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.",
+ "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/content/v2.1/rest",
+ "discoveryLink": "./apis/content/v2.1/rest",
+ "icons": {
+ "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
+ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
+ },
+ "documentationLink": "https://developers.google.com/shopping-content",
"preferred": true
},
{
diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json
index 0547369..ec32ac0 100644
--- a/bigquery/v2/bigquery-api.json
+++ b/bigquery/v2/bigquery-api.json
@@ -32,7 +32,7 @@
"description": "A data platform for customers to create, manage, share and query data.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/bigquery/",
- "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/iR9vcxX0WBCms4jkbIj3mFOSrj4\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/3Jagobv31vWqlbqTQmqlK0yJxxs\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/search-16.gif",
"x32": "https://www.google.com/images/icons/product/search-32.gif"
@@ -317,7 +317,7 @@
"type": "string"
},
"location": {
- "description": "[Experimental] The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.",
+ "description": "The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.",
"location": "query",
"type": "string"
},
@@ -353,7 +353,7 @@
"type": "string"
},
"location": {
- "description": "[Experimental] The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.",
+ "description": "The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.",
"location": "query",
"type": "string"
},
@@ -390,7 +390,7 @@
"type": "string"
},
"location": {
- "description": "[Experimental] The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.",
+ "description": "The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.",
"location": "query",
"type": "string"
},
@@ -998,7 +998,7 @@
}
}
},
- "revision": "20181105",
+ "revision": "20181202",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"BigQueryModelTraining": {
@@ -1232,7 +1232,7 @@
"type": "string"
},
"location": {
- "description": "The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/dataset-locations.",
+ "description": "The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.",
"type": "string"
},
"selfLink": {
@@ -1274,7 +1274,7 @@
"type": "object"
},
"location": {
- "description": "[Experimental] The geographic location where the data resides.",
+ "description": "The geographic location where the data resides.",
"type": "string"
}
},
@@ -1672,7 +1672,7 @@
"id": "GoogleSheetsOptions",
"properties": {
"range": {
- "description": "[Beta] [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: !:",
+ "description": "[Beta] [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20",
"type": "string"
},
"skipLeadingRows": {
@@ -1923,7 +1923,7 @@
},
"rangePartitioning": {
"$ref": "RangePartitioning",
- "description": "[Experimental] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
+ "description": "[TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
},
"schema": {
"$ref": "TableSchema",
@@ -2044,7 +2044,7 @@
},
"rangePartitioning": {
"$ref": "RangePartitioning",
- "description": "[Experimental] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
+ "description": "[TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
},
"schemaUpdateOptions": {
"description": "Allows the schema of the destination table to be updated as a side effect of the query job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.",
@@ -2365,6 +2365,10 @@
"format": "int64",
"type": "string"
},
+ "totalBytesProcessedAccuracy": {
+ "description": "[Output-only] For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estiamte is upper bound of what the query would cost.",
+ "type": "string"
+ },
"totalPartitionsProcessed": {
"description": "[Output-only] Total number of partitions processed from all partitioned tables referenced in the job.",
"format": "int64",
@@ -2463,6 +2467,21 @@
"id": "JsonValue",
"type": "any"
},
+ "MaterializedViewDefinition": {
+ "id": "MaterializedViewDefinition",
+ "properties": {
+ "lastRefreshTime": {
+ "description": "[Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.",
+ "format": "int64",
+ "type": "string"
+ },
+ "query": {
+ "description": "[Required] A query whose result is persisted.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"ModelDefinition": {
"id": "ModelDefinition",
"properties": {
@@ -2653,7 +2672,7 @@
"type": "string"
},
"location": {
- "description": "The geographic location where the job should run. Required except for US and EU.",
+ "description": "The geographic location where the job should run. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.",
"type": "string"
},
"maxResults": {
@@ -2798,24 +2817,24 @@
"id": "RangePartitioning",
"properties": {
"field": {
- "description": "[Experimental] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.",
+ "description": "[TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.",
"type": "string"
},
"range": {
- "description": "[Experimental] [Required] Defines the ranges for range partitioning.",
+ "description": "[TrustedTester] [Required] Defines the ranges for range partitioning.",
"properties": {
"end": {
- "description": "[Experimental] [Required] The end of range partitioning, exclusive.",
+ "description": "[TrustedTester] [Required] The end of range partitioning, exclusive.",
"format": "int64",
"type": "string"
},
"interval": {
- "description": "[Experimental] [Required] The width of each interval.",
+ "description": "[TrustedTester] [Required] The width of each interval.",
"format": "int64",
"type": "string"
},
"start": {
- "description": "[Experimental] [Required] The start of range partitioning, inclusive.",
+ "description": "[TrustedTester] [Required] The start of range partitioning, inclusive.",
"format": "int64",
"type": "string"
}
@@ -2851,7 +2870,7 @@
"properties": {
"clustering": {
"$ref": "Clustering",
- "description": "[Experimental] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered."
+ "description": "[Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered."
},
"creationTime": {
"description": "[Output-only] The time when this table was created, in milliseconds since the epoch.",
@@ -2908,6 +2927,10 @@
"description": "[Output-only] The geographic location where the table resides. This value is inherited from the dataset.",
"type": "string"
},
+ "materializedView": {
+ "$ref": "MaterializedViewDefinition",
+ "description": "[Optional] Materialized view definition."
+ },
"model": {
"$ref": "ModelDefinition",
"description": "[Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries."
@@ -2923,7 +2946,7 @@
"type": "string"
},
"numPhysicalBytes": {
- "description": "[Output-only] [Experimental] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.",
+ "description": "[Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.",
"format": "int64",
"type": "string"
},
@@ -2934,11 +2957,11 @@
},
"rangePartitioning": {
"$ref": "RangePartitioning",
- "description": "[Experimental] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
+ "description": "[TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
},
"requirePartitionFilter": {
"default": "false",
- "description": "[Experimental] [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.",
+ "description": "[Beta] [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.",
"type": "boolean"
},
"schema": {
@@ -2962,7 +2985,7 @@
"description": "Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified."
},
"type": {
- "description": "[Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.",
+ "description": "[Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.",
"type": "string"
},
"view": {
@@ -3015,7 +3038,7 @@
"type": "boolean"
},
"templateSuffix": {
- "description": "[Experimental] If specified, treats the destination table as a base template, and inserts the rows into an instance table named \"{destination}{templateSuffix}\". BigQuery will manage creation of the instance table, using the schema of the base template table. See https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables for considerations when working with templates tables.",
+ "description": "If specified, treats the destination table as a base template, and inserts the rows into an instance table named \"{destination}{templateSuffix}\". BigQuery will manage creation of the instance table, using the schema of the base template table. See https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables for considerations when working with templates tables.",
"type": "string"
}
},
diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go
index a2b63d6..9e659e4 100644
--- a/bigquery/v2/bigquery-gen.go
+++ b/bigquery/v2/bigquery-gen.go
@@ -539,7 +539,7 @@
// Location: The geographic location where the dataset should reside.
// The default value is US. See details at
- // https://cloud.google.com/bigquery/docs/dataset-locations.
+ // https://cloud.google.com/bigquery/docs/locations.
Location string `json:"location,omitempty"`
// SelfLink: [Output-only] A URL that can be used to access the resource
@@ -695,8 +695,7 @@
// organize and group your datasets.
Labels map[string]string `json:"labels,omitempty"`
- // Location: [Experimental] The geographic location where the data
- // resides.
+ // Location: The geographic location where the data resides.
Location string `json:"location,omitempty"`
// ForceSendFields is a list of field names (e.g. "DatasetReference") to
@@ -1253,7 +1252,9 @@
type GoogleSheetsOptions struct {
// Range: [Beta] [Optional] Range of a sheet to query from. Only used
- // when non-empty. Typical format: !:
+ // when non-empty. Typical format:
+ // sheet_name!top_left_cell_id:bottom_right_cell_id For example:
+ // sheet1!A1:B20
Range string `json:"range,omitempty"`
// SkipLeadingRows: [Optional] The number of rows at the top of a sheet
@@ -1674,7 +1675,7 @@
// Default: "
Quote *string `json:"quote,omitempty"`
- // RangePartitioning: [Experimental] Range partitioning specification
+ // RangePartitioning: [TrustedTester] Range partitioning specification
// for this table. Only one of timePartitioning and rangePartitioning
// should be specified.
RangePartitioning *RangePartitioning `json:"rangePartitioning,omitempty"`
@@ -1857,7 +1858,7 @@
// QueryParameters: Query parameters for standard SQL queries.
QueryParameters []*QueryParameter `json:"queryParameters,omitempty"`
- // RangePartitioning: [Experimental] Range partitioning specification
+ // RangePartitioning: [TrustedTester] Range partitioning specification
// for this table. Only one of timePartitioning and rangePartitioning
// should be specified.
RangePartitioning *RangePartitioning `json:"rangePartitioning,omitempty"`
@@ -2284,6 +2285,14 @@
// TotalBytesProcessed: [Output-only] Total bytes processed for the job.
TotalBytesProcessed int64 `json:"totalBytesProcessed,omitempty,string"`
+ // TotalBytesProcessedAccuracy: [Output-only] For dry-run jobs,
+ // totalBytesProcessed is an estimate and this field specifies the
+ // accuracy of the estimate. Possible values can be: UNKNOWN: accuracy
+ // of the estimate is unknown. PRECISE: estimate is precise.
+ // LOWER_BOUND: estimate is lower bound of what the query would cost.
+ // UPPER_BOUND: estiamte is upper bound of what the query would cost.
+ TotalBytesProcessedAccuracy string `json:"totalBytesProcessedAccuracy,omitempty"`
+
// TotalPartitionsProcessed: [Output-only] Total number of partitions
// processed from all partitioned tables referenced in the job.
TotalPartitionsProcessed int64 `json:"totalPartitionsProcessed,omitempty,string"`
@@ -2468,6 +2477,38 @@
type JsonValue interface{}
+type MaterializedViewDefinition struct {
+ // LastRefreshTime: [Output-only] [TrustedTester] The time when this
+ // materialized view was last modified, in milliseconds since the epoch.
+ LastRefreshTime int64 `json:"lastRefreshTime,omitempty,string"`
+
+ // Query: [Required] A query whose result is persisted.
+ Query string `json:"query,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LastRefreshTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LastRefreshTime") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *MaterializedViewDefinition) MarshalJSON() ([]byte, error) {
+ type NoMethod MaterializedViewDefinition
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
type ModelDefinition struct {
// ModelOptions: [Output-only, Beta] Model options used for the first
// training run. These options are immutable for subsequent training
@@ -2800,8 +2841,9 @@
// Kind: The resource type of the request.
Kind string `json:"kind,omitempty"`
- // Location: The geographic location where the job should run. Required
- // except for US and EU.
+ // Location: The geographic location where the job should run. See
+ // details at
+ // https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
Location string `json:"location,omitempty"`
// MaxResults: [Optional] The maximum number of rows of data to return
@@ -3001,12 +3043,12 @@
}
type RangePartitioning struct {
- // Field: [Experimental] [Required] The table is partitioned by this
+ // Field: [TrustedTester] [Required] The table is partitioned by this
// field. The field must be a top-level NULLABLE/REQUIRED field. The
// only supported type is INTEGER/INT64.
Field string `json:"field,omitempty"`
- // Range: [Experimental] [Required] Defines the ranges for range
+ // Range: [TrustedTester] [Required] Defines the ranges for range
// partitioning.
Range *RangePartitioningRange `json:"range,omitempty"`
@@ -3033,17 +3075,17 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// RangePartitioningRange: [Experimental] [Required] Defines the ranges
+// RangePartitioningRange: [TrustedTester] [Required] Defines the ranges
// for range partitioning.
type RangePartitioningRange struct {
- // End: [Experimental] [Required] The end of range partitioning,
+ // End: [TrustedTester] [Required] The end of range partitioning,
// exclusive.
End int64 `json:"end,omitempty,string"`
- // Interval: [Experimental] [Required] The width of each interval.
+ // Interval: [TrustedTester] [Required] The width of each interval.
Interval int64 `json:"interval,omitempty,string"`
- // Start: [Experimental] [Required] The start of range partitioning,
+ // Start: [TrustedTester] [Required] The start of range partitioning,
// inclusive.
Start int64 `json:"start,omitempty,string"`
@@ -3109,8 +3151,8 @@
}
type Table struct {
- // Clustering: [Experimental] Clustering specification for the table.
- // Must be specified with partitioning, data in the table will be first
+ // Clustering: [Beta] Clustering specification for the table. Must be
+ // specified with partitioning, data in the table will be first
// partitioned and subsequently clustered.
Clustering *Clustering `json:"clustering,omitempty"`
@@ -3171,6 +3213,9 @@
// resides. This value is inherited from the dataset.
Location string `json:"location,omitempty"`
+ // MaterializedView: [Optional] Materialized view definition.
+ MaterializedView *MaterializedViewDefinition `json:"materializedView,omitempty"`
+
// Model: [Output-only, Beta] Present iff this table represents a ML
// model. Describes the training information for the model, and it is
// required to run 'PREDICT' queries.
@@ -3184,7 +3229,7 @@
// are considered "long-term storage".
NumLongTermBytes int64 `json:"numLongTermBytes,omitempty,string"`
- // NumPhysicalBytes: [Output-only] [Experimental] The physical size of
+ // NumPhysicalBytes: [Output-only] [TrustedTester] The physical size of
// this table in bytes, excluding any data in the streaming buffer. This
// includes compression and storage used for time travel.
NumPhysicalBytes int64 `json:"numPhysicalBytes,omitempty,string"`
@@ -3193,14 +3238,14 @@
// excluding any data in the streaming buffer.
NumRows uint64 `json:"numRows,omitempty,string"`
- // RangePartitioning: [Experimental] Range partitioning specification
+ // RangePartitioning: [TrustedTester] Range partitioning specification
// for this table. Only one of timePartitioning and rangePartitioning
// should be specified.
RangePartitioning *RangePartitioning `json:"rangePartitioning,omitempty"`
- // RequirePartitionFilter: [Experimental] [Optional] If set to true,
- // queries over this table require a partition filter that can be used
- // for partition elimination to be specified.
+ // RequirePartitionFilter: [Beta] [Optional] If set to true, queries
+ // over this table require a partition filter that can be used for
+ // partition elimination to be specified.
RequirePartitionFilter bool `json:"requirePartitionFilter,omitempty"`
// Schema: [Optional] Describes the schema of this table.
@@ -3226,9 +3271,10 @@
// Type: [Output-only] Describes the table type. The following values
// are supported: TABLE: A normal BigQuery table. VIEW: A virtual table
- // defined by a SQL query. EXTERNAL: A table that references data stored
- // in an external storage system, such as Google Cloud Storage. The
- // default value is TABLE.
+ // defined by a SQL query. [TrustedTester] MATERIALIZED_VIEW: SQL query
+ // whose result is persisted. EXTERNAL: A table that references data
+ // stored in an external storage system, such as Google Cloud Storage.
+ // The default value is TABLE.
Type string `json:"type,omitempty"`
// View: [Optional] The view definition.
@@ -3304,11 +3350,10 @@
// entire request to fail if any invalid rows exist.
SkipInvalidRows bool `json:"skipInvalidRows,omitempty"`
- // TemplateSuffix: [Experimental] If specified, treats the destination
- // table as a base template, and inserts the rows into an instance table
- // named "{destination}{templateSuffix}". BigQuery will manage creation
- // of the instance table, using the schema of the base template table.
- // See
+ // TemplateSuffix: If specified, treats the destination table as a base
+ // template, and inserts the rows into an instance table named
+ // "{destination}{templateSuffix}". BigQuery will manage creation of the
+ // instance table, using the schema of the base template table. See
// https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables for considerations when working with templates
// tables.
TemplateSuffix string `json:"templateSuffix,omitempty"`
@@ -4947,10 +4992,9 @@
return c
}
-// Location sets the optional parameter "location": [Experimental] The
-// geographic location of the job. Required except for US and EU. See
-// details at
-// https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.
+// Location sets the optional parameter "location": The geographic
+// location of the job. Required except for US and EU. See details at
+// https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
func (c *JobsCancelCall) Location(location string) *JobsCancelCall {
c.urlParams_.Set("location", location)
return c
@@ -5057,7 +5101,7 @@
// "type": "string"
// },
// "location": {
- // "description": "[Experimental] The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.",
+ // "description": "The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.",
// "location": "query",
// "type": "string"
// },
@@ -5102,10 +5146,9 @@
return c
}
-// Location sets the optional parameter "location": [Experimental] The
-// geographic location of the job. Required except for US and EU. See
-// details at
-// https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.
+// Location sets the optional parameter "location": The geographic
+// location of the job. Required except for US and EU. See details at
+// https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
func (c *JobsGetCall) Location(location string) *JobsGetCall {
c.urlParams_.Set("location", location)
return c
@@ -5225,7 +5268,7 @@
// "type": "string"
// },
// "location": {
- // "description": "[Experimental] The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.",
+ // "description": "The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.",
// "location": "query",
// "type": "string"
// },
@@ -5269,10 +5312,10 @@
return c
}
-// Location sets the optional parameter "location": [Experimental] The
-// geographic location where the job should run. Required except for US
-// and EU. See details at
-// https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.
+// Location sets the optional parameter "location": The geographic
+// location where the job should run. Required except for US and EU. See
+// details at
+// https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
func (c *JobsGetQueryResultsCall) Location(location string) *JobsGetQueryResultsCall {
c.urlParams_.Set("location", location)
return c
@@ -5422,7 +5465,7 @@
// "type": "string"
// },
// "location": {
- // "description": "[Experimental] The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.",
+ // "description": "The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.",
// "location": "query",
// "type": "string"
// },
diff --git a/cloudasset/v1beta1/cloudasset-api.json b/cloudasset/v1beta1/cloudasset-api.json
index b33a160..4103de5 100644
--- a/cloudasset/v1beta1/cloudasset-api.json
+++ b/cloudasset/v1beta1/cloudasset-api.json
@@ -337,7 +337,7 @@
}
}
},
- "revision": "20181112",
+ "revision": "20181204",
"rootUrl": "https://cloudasset.googleapis.com/",
"schemas": {
"Asset": {
@@ -345,7 +345,7 @@
"id": "Asset",
"properties": {
"assetType": {
- "description": "Type of the asset. Example: \"google.compute.disk\".",
+ "description": "Type of the asset. Example: \"google.compute.Disk\".",
"type": "string"
},
"iamPolicy": {
@@ -452,7 +452,7 @@
"id": "ExportAssetsRequest",
"properties": {
"assetTypes": {
- "description": "A list of asset types of which to take a snapshot for. For example:\n\"google.compute.disk\". If specified, only matching assets will be returned.\nSee [Introduction to Cloud Asset\nInventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)\nfor all supported asset types.",
+ "description": "A list of asset types of which to take a snapshot for. For example:\n\"google.compute.Disk\". If specified, only matching assets will be returned.\nSee [Introduction to Cloud Asset\nInventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)\nfor all supported asset types.",
"items": {
"type": "string"
},
diff --git a/cloudasset/v1beta1/cloudasset-gen.go b/cloudasset/v1beta1/cloudasset-gen.go
index 6283b84..6f05478 100644
--- a/cloudasset/v1beta1/cloudasset-gen.go
+++ b/cloudasset/v1beta1/cloudasset-gen.go
@@ -129,7 +129,7 @@
// resources,
// Cloud IAM policies, and other non-GCP assets.
type Asset struct {
- // AssetType: Type of the asset. Example: "google.compute.disk".
+ // AssetType: Type of the asset. Example: "google.compute.Disk".
AssetType string `json:"assetType,omitempty"`
// IamPolicy: Representation of the actual Cloud IAM policy set on a
@@ -435,7 +435,7 @@
type ExportAssetsRequest struct {
// AssetTypes: A list of asset types of which to take a snapshot for.
// For example:
- // "google.compute.disk". If specified, only matching assets will be
+ // "google.compute.Disk". If specified, only matching assets will be
// returned.
// See [Introduction to Cloud
// Asset
diff --git a/cloudbuild/v1alpha1/cloudbuild-api.json b/cloudbuild/v1alpha1/cloudbuild-api.json
new file mode 100644
index 0000000..a02f186
--- /dev/null
+++ b/cloudbuild/v1alpha1/cloudbuild-api.json
@@ -0,0 +1,1057 @@
+{
+ "auth": {
+ "oauth2": {
+ "scopes": {
+ "https://www.googleapis.com/auth/cloud-platform": {
+ "description": "View and manage your data across Google Cloud Platform services"
+ }
+ }
+ }
+ },
+ "basePath": "",
+ "baseUrl": "https://cloudbuild.googleapis.com/",
+ "batchPath": "batch",
+ "canonicalName": "Cloud Build",
+ "description": "Creates and manages builds on Google Cloud Platform.",
+ "discoveryVersion": "v1",
+ "documentationLink": "https://cloud.google.com/cloud-build/docs/",
+ "fullyEncodeReservedExpansion": true,
+ "icons": {
+ "x16": "http://www.google.com/images/icons/product/search-16.gif",
+ "x32": "http://www.google.com/images/icons/product/search-32.gif"
+ },
+ "id": "cloudbuild:v1alpha1",
+ "kind": "discovery#restDescription",
+ "name": "cloudbuild",
+ "ownerDomain": "google.com",
+ "ownerName": "Google",
+ "parameters": {
+ "$.xgafv": {
+ "description": "V1 error format.",
+ "enum": [
+ "1",
+ "2"
+ ],
+ "enumDescriptions": [
+ "v1 error format",
+ "v2 error format"
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "access_token": {
+ "description": "OAuth access token.",
+ "location": "query",
+ "type": "string"
+ },
+ "alt": {
+ "default": "json",
+ "description": "Data format for response.",
+ "enum": [
+ "json",
+ "media",
+ "proto"
+ ],
+ "enumDescriptions": [
+ "Responses with Content-Type of application/json",
+ "Media download with context-dependent Content-Type",
+ "Responses with Content-Type of application/x-protobuf"
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "callback": {
+ "description": "JSONP",
+ "location": "query",
+ "type": "string"
+ },
+ "fields": {
+ "description": "Selector specifying which fields to include in a partial response.",
+ "location": "query",
+ "type": "string"
+ },
+ "key": {
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
+ "location": "query",
+ "type": "string"
+ },
+ "oauth_token": {
+ "description": "OAuth 2.0 token for the current user.",
+ "location": "query",
+ "type": "string"
+ },
+ "prettyPrint": {
+ "default": "true",
+ "description": "Returns response with indentations and line breaks.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "quotaUser": {
+ "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
+ "location": "query",
+ "type": "string"
+ },
+ "uploadType": {
+ "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
+ "location": "query",
+ "type": "string"
+ },
+ "upload_protocol": {
+ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "protocol": "rest",
+ "resources": {
+ "projects": {
+ "resources": {
+ "workerPools": {
+ "methods": {
+ "create": {
+ "description": "Creates a `WorkerPool` to run the builds, and returns the new worker pool.\n\nThis API is experimental.",
+ "flatPath": "v1alpha1/projects/{projectsId}/workerPools",
+ "httpMethod": "POST",
+ "id": "cloudbuild.projects.workerPools.create",
+ "parameterOrder": [
+ "parent"
+ ],
+ "parameters": {
+ "parent": {
+ "description": "ID of the parent project.",
+ "location": "path",
+ "pattern": "^projects/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1alpha1/{+parent}/workerPools",
+ "request": {
+ "$ref": "WorkerPool"
+ },
+ "response": {
+ "$ref": "WorkerPool"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "delete": {
+ "description": "Deletes a `WorkerPool` by its project ID and WorkerPool ID.\n\nThis API is experimental.",
+ "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}",
+ "httpMethod": "DELETE",
+ "id": "cloudbuild.projects.workerPools.delete",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The field will contain name of the resource requested, for example:\n\"projects/project-1/workerPools/workerpool-name\"",
+ "location": "path",
+ "pattern": "^projects/[^/]+/workerPools/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1alpha1/{+name}",
+ "response": {
+ "$ref": "Empty"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "get": {
+ "description": "Returns information about a `WorkerPool`.\n\nThis API is experimental.",
+ "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}",
+ "httpMethod": "GET",
+ "id": "cloudbuild.projects.workerPools.get",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The field will contain name of the resource requested, for example:\n\"projects/project-1/workerPools/workerpool-name\"",
+ "location": "path",
+ "pattern": "^projects/[^/]+/workerPools/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1alpha1/{+name}",
+ "response": {
+ "$ref": "WorkerPool"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "list": {
+ "description": "List project's `WorkerPool`s.\n\nThis API is experimental.",
+ "flatPath": "v1alpha1/projects/{projectsId}/workerPools",
+ "httpMethod": "GET",
+ "id": "cloudbuild.projects.workerPools.list",
+ "parameterOrder": [
+ "parent"
+ ],
+ "parameters": {
+ "parent": {
+ "description": "ID of the parent project.",
+ "location": "path",
+ "pattern": "^projects/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1alpha1/{+parent}/workerPools",
+ "response": {
+ "$ref": "ListWorkerPoolsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "patch": {
+ "description": "Update a `WorkerPool`.\n\nThis API is experimental.",
+ "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}",
+ "httpMethod": "PATCH",
+ "id": "cloudbuild.projects.workerPools.patch",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The field will contain name of the resource requested, for example:\n\"projects/project-1/workerPools/workerpool-name\"",
+ "location": "path",
+ "pattern": "^projects/[^/]+/workerPools/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1alpha1/{+name}",
+ "request": {
+ "$ref": "WorkerPool"
+ },
+ "response": {
+ "$ref": "WorkerPool"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "revision": "20181211",
+ "rootUrl": "https://cloudbuild.googleapis.com/",
+ "schemas": {
+ "ArtifactObjects": {
+ "description": "Files in the workspace to upload to Cloud Storage upon successful\ncompletion of all build steps.",
+ "id": "ArtifactObjects",
+ "properties": {
+ "location": {
+ "description": "Cloud Storage bucket and optional object path, in the form\n\"gs://bucket/path/to/somewhere/\". (see [Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\n\nFiles in the workspace matching any path pattern will be uploaded to\nCloud Storage with this location as a prefix.",
+ "type": "string"
+ },
+ "paths": {
+ "description": "Path globs used to match files in the build's workspace.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "timing": {
+ "$ref": "TimeSpan",
+ "description": "Output only. Stores timing information for pushing all artifact objects."
+ }
+ },
+ "type": "object"
+ },
+ "ArtifactResult": {
+ "description": "An artifact that was uploaded during a build. This\nis a single record in the artifact manifest JSON file.",
+ "id": "ArtifactResult",
+ "properties": {
+ "fileHash": {
+ "description": "The file hash of the artifact.",
+ "items": {
+ "$ref": "FileHashes"
+ },
+ "type": "array"
+ },
+ "location": {
+ "description": "The path of an artifact in a Google Cloud Storage bucket, with the\ngeneration number. For example,\n`gs://mybucket/path/to/output.jar#generation`.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Artifacts": {
+ "description": "Artifacts produced by a build that should be uploaded upon\nsuccessful completion of all build steps.",
+ "id": "Artifacts",
+ "properties": {
+ "images": {
+ "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images will be pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the Build resource's\nresults field.\n\nIf any of the images fail to be pushed, the build is marked FAILURE.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "objects": {
+ "$ref": "ArtifactObjects",
+ "description": "A list of objects to be uploaded to Cloud Storage upon successful\ncompletion of all build steps.\n\nFiles in the workspace matching specified paths globs will be uploaded to\nthe specified Cloud Storage location using the builder service account's\ncredentials.\n\nThe location and generation of the uploaded objects will be stored in the\nBuild resource's results field.\n\nIf any objects fail to be pushed, the build is marked FAILURE."
+ }
+ },
+ "type": "object"
+ },
+ "Build": {
+ "description": "A build resource in the Cloud Build API.\n\nAt a high level, a `Build` describes where to find source code, how to build\nit (for example, the builder image to run on the source), and where to store\nthe built artifacts.\n\nFields can include the following variables, which will be expanded when the\nbuild is created:\n\n- $PROJECT_ID: the project ID of the build.\n- $BUILD_ID: the autogenerated ID of the build.\n- $REPO_NAME: the source repository name specified by RepoSource.\n- $BRANCH_NAME: the branch name specified by RepoSource.\n- $TAG_NAME: the tag name specified by RepoSource.\n- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or\n resolved from the specified branch or tag.\n- $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.",
+ "id": "Build",
+ "properties": {
+ "artifacts": {
+ "$ref": "Artifacts",
+ "description": "Artifacts produced by the build that should be uploaded upon\nsuccessful completion of all build steps."
+ },
+ "buildTriggerId": {
+ "description": "Output only. The ID of the `BuildTrigger` that triggered this build, if it\nwas triggered automatically.",
+ "type": "string"
+ },
+ "createTime": {
+ "description": "Output only. Time at which the request to create the build was received.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "finishTime": {
+ "description": "Output only. Time at which execution of the build was finished.\n\nThe difference between finish_time and start_time is the duration of the\nbuild's execution.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "id": {
+ "description": "Output only. Unique identifier of the build.",
+ "type": "string"
+ },
+ "images": {
+ "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images are pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the `Build` resource's\nresults field.\n\nIf any of the images fail to be pushed, the build status is marked\n`FAILURE`.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "logUrl": {
+ "description": "Output only. URL to logs for this build in Google Cloud Console.",
+ "type": "string"
+ },
+ "logsBucket": {
+ "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.",
+ "type": "string"
+ },
+ "options": {
+ "$ref": "BuildOptions",
+ "description": "Special options for this build."
+ },
+ "projectId": {
+ "description": "Output only. ID of the project.",
+ "type": "string"
+ },
+ "results": {
+ "$ref": "Results",
+ "description": "Output only. Results of the build."
+ },
+ "secrets": {
+ "description": "Secrets to decrypt using Cloud Key Management Service.",
+ "items": {
+ "$ref": "Secret"
+ },
+ "type": "array"
+ },
+ "source": {
+ "$ref": "Source",
+ "description": "The location of the source files to build."
+ },
+ "sourceProvenance": {
+ "$ref": "SourceProvenance",
+ "description": "Output only. A permanent fixed identifier for source."
+ },
+ "startTime": {
+ "description": "Output only. Time at which execution of the build was started.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "status": {
+ "description": "Output only. Status of the build.",
+ "enum": [
+ "STATUS_UNKNOWN",
+ "QUEUED",
+ "WORKING",
+ "SUCCESS",
+ "FAILURE",
+ "INTERNAL_ERROR",
+ "TIMEOUT",
+ "CANCELLED"
+ ],
+ "enumDescriptions": [
+ "Status of the build is unknown.",
+ "Build or step is queued; work has not yet begun.",
+ "Build or step is being executed.",
+ "Build or step finished successfully.",
+ "Build or step failed to complete successfully.",
+ "Build or step failed due to an internal cause.",
+ "Build or step took longer than was allowed.",
+ "Build or step was canceled by a user."
+ ],
+ "type": "string"
+ },
+ "statusDetail": {
+ "description": "Output only. Customer-readable message about the current status.",
+ "type": "string"
+ },
+ "steps": {
+ "description": "Required. The operations to be performed on the workspace.",
+ "items": {
+ "$ref": "BuildStep"
+ },
+ "type": "array"
+ },
+ "substitutions": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Substitutions data for `Build` resource.",
+ "type": "object"
+ },
+ "tags": {
+ "description": "Tags for annotation of a `Build`. These are not docker tags.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "timeout": {
+ "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be `TIMEOUT`.\n\nDefault time is ten minutes.",
+ "format": "google-duration",
+ "type": "string"
+ },
+ "timing": {
+ "additionalProperties": {
+ "$ref": "TimeSpan"
+ },
+ "description": "Output only. Stores timing information for phases of the build. Valid keys\nare:\n\n* BUILD: time to execute all build steps\n* PUSH: time to push all specified images.\n* FETCHSOURCE: time to fetch source.\n\nIf the build does not specify source or images,\nthese keys will not be included.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "BuildOperationMetadata": {
+ "description": "Metadata for build operations.",
+ "id": "BuildOperationMetadata",
+ "properties": {
+ "build": {
+ "$ref": "Build",
+ "description": "The build that the operation is tracking."
+ }
+ },
+ "type": "object"
+ },
+ "BuildOptions": {
+ "description": "Optional arguments to enable specific features of builds.",
+ "id": "BuildOptions",
+ "properties": {
+ "diskSizeGb": {
+ "description": "Requested disk size for the VM that runs the build. Note that this is *NOT*\n\"disk free\"; some of the space will be used by the operating system and\nbuild utilities. Also note that this is the minimum disk size that will be\nallocated for the build -- the build may run with a larger disk than\nrequested. At present, the maximum disk size is 1000GB; builds that request\nmore than the maximum are rejected with an error.",
+ "format": "int64",
+ "type": "string"
+ },
+ "env": {
+ "description": "A list of global environment variable definitions that will exist for all\nbuild steps in this build. If a variable is defined in both globally and in\na build step, the variable will use the build step value.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\".",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "logStreamingOption": {
+ "description": "Option to define build log streaming behavior to Google Cloud\nStorage.",
+ "enum": [
+ "STREAM_DEFAULT",
+ "STREAM_ON",
+ "STREAM_OFF"
+ ],
+ "enumDescriptions": [
+ "Service may automatically determine build log streaming behavior.",
+ "Build logs should be streamed to Google Cloud Storage.",
+ "Build logs should not be streamed to Google Cloud Storage; they will be\nwritten when the build is completed."
+ ],
+ "type": "string"
+ },
+ "logging": {
+ "description": "Option to specify the logging mode, which determines where the logs are\nstored.",
+ "enum": [
+ "LOGGING_UNSPECIFIED",
+ "LEGACY",
+ "GCS_ONLY"
+ ],
+ "enumDescriptions": [
+ "The service determines the logging mode. The default is `LEGACY`. Do not\nrely on the default logging behavior as it may change in the future.",
+ "Stackdriver logging and Cloud Storage logging are enabled.",
+ "Only Cloud Storage logging is enabled."
+ ],
+ "type": "string"
+ },
+ "machineType": {
+ "description": "Compute Engine machine type on which to run the build.",
+ "enum": [
+ "UNSPECIFIED",
+ "N1_HIGHCPU_8",
+ "N1_HIGHCPU_32"
+ ],
+ "enumDescriptions": [
+ "Standard machine type.",
+ "Highcpu machine with 8 CPUs.",
+ "Highcpu machine with 32 CPUs."
+ ],
+ "type": "string"
+ },
+ "requestedVerifyOption": {
+ "description": "Requested verifiability options.",
+ "enum": [
+ "NOT_VERIFIED",
+ "VERIFIED"
+ ],
+ "enumDescriptions": [
+ "Not a verifiable build. (default)",
+ "Verified build."
+ ],
+ "type": "string"
+ },
+ "secretEnv": {
+ "description": "A list of global environment variables, which are encrypted using a Cloud\nKey Management Service crypto key. These values must be specified in the\nbuild's `Secret`. These variables will be available to all build steps\nin this build.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "sourceProvenanceHash": {
+ "description": "Requested hash for SourceProvenance.",
+ "enumDescriptions": [
+ "No hash requested.",
+ "Use a sha256 hash.",
+ "Use a md5 hash."
+ ],
+ "items": {
+ "enum": [
+ "NONE",
+ "SHA256",
+ "MD5"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "substitutionOption": {
+ "description": "Option to specify behavior when there is an error in the substitution\nchecks.",
+ "enum": [
+ "MUST_MATCH",
+ "ALLOW_LOOSE"
+ ],
+ "enumDescriptions": [
+ "Fails the build if error in substitutions checks, like missing\na substitution in the template or in the map.",
+ "Do not fail the build if error in substitutions checks."
+ ],
+ "type": "string"
+ },
+ "volumes": {
+ "description": "Global list of volumes to mount for ALL build steps\n\nEach volume is created as an empty volume prior to starting the build\nprocess. Upon completion of the build, volumes and their contents are\ndiscarded. Global volume names and paths cannot conflict with the volumes\ndefined a build step.\n\nUsing a global volume in a build with only one step is not valid as\nit is indicative of a build request with an incorrect configuration.",
+ "items": {
+ "$ref": "Volume"
+ },
+ "type": "array"
+ },
+ "workerPool": {
+ "description": "Option to specify a `WorkerPool` for the build. User specifies the pool\nwith the format \"[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]\".\nThis is an experimental field.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "BuildStep": {
+ "description": "A step in the build pipeline.",
+ "id": "BuildStep",
+ "properties": {
+ "args": {
+ "description": "A list of arguments that will be presented to the step when it is started.\n\nIf the image used to run the step's container has an entrypoint, the `args`\nare used as arguments to that entrypoint. If the image does not define\nan entrypoint, the first element in args is used as the entrypoint,\nand the remainder will be used as arguments.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "dir": {
+ "description": "Working directory to use when running this step's container.\n\nIf this value is a relative path, it is relative to the build's working\ndirectory. If this value is absolute, it may be outside the build's working\ndirectory, in which case the contents of the path may not be persisted\nacross build step executions, unless a `volume` for that path is specified.\n\nIf the build specifies a `RepoSource` with `dir` and a step with a `dir`,\nwhich specifies an absolute path, the `RepoSource` `dir` is ignored for\nthe step's execution.",
+ "type": "string"
+ },
+ "entrypoint": {
+ "description": "Entrypoint to be used instead of the build step image's default entrypoint.\nIf unset, the image's default entrypoint is used.",
+ "type": "string"
+ },
+ "env": {
+ "description": "A list of environment variable definitions to be used when running a step.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\".",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "id": {
+ "description": "Unique identifier for this build step, used in `wait_for` to\nreference this build step as a dependency.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Required. The name of the container image that will run this particular\nbuild step.\n\nIf the image is available in the host's Docker daemon's cache, it\nwill be run directly. If not, the host will attempt to pull the image\nfirst, using the builder service account's credentials if necessary.\n\nThe Docker daemon's cache will already have the latest versions of all of\nthe officially supported build steps\n([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).\nThe Docker daemon will also have cached many of the layers for some popular\nimages, like \"ubuntu\", \"debian\", but they will be refreshed at the time you\nattempt to use them.\n\nIf you built an image in a previous build step, it will be stored in the\nhost's Docker daemon's cache and is available to use as the name for a\nlater build step.",
+ "type": "string"
+ },
+ "pullTiming": {
+ "$ref": "TimeSpan",
+ "description": "Output only. Stores timing information for pulling this build step's\nbuilder image only."
+ },
+ "secretEnv": {
+ "description": "A list of environment variables which are encrypted using a Cloud Key\nManagement Service crypto key. These values must be specified in the\nbuild's `Secret`.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "Output only. Status of the build step. At this time, build step status is\nonly updated on build completion; step status is not updated in real-time\nas the build progresses.",
+ "enum": [
+ "STATUS_UNKNOWN",
+ "QUEUED",
+ "WORKING",
+ "SUCCESS",
+ "FAILURE",
+ "INTERNAL_ERROR",
+ "TIMEOUT",
+ "CANCELLED"
+ ],
+ "enumDescriptions": [
+ "Status of the build is unknown.",
+ "Build or step is queued; work has not yet begun.",
+ "Build or step is being executed.",
+ "Build or step finished successfully.",
+ "Build or step failed to complete successfully.",
+ "Build or step failed due to an internal cause.",
+ "Build or step took longer than was allowed.",
+ "Build or step was canceled by a user."
+ ],
+ "type": "string"
+ },
+ "timeout": {
+ "description": "Time limit for executing this build step. If not defined, the step has no\ntime limit and will be allowed to continue to run until either it completes\nor the build itself times out.",
+ "format": "google-duration",
+ "type": "string"
+ },
+ "timing": {
+ "$ref": "TimeSpan",
+ "description": "Output only. Stores timing information for executing this build step."
+ },
+ "volumes": {
+ "description": "List of volumes to mount into the build step.\n\nEach volume is created as an empty volume prior to execution of the\nbuild step. Upon completion of the build, volumes and their contents are\ndiscarded.\n\nUsing a named volume in only one step is not valid as it is indicative\nof a build request with an incorrect configuration.",
+ "items": {
+ "$ref": "Volume"
+ },
+ "type": "array"
+ },
+ "waitFor": {
+ "description": "The ID(s) of the step(s) that this build step depends on.\nThis build step will not start until all the build steps in `wait_for`\nhave completed successfully. If `wait_for` is empty, this build step will\nstart when all previous build steps in the `Build.Steps` list have\ncompleted successfully.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "BuiltImage": {
+ "description": "An image built by the pipeline.",
+ "id": "BuiltImage",
+ "properties": {
+ "digest": {
+ "description": "Docker Registry 2.0 digest.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name used to push the container image to Google Container Registry, as\npresented to `docker push`.",
+ "type": "string"
+ },
+ "pushTiming": {
+ "$ref": "TimeSpan",
+ "description": "Output only. Stores timing information for pushing the specified image."
+ }
+ },
+ "type": "object"
+ },
+ "Empty": {
+ "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.",
+ "id": "Empty",
+ "properties": {},
+ "type": "object"
+ },
+ "FileHashes": {
+ "description": "Container message for hashes of byte content of files, used in\nSourceProvenance messages to verify integrity of source input to the build.",
+ "id": "FileHashes",
+ "properties": {
+ "fileHash": {
+ "description": "Collection of file hashes.",
+ "items": {
+ "$ref": "Hash"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Hash": {
+ "description": "Container message for hash values.",
+ "id": "Hash",
+ "properties": {
+ "type": {
+ "description": "The type of hash that was performed.",
+ "enum": [
+ "NONE",
+ "SHA256",
+ "MD5"
+ ],
+ "enumDescriptions": [
+ "No hash requested.",
+ "Use a sha256 hash.",
+ "Use a md5 hash."
+ ],
+ "type": "string"
+ },
+ "value": {
+ "description": "The hash value.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ListWorkerPoolsResponse": {
+ "description": "Response containing existing `WorkerPools`.",
+ "id": "ListWorkerPoolsResponse",
+ "properties": {
+ "workerPools": {
+ "description": "`WorkerPools` for the project.",
+ "items": {
+ "$ref": "WorkerPool"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Network": {
+ "description": "Network describes the GCP network used to create workers in.",
+ "id": "Network",
+ "properties": {
+ "network": {
+ "description": "Network on which the workers are created.\n“default” network is used if empty.",
+ "type": "string"
+ },
+ "projectId": {
+ "description": "Project id containing the defined network and subnetwork. For a peered VPC,\nthis will be the same as the project_id in which the workers are created.\nFor a shared VPC, this will be the project sharing the network with the\nproject_id project in which workers will be created. For custom workers\nwith no VPC, this will be the same as project_id.",
+ "type": "string"
+ },
+ "subnetwork": {
+ "description": "Subnetwork on which the workers are created.\n“default” subnetwork is used if empty.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RepoSource": {
+ "description": "Location of the source in a Google Cloud Source Repository.",
+ "id": "RepoSource",
+ "properties": {
+ "branchName": {
+ "description": "Name of the branch to build.",
+ "type": "string"
+ },
+ "commitSha": {
+ "description": "Explicit commit SHA to build.",
+ "type": "string"
+ },
+ "dir": {
+ "description": "Directory, relative to the source root, in which to run the build.\n\nThis must be a relative path. If a step's `dir` is specified and is an\nabsolute path, this value is ignored for that step's execution.",
+ "type": "string"
+ },
+ "projectId": {
+ "description": "ID of the project that owns the Cloud Source Repository. If omitted, the\nproject ID requesting the build is assumed.",
+ "type": "string"
+ },
+ "repoName": {
+ "description": "Name of the Cloud Source Repository. If omitted, the name \"default\" is\nassumed.",
+ "type": "string"
+ },
+ "tagName": {
+ "description": "Name of the tag to build.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Results": {
+ "description": "Artifacts created by the build pipeline.",
+ "id": "Results",
+ "properties": {
+ "artifactManifest": {
+ "description": "Path to the artifact manifest. Only populated when artifacts are uploaded.",
+ "type": "string"
+ },
+ "buildStepImages": {
+ "description": "List of build step digests, in the order corresponding to build step\nindices.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "buildStepOutputs": {
+ "description": "List of build step outputs, produced by builder images, in the order\ncorresponding to build step indices.\n\n[Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)\ncan produce this output by writing to `$BUILDER_OUTPUT/output`.\nOnly the first 4KB of data is stored.",
+ "items": {
+ "format": "byte",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "images": {
+ "description": "Container images that were built as a part of the build.",
+ "items": {
+ "$ref": "BuiltImage"
+ },
+ "type": "array"
+ },
+ "numArtifacts": {
+ "description": "Number of artifacts uploaded. Only populated when artifacts are uploaded.",
+ "format": "int64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Secret": {
+ "description": "Pairs a set of secret environment variables containing encrypted\nvalues with the Cloud KMS key to use to decrypt the value.",
+ "id": "Secret",
+ "properties": {
+ "kmsKeyName": {
+ "description": "Cloud KMS key name to use to decrypt these envs.",
+ "type": "string"
+ },
+ "secretEnv": {
+ "additionalProperties": {
+ "format": "byte",
+ "type": "string"
+ },
+ "description": "Map of environment variable name to its encrypted value.\n\nSecret environment variables must be unique across all of a build's\nsecrets, and must be used by at least one build step. Values can be at most\n64 KB in size. There can be at most 100 secret values across all of a\nbuild's secrets.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "Source": {
+ "description": "Location of the source in a supported storage service.",
+ "id": "Source",
+ "properties": {
+ "repoSource": {
+ "$ref": "RepoSource",
+ "description": "If provided, get the source from this location in a Cloud Source\nRepository."
+ },
+ "storageSource": {
+ "$ref": "StorageSource",
+ "description": "If provided, get the source from this location in Google Cloud Storage."
+ }
+ },
+ "type": "object"
+ },
+ "SourceProvenance": {
+ "description": "Provenance of the source. Ways to find the original source, or verify that\nsome source was used for this build.",
+ "id": "SourceProvenance",
+ "properties": {
+ "fileHashes": {
+ "additionalProperties": {
+ "$ref": "FileHashes"
+ },
+ "description": "Output only. Hash(es) of the build source, which can be used to verify that\nthe originalsource integrity was maintained in the build. Note that\n`FileHashes` willonly be populated if `BuildOptions` has requested a\n`SourceProvenanceHash`.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(`.tar.gz`), the `FileHash` will be for the single path to that file.",
+ "type": "object"
+ },
+ "resolvedRepoSource": {
+ "$ref": "RepoSource",
+ "description": "A copy of the build's `source.repo_source`, if exists, with any\nrevisions resolved."
+ },
+ "resolvedStorageSource": {
+ "$ref": "StorageSource",
+ "description": "A copy of the build's `source.storage_source`, if exists, with any\ngenerations resolved."
+ }
+ },
+ "type": "object"
+ },
+ "StorageSource": {
+ "description": "Location of the source in an archive file in Google Cloud Storage.",
+ "id": "StorageSource",
+ "properties": {
+ "bucket": {
+ "description": "Google Cloud Storage bucket containing the source (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).",
+ "type": "string"
+ },
+ "generation": {
+ "description": "Google Cloud Storage generation for the object. If the generation is\nomitted, the latest generation will be used.",
+ "format": "int64",
+ "type": "string"
+ },
+ "object": {
+ "description": "Google Cloud Storage object containing the source.\n\nThis object must be a gzipped archive file (`.tar.gz`) containing source to\nbuild.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TimeSpan": {
+ "description": "Start and end times for a build execution phase.",
+ "id": "TimeSpan",
+ "properties": {
+ "endTime": {
+ "description": "End of time span.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "startTime": {
+ "description": "Start of time span.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Volume": {
+ "description": "Volume describes a Docker container volume which is mounted into build steps\nin order to persist files across build step execution.",
+ "id": "Volume",
+ "properties": {
+ "name": {
+ "description": "Name of the volume to mount.\n\nVolume names must be unique per build step and must be valid names for\nDocker volumes. Each named volume must be used by at least two build steps.",
+ "type": "string"
+ },
+ "path": {
+ "description": "Path at which to mount the volume.\n\nPaths must be absolute and cannot conflict with other volume paths on the\nsame build step or with certain reserved volume paths.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "WorkerConfig": {
+ "description": "WorkerConfig defines the configuration to be used for a creating workers in\nthe pool.",
+ "id": "WorkerConfig",
+ "properties": {
+ "diskSizeGb": {
+ "description": "Size of the disk attached to the worker, in GB.\nSee https://cloud.google.com/compute/docs/disks/\nIf `0` is specified, Cloud Build will use a standard disk size.\n`disk_size` is overridden if you specify a different disk size in\n`build_options`. In this case, a VM with a disk size specified in the\n`build_options` will be created on demand at build time. For more\ninformation see\nhttps://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions",
+ "format": "int64",
+ "type": "string"
+ },
+ "machineType": {
+ "description": "Machine Type of the worker, such as n1-standard-1.\nSee https://cloud.google.com/compute/docs/machine-types.\nIf left blank, Cloud Build will use a standard unspecified machine to\ncreate the worker pool.\n`machine_type` is overridden if you specify a different machine type in\n`build_options`. In this case, the VM specified in the `build_options`\nwill be created on demand at build time. For more information see\nhttps://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes",
+ "type": "string"
+ },
+ "network": {
+ "$ref": "Network",
+ "description": "The network definition used to create the worker.\nIf this section is left empty, the workers will be created in\nWorkerPool.project_id on the default network."
+ },
+ "tag": {
+ "description": "The tag applied to the worker, and the same tag used by the firewall rule.\nIt is used to identify the Cloud Build workers among other VMs.\nThe default value for tag is `worker`.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "WorkerPool": {
+ "description": "Configuration for a WorkerPool to run the builds.\n\nWorkers are machines that Cloud Build uses to run your builds. By default,\nall workers run in a project owned by Cloud Build. To have full control over\nthe workers that execute your builds -- such as enabling them to access\nprivate resources on your private network -- you can request Cloud Build to\nrun the workers in your own project by creating a custom workers pool.",
+ "id": "WorkerPool",
+ "properties": {
+ "createTime": {
+ "description": "Output only. Time at which the request to create the `WorkerPool` was\nreceived.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "deleteTime": {
+ "description": "Output only. Time at which the request to delete the `WorkerPool` was\nreceived.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "name": {
+ "description": "User-defined name of the `WorkerPool`.",
+ "type": "string"
+ },
+ "projectId": {
+ "description": "The project ID of the GCP project in which the `WorkerPool` is created.",
+ "type": "string"
+ },
+ "regions": {
+ "description": "List of regions to create the `WorkerPool`. Regions can’t be empty.\nIf Cloud Build adds a new GCP region in the future, the existing\n`WorkerPool` will not be enabled in the new region automatically;\nyou must add the new region to the `regions` field to enable the\n`WorkerPool` in that region.",
+ "enumDescriptions": [
+ "no region",
+ "us-central-1 region",
+ "us-west-1 region",
+ "us-east-1 region",
+ "us-east-4 region"
+ ],
+ "items": {
+ "enum": [
+ "REGION_UNSPECIFIED",
+ "US_CENTRAL_1",
+ "US_WEST_1",
+ "US_EAST_1",
+ "US_EAST_4"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "serviceAccountEmail": {
+ "description": "Output only. The service account used to manage the `WorkerPool`. The\nservice account must have the Compute Instance Admin (Beta) permission at\nthe project level.",
+ "type": "string"
+ },
+ "status": {
+ "description": "Output only. WorkerPool Status.",
+ "enum": [
+ "STATUS_UNSPECIFIED",
+ "CREATING",
+ "RUNNING",
+ "DELETING",
+ "DELETED"
+ ],
+ "enumDescriptions": [
+ "Status of the `WorkerPool` is unknown.",
+ "`WorkerPool` is being created.",
+ "`WorkerPool` is running.",
+ "`WorkerPool` is being deleting: cancelling builds and draining workers.",
+ "`WorkerPool` is deleted."
+ ],
+ "type": "string"
+ },
+ "updateTime": {
+ "description": "Output only. Time at which the request to update the `WorkerPool` was\nreceived.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "workerConfig": {
+ "$ref": "WorkerConfig",
+ "description": "Configuration to be used for a creating workers in the `WorkerPool`."
+ },
+ "workerCount": {
+ "description": "Total number of workers to be created across all requested regions.",
+ "format": "int64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "servicePath": "",
+ "title": "Cloud Build API",
+ "version": "v1alpha1",
+ "version_module": true
+}
\ No newline at end of file
diff --git a/cloudbuild/v1alpha1/cloudbuild-gen.go b/cloudbuild/v1alpha1/cloudbuild-gen.go
new file mode 100644
index 0000000..0bead4a
--- /dev/null
+++ b/cloudbuild/v1alpha1/cloudbuild-gen.go
@@ -0,0 +1,2184 @@
+// Copyright 2018 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Code generated file. DO NOT EDIT.
+
+// Package cloudbuild provides access to the Cloud Build API.
+//
+// See https://cloud.google.com/cloud-build/docs/
+//
+// Usage example:
+//
+// import "google.golang.org/api/cloudbuild/v1alpha1"
+// ...
+// cloudbuildService, err := cloudbuild.New(oauthHttpClient)
+package cloudbuild // import "google.golang.org/api/cloudbuild/v1alpha1"
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+
+ gensupport "google.golang.org/api/gensupport"
+ googleapi "google.golang.org/api/googleapi"
+)
+
+// Always reference these packages, just in case the auto-generated code
+// below doesn't.
+var _ = bytes.NewBuffer
+var _ = strconv.Itoa
+var _ = fmt.Sprintf
+var _ = json.NewDecoder
+var _ = io.Copy
+var _ = url.Parse
+var _ = gensupport.MarshalJSON
+var _ = googleapi.Version
+var _ = errors.New
+var _ = strings.Replace
+var _ = context.Canceled
+
+const apiId = "cloudbuild:v1alpha1"
+const apiName = "cloudbuild"
+const apiVersion = "v1alpha1"
+const basePath = "https://cloudbuild.googleapis.com/"
+
+// OAuth2 scopes used by this API.
+const (
+ // View and manage your data across Google Cloud Platform services
+ CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
+)
+
+func New(client *http.Client) (*Service, error) {
+ if client == nil {
+ return nil, errors.New("client is nil")
+ }
+ s := &Service{client: client, BasePath: basePath}
+ s.Projects = NewProjectsService(s)
+ return s, nil
+}
+
+type Service struct {
+ client *http.Client
+ BasePath string // API endpoint base URL
+ UserAgent string // optional additional User-Agent fragment
+
+ Projects *ProjectsService
+}
+
+func (s *Service) userAgent() string {
+ if s.UserAgent == "" {
+ return googleapi.UserAgent
+ }
+ return googleapi.UserAgent + " " + s.UserAgent
+}
+
+func NewProjectsService(s *Service) *ProjectsService {
+ rs := &ProjectsService{s: s}
+ rs.WorkerPools = NewProjectsWorkerPoolsService(s)
+ return rs
+}
+
+type ProjectsService struct {
+ s *Service
+
+ WorkerPools *ProjectsWorkerPoolsService
+}
+
+func NewProjectsWorkerPoolsService(s *Service) *ProjectsWorkerPoolsService {
+ rs := &ProjectsWorkerPoolsService{s: s}
+ return rs
+}
+
+type ProjectsWorkerPoolsService struct {
+ s *Service
+}
+
+// ArtifactObjects: Files in the workspace to upload to Cloud Storage
+// upon successful
+// completion of all build steps.
+type ArtifactObjects struct {
+ // Location: Cloud Storage bucket and optional object path, in the
+ // form
+ // "gs://bucket/path/to/somewhere/". (see [Bucket
+ // Name
+ // Requirements](https://cloud.google.com/storage/docs/bucket-naming
+ // #requirements)).
+ //
+ // Files in the workspace matching any path pattern will be uploaded
+ // to
+ // Cloud Storage with this location as a prefix.
+ Location string `json:"location,omitempty"`
+
+ // Paths: Path globs used to match files in the build's workspace.
+ Paths []string `json:"paths,omitempty"`
+
+ // Timing: Output only. Stores timing information for pushing all
+ // artifact objects.
+ Timing *TimeSpan `json:"timing,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Location") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Location") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ArtifactObjects) MarshalJSON() ([]byte, error) {
+ type NoMethod ArtifactObjects
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ArtifactResult: An artifact that was uploaded during a build. This
+// is a single record in the artifact manifest JSON file.
+type ArtifactResult struct {
+ // FileHash: The file hash of the artifact.
+ FileHash []*FileHashes `json:"fileHash,omitempty"`
+
+ // Location: The path of an artifact in a Google Cloud Storage bucket,
+ // with the
+ // generation number. For
+ // example,
+ // `gs://mybucket/path/to/output.jar#generation`.
+ Location string `json:"location,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "FileHash") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "FileHash") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ArtifactResult) MarshalJSON() ([]byte, error) {
+ type NoMethod ArtifactResult
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Artifacts: Artifacts produced by a build that should be uploaded
+// upon
+// successful completion of all build steps.
+type Artifacts struct {
+ // Images: A list of images to be pushed upon the successful completion
+ // of all build
+ // steps.
+ //
+ // The images will be pushed using the builder service account's
+ // credentials.
+ //
+ // The digests of the pushed images will be stored in the Build
+ // resource's
+ // results field.
+ //
+ // If any of the images fail to be pushed, the build is marked FAILURE.
+ Images []string `json:"images,omitempty"`
+
+ // Objects: A list of objects to be uploaded to Cloud Storage upon
+ // successful
+ // completion of all build steps.
+ //
+ // Files in the workspace matching specified paths globs will be
+ // uploaded to
+ // the specified Cloud Storage location using the builder service
+ // account's
+ // credentials.
+ //
+ // The location and generation of the uploaded objects will be stored in
+ // the
+ // Build resource's results field.
+ //
+ // If any objects fail to be pushed, the build is marked FAILURE.
+ Objects *ArtifactObjects `json:"objects,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Images") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Images") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Artifacts) MarshalJSON() ([]byte, error) {
+ type NoMethod Artifacts
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Build: A build resource in the Cloud Build API.
+//
+// At a high level, a `Build` describes where to find source code, how
+// to build
+// it (for example, the builder image to run on the source), and where
+// to store
+// the built artifacts.
+//
+// Fields can include the following variables, which will be expanded
+// when the
+// build is created:
+//
+// - $PROJECT_ID: the project ID of the build.
+// - $BUILD_ID: the autogenerated ID of the build.
+// - $REPO_NAME: the source repository name specified by RepoSource.
+// - $BRANCH_NAME: the branch name specified by RepoSource.
+// - $TAG_NAME: the tag name specified by RepoSource.
+// - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource
+// or
+// resolved from the specified branch or tag.
+// - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
+type Build struct {
+ // Artifacts: Artifacts produced by the build that should be uploaded
+ // upon
+ // successful completion of all build steps.
+ Artifacts *Artifacts `json:"artifacts,omitempty"`
+
+ // BuildTriggerId: Output only. The ID of the `BuildTrigger` that
+ // triggered this build, if it
+ // was triggered automatically.
+ BuildTriggerId string `json:"buildTriggerId,omitempty"`
+
+ // CreateTime: Output only. Time at which the request to create the
+ // build was received.
+ CreateTime string `json:"createTime,omitempty"`
+
+ // FinishTime: Output only. Time at which execution of the build was
+ // finished.
+ //
+ // The difference between finish_time and start_time is the duration of
+ // the
+ // build's execution.
+ FinishTime string `json:"finishTime,omitempty"`
+
+ // Id: Output only. Unique identifier of the build.
+ Id string `json:"id,omitempty"`
+
+ // Images: A list of images to be pushed upon the successful completion
+ // of all build
+ // steps.
+ //
+ // The images are pushed using the builder service account's
+ // credentials.
+ //
+ // The digests of the pushed images will be stored in the `Build`
+ // resource's
+ // results field.
+ //
+ // If any of the images fail to be pushed, the build status is
+ // marked
+ // `FAILURE`.
+ Images []string `json:"images,omitempty"`
+
+ // LogUrl: Output only. URL to logs for this build in Google Cloud
+ // Console.
+ LogUrl string `json:"logUrl,omitempty"`
+
+ // LogsBucket: Google Cloud Storage bucket where logs should be written
+ // (see
+ // [Bucket
+ // Name
+ // Requirements](https://cloud.google.com/storage/docs/bucket-naming
+ // #requirements)).
+ // Logs file names will be of the format
+ // `${logs_bucket}/log-${build_id}.txt`.
+ LogsBucket string `json:"logsBucket,omitempty"`
+
+ // Options: Special options for this build.
+ Options *BuildOptions `json:"options,omitempty"`
+
+ // ProjectId: Output only. ID of the project.
+ ProjectId string `json:"projectId,omitempty"`
+
+ // Results: Output only. Results of the build.
+ Results *Results `json:"results,omitempty"`
+
+ // Secrets: Secrets to decrypt using Cloud Key Management Service.
+ Secrets []*Secret `json:"secrets,omitempty"`
+
+ // Source: The location of the source files to build.
+ Source *Source `json:"source,omitempty"`
+
+ // SourceProvenance: Output only. A permanent fixed identifier for
+ // source.
+ SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"`
+
+ // StartTime: Output only. Time at which execution of the build was
+ // started.
+ StartTime string `json:"startTime,omitempty"`
+
+ // Status: Output only. Status of the build.
+ //
+ // Possible values:
+ // "STATUS_UNKNOWN" - Status of the build is unknown.
+ // "QUEUED" - Build or step is queued; work has not yet begun.
+ // "WORKING" - Build or step is being executed.
+ // "SUCCESS" - Build or step finished successfully.
+ // "FAILURE" - Build or step failed to complete successfully.
+ // "INTERNAL_ERROR" - Build or step failed due to an internal cause.
+ // "TIMEOUT" - Build or step took longer than was allowed.
+ // "CANCELLED" - Build or step was canceled by a user.
+ Status string `json:"status,omitempty"`
+
+ // StatusDetail: Output only. Customer-readable message about the
+ // current status.
+ StatusDetail string `json:"statusDetail,omitempty"`
+
+ // Steps: Required. The operations to be performed on the workspace.
+ Steps []*BuildStep `json:"steps,omitempty"`
+
+ // Substitutions: Substitutions data for `Build` resource.
+ Substitutions map[string]string `json:"substitutions,omitempty"`
+
+ // Tags: Tags for annotation of a `Build`. These are not docker tags.
+ Tags []string `json:"tags,omitempty"`
+
+ // Timeout: Amount of time that this build should be allowed to run, to
+ // second
+ // granularity. If this amount of time elapses, work on the build will
+ // cease
+ // and the build status will be `TIMEOUT`.
+ //
+ // Default time is ten minutes.
+ Timeout string `json:"timeout,omitempty"`
+
+ // Timing: Output only. Stores timing information for phases of the
+ // build. Valid keys
+ // are:
+ //
+ // * BUILD: time to execute all build steps
+ // * PUSH: time to push all specified images.
+ // * FETCHSOURCE: time to fetch source.
+ //
+ // If the build does not specify source or images,
+ // these keys will not be included.
+ Timing map[string]TimeSpan `json:"timing,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Artifacts") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Artifacts") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Build) MarshalJSON() ([]byte, error) {
+ type NoMethod Build
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BuildOperationMetadata: Metadata for build operations.
+type BuildOperationMetadata struct {
+ // Build: The build that the operation is tracking.
+ Build *Build `json:"build,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Build") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Build") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BuildOperationMetadata) MarshalJSON() ([]byte, error) {
+ type NoMethod BuildOperationMetadata
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BuildOptions: Optional arguments to enable specific features of
+// builds.
+type BuildOptions struct {
+ // DiskSizeGb: Requested disk size for the VM that runs the build. Note
+ // that this is *NOT*
+ // "disk free"; some of the space will be used by the operating system
+ // and
+ // build utilities. Also note that this is the minimum disk size that
+ // will be
+ // allocated for the build -- the build may run with a larger disk
+ // than
+ // requested. At present, the maximum disk size is 1000GB; builds that
+ // request
+ // more than the maximum are rejected with an error.
+ DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
+
+ // Env: A list of global environment variable definitions that will
+ // exist for all
+ // build steps in this build. If a variable is defined in both globally
+ // and in
+ // a build step, the variable will use the build step value.
+ //
+ // The elements are of the form "KEY=VALUE" for the environment variable
+ // "KEY"
+ // being given the value "VALUE".
+ Env []string `json:"env,omitempty"`
+
+ // LogStreamingOption: Option to define build log streaming behavior to
+ // Google Cloud
+ // Storage.
+ //
+ // Possible values:
+ // "STREAM_DEFAULT" - Service may automatically determine build log
+ // streaming behavior.
+ // "STREAM_ON" - Build logs should be streamed to Google Cloud
+ // Storage.
+ // "STREAM_OFF" - Build logs should not be streamed to Google Cloud
+ // Storage; they will be
+ // written when the build is completed.
+ LogStreamingOption string `json:"logStreamingOption,omitempty"`
+
+ // Logging: Option to specify the logging mode, which determines where
+ // the logs are
+ // stored.
+ //
+ // Possible values:
+ // "LOGGING_UNSPECIFIED" - The service determines the logging mode.
+ // The default is `LEGACY`. Do not
+ // rely on the default logging behavior as it may change in the future.
+ // "LEGACY" - Stackdriver logging and Cloud Storage logging are
+ // enabled.
+ // "GCS_ONLY" - Only Cloud Storage logging is enabled.
+ Logging string `json:"logging,omitempty"`
+
+ // MachineType: Compute Engine machine type on which to run the build.
+ //
+ // Possible values:
+ // "UNSPECIFIED" - Standard machine type.
+ // "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs.
+ // "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs.
+ MachineType string `json:"machineType,omitempty"`
+
+ // RequestedVerifyOption: Requested verifiability options.
+ //
+ // Possible values:
+ // "NOT_VERIFIED" - Not a verifiable build. (default)
+ // "VERIFIED" - Verified build.
+ RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"`
+
+ // SecretEnv: A list of global environment variables, which are
+ // encrypted using a Cloud
+ // Key Management Service crypto key. These values must be specified in
+ // the
+ // build's `Secret`. These variables will be available to all build
+ // steps
+ // in this build.
+ SecretEnv []string `json:"secretEnv,omitempty"`
+
+ // SourceProvenanceHash: Requested hash for SourceProvenance.
+ //
+ // Possible values:
+ // "NONE" - No hash requested.
+ // "SHA256" - Use a sha256 hash.
+ // "MD5" - Use a md5 hash.
+ SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"`
+
+ // SubstitutionOption: Option to specify behavior when there is an error
+ // in the substitution
+ // checks.
+ //
+ // Possible values:
+ // "MUST_MATCH" - Fails the build if error in substitutions checks,
+ // like missing
+ // a substitution in the template or in the map.
+ // "ALLOW_LOOSE" - Do not fail the build if error in substitutions
+ // checks.
+ SubstitutionOption string `json:"substitutionOption,omitempty"`
+
+ // Volumes: Global list of volumes to mount for ALL build steps
+ //
+ // Each volume is created as an empty volume prior to starting the
+ // build
+ // process. Upon completion of the build, volumes and their contents
+ // are
+ // discarded. Global volume names and paths cannot conflict with the
+ // volumes
+ // defined a build step.
+ //
+ // Using a global volume in a build with only one step is not valid
+ // as
+ // it is indicative of a build request with an incorrect configuration.
+ Volumes []*Volume `json:"volumes,omitempty"`
+
+ // WorkerPool: Option to specify a `WorkerPool` for the build. User
+ // specifies the pool
+ // with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]".
+ // This is an experimental field.
+ WorkerPool string `json:"workerPool,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DiskSizeGb") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BuildOptions) MarshalJSON() ([]byte, error) {
+ type NoMethod BuildOptions
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BuildStep: A step in the build pipeline.
+type BuildStep struct {
+ // Args: A list of arguments that will be presented to the step when it
+ // is started.
+ //
+ // If the image used to run the step's container has an entrypoint, the
+ // `args`
+ // are used as arguments to that entrypoint. If the image does not
+ // define
+ // an entrypoint, the first element in args is used as the
+ // entrypoint,
+ // and the remainder will be used as arguments.
+ Args []string `json:"args,omitempty"`
+
+ // Dir: Working directory to use when running this step's container.
+ //
+ // If this value is a relative path, it is relative to the build's
+ // working
+ // directory. If this value is absolute, it may be outside the build's
+ // working
+ // directory, in which case the contents of the path may not be
+ // persisted
+ // across build step executions, unless a `volume` for that path is
+ // specified.
+ //
+ // If the build specifies a `RepoSource` with `dir` and a step with a
+ // `dir`,
+ // which specifies an absolute path, the `RepoSource` `dir` is ignored
+ // for
+ // the step's execution.
+ Dir string `json:"dir,omitempty"`
+
+ // Entrypoint: Entrypoint to be used instead of the build step image's
+ // default entrypoint.
+ // If unset, the image's default entrypoint is used.
+ Entrypoint string `json:"entrypoint,omitempty"`
+
+ // Env: A list of environment variable definitions to be used when
+ // running a step.
+ //
+ // The elements are of the form "KEY=VALUE" for the environment variable
+ // "KEY"
+ // being given the value "VALUE".
+ Env []string `json:"env,omitempty"`
+
+ // Id: Unique identifier for this build step, used in `wait_for`
+ // to
+ // reference this build step as a dependency.
+ Id string `json:"id,omitempty"`
+
+ // Name: Required. The name of the container image that will run this
+ // particular
+ // build step.
+ //
+ // If the image is available in the host's Docker daemon's cache,
+ // it
+ // will be run directly. If not, the host will attempt to pull the
+ // image
+ // first, using the builder service account's credentials if
+ // necessary.
+ //
+ // The Docker daemon's cache will already have the latest versions of
+ // all of
+ // the officially supported build
+ // steps
+ // ([https://github.com/GoogleCloudPlatform/cloud-builders](https:/
+ // /github.com/GoogleCloudPlatform/cloud-builders)).
+ // The Docker daemon will also have cached many of the layers for some
+ // popular
+ // images, like "ubuntu", "debian", but they will be refreshed at the
+ // time you
+ // attempt to use them.
+ //
+ // If you built an image in a previous build step, it will be stored in
+ // the
+ // host's Docker daemon's cache and is available to use as the name for
+ // a
+ // later build step.
+ Name string `json:"name,omitempty"`
+
+ // PullTiming: Output only. Stores timing information for pulling this
+ // build step's
+ // builder image only.
+ PullTiming *TimeSpan `json:"pullTiming,omitempty"`
+
+ // SecretEnv: A list of environment variables which are encrypted using
+ // a Cloud Key
+ // Management Service crypto key. These values must be specified in
+ // the
+ // build's `Secret`.
+ SecretEnv []string `json:"secretEnv,omitempty"`
+
+ // Status: Output only. Status of the build step. At this time, build
+ // step status is
+ // only updated on build completion; step status is not updated in
+ // real-time
+ // as the build progresses.
+ //
+ // Possible values:
+ // "STATUS_UNKNOWN" - Status of the build is unknown.
+ // "QUEUED" - Build or step is queued; work has not yet begun.
+ // "WORKING" - Build or step is being executed.
+ // "SUCCESS" - Build or step finished successfully.
+ // "FAILURE" - Build or step failed to complete successfully.
+ // "INTERNAL_ERROR" - Build or step failed due to an internal cause.
+ // "TIMEOUT" - Build or step took longer than was allowed.
+ // "CANCELLED" - Build or step was canceled by a user.
+ Status string `json:"status,omitempty"`
+
+ // Timeout: Time limit for executing this build step. If not defined,
+ // the step has no
+ // time limit and will be allowed to continue to run until either it
+ // completes
+ // or the build itself times out.
+ Timeout string `json:"timeout,omitempty"`
+
+ // Timing: Output only. Stores timing information for executing this
+ // build step.
+ Timing *TimeSpan `json:"timing,omitempty"`
+
+ // Volumes: List of volumes to mount into the build step.
+ //
+ // Each volume is created as an empty volume prior to execution of
+ // the
+ // build step. Upon completion of the build, volumes and their contents
+ // are
+ // discarded.
+ //
+ // Using a named volume in only one step is not valid as it is
+ // indicative
+ // of a build request with an incorrect configuration.
+ Volumes []*Volume `json:"volumes,omitempty"`
+
+ // WaitFor: The ID(s) of the step(s) that this build step depends
+ // on.
+ // This build step will not start until all the build steps in
+ // `wait_for`
+ // have completed successfully. If `wait_for` is empty, this build step
+ // will
+ // start when all previous build steps in the `Build.Steps` list
+ // have
+ // completed successfully.
+ WaitFor []string `json:"waitFor,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Args") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Args") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BuildStep) MarshalJSON() ([]byte, error) {
+ type NoMethod BuildStep
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BuiltImage: An image built by the pipeline.
+type BuiltImage struct {
+ // Digest: Docker Registry 2.0 digest.
+ Digest string `json:"digest,omitempty"`
+
+ // Name: Name used to push the container image to Google Container
+ // Registry, as
+ // presented to `docker push`.
+ Name string `json:"name,omitempty"`
+
+ // PushTiming: Output only. Stores timing information for pushing the
+ // specified image.
+ PushTiming *TimeSpan `json:"pushTiming,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Digest") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Digest") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BuiltImage) MarshalJSON() ([]byte, error) {
+ type NoMethod BuiltImage
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Empty: A generic empty message that you can re-use to avoid defining
+// duplicated
+// empty messages in your APIs. A typical example is to use it as the
+// request
+// or the response type of an API method. For instance:
+//
+// service Foo {
+// rpc Bar(google.protobuf.Empty) returns
+// (google.protobuf.Empty);
+// }
+//
+// The JSON representation for `Empty` is empty JSON object `{}`.
+type Empty struct {
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+}
+
+// FileHashes: Container message for hashes of byte content of files,
+// used in
+// SourceProvenance messages to verify integrity of source input to the
+// build.
+type FileHashes struct {
+ // FileHash: Collection of file hashes.
+ FileHash []*Hash `json:"fileHash,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "FileHash") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "FileHash") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *FileHashes) MarshalJSON() ([]byte, error) {
+ type NoMethod FileHashes
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Hash: Container message for hash values.
+type Hash struct {
+ // Type: The type of hash that was performed.
+ //
+ // Possible values:
+ // "NONE" - No hash requested.
+ // "SHA256" - Use a sha256 hash.
+ // "MD5" - Use a md5 hash.
+ Type string `json:"type,omitempty"`
+
+ // Value: The hash value.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Type") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Type") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Hash) MarshalJSON() ([]byte, error) {
+ type NoMethod Hash
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ListWorkerPoolsResponse: Response containing existing `WorkerPools`.
+type ListWorkerPoolsResponse struct {
+ // WorkerPools: `WorkerPools` for the project.
+ WorkerPools []*WorkerPool `json:"workerPools,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "WorkerPools") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "WorkerPools") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListWorkerPoolsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListWorkerPoolsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Network: Network describes the GCP network used to create workers in.
+type Network struct {
+ // Network: Network on which the workers are created.
+ // “default” network is used if empty.
+ Network string `json:"network,omitempty"`
+
+ // ProjectId: Project id containing the defined network and subnetwork.
+ // For a peered VPC,
+ // this will be the same as the project_id in which the workers are
+ // created.
+ // For a shared VPC, this will be the project sharing the network with
+ // the
+ // project_id project in which workers will be created. For custom
+ // workers
+ // with no VPC, this will be the same as project_id.
+ ProjectId string `json:"projectId,omitempty"`
+
+ // Subnetwork: Subnetwork on which the workers are
+ // created.
+ // “default” subnetwork is used if empty.
+ Subnetwork string `json:"subnetwork,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Network") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Network") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Network) MarshalJSON() ([]byte, error) {
+ type NoMethod Network
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// RepoSource: Location of the source in a Google Cloud Source
+// Repository.
+type RepoSource struct {
+ // BranchName: Name of the branch to build.
+ BranchName string `json:"branchName,omitempty"`
+
+ // CommitSha: Explicit commit SHA to build.
+ CommitSha string `json:"commitSha,omitempty"`
+
+ // Dir: Directory, relative to the source root, in which to run the
+ // build.
+ //
+ // This must be a relative path. If a step's `dir` is specified and is
+ // an
+ // absolute path, this value is ignored for that step's execution.
+ Dir string `json:"dir,omitempty"`
+
+ // ProjectId: ID of the project that owns the Cloud Source Repository.
+ // If omitted, the
+ // project ID requesting the build is assumed.
+ ProjectId string `json:"projectId,omitempty"`
+
+ // RepoName: Name of the Cloud Source Repository. If omitted, the name
+ // "default" is
+ // assumed.
+ RepoName string `json:"repoName,omitempty"`
+
+ // TagName: Name of the tag to build.
+ TagName string `json:"tagName,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BranchName") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BranchName") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RepoSource) MarshalJSON() ([]byte, error) {
+ type NoMethod RepoSource
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Results: Artifacts created by the build pipeline.
+type Results struct {
+ // ArtifactManifest: Path to the artifact manifest. Only populated when
+ // artifacts are uploaded.
+ ArtifactManifest string `json:"artifactManifest,omitempty"`
+
+ // BuildStepImages: List of build step digests, in the order
+ // corresponding to build step
+ // indices.
+ BuildStepImages []string `json:"buildStepImages,omitempty"`
+
+ // BuildStepOutputs: List of build step outputs, produced by builder
+ // images, in the order
+ // corresponding to build step indices.
+ //
+ // [Cloud
+ // Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
+ // ca
+ // n produce this output by writing to `$BUILDER_OUTPUT/output`.
+ // Only the first 4KB of data is stored.
+ BuildStepOutputs []string `json:"buildStepOutputs,omitempty"`
+
+ // Images: Container images that were built as a part of the build.
+ Images []*BuiltImage `json:"images,omitempty"`
+
+ // NumArtifacts: Number of artifacts uploaded. Only populated when
+ // artifacts are uploaded.
+ NumArtifacts int64 `json:"numArtifacts,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "ArtifactManifest") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ArtifactManifest") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Results) MarshalJSON() ([]byte, error) {
+ type NoMethod Results
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Secret: Pairs a set of secret environment variables containing
+// encrypted
+// values with the Cloud KMS key to use to decrypt the value.
+type Secret struct {
+ // KmsKeyName: Cloud KMS key name to use to decrypt these envs.
+ KmsKeyName string `json:"kmsKeyName,omitempty"`
+
+ // SecretEnv: Map of environment variable name to its encrypted
+ // value.
+ //
+ // Secret environment variables must be unique across all of a
+ // build's
+ // secrets, and must be used by at least one build step. Values can be
+ // at most
+ // 64 KB in size. There can be at most 100 secret values across all of
+ // a
+ // build's secrets.
+ SecretEnv map[string]string `json:"secretEnv,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "KmsKeyName") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "KmsKeyName") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Secret) MarshalJSON() ([]byte, error) {
+ type NoMethod Secret
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Source: Location of the source in a supported storage service.
+type Source struct {
+ // RepoSource: If provided, get the source from this location in a Cloud
+ // Source
+ // Repository.
+ RepoSource *RepoSource `json:"repoSource,omitempty"`
+
+ // StorageSource: If provided, get the source from this location in
+ // Google Cloud Storage.
+ StorageSource *StorageSource `json:"storageSource,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "RepoSource") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "RepoSource") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Source) MarshalJSON() ([]byte, error) {
+ type NoMethod Source
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// SourceProvenance: Provenance of the source. Ways to find the original
+// source, or verify that
+// some source was used for this build.
+type SourceProvenance struct {
+ // FileHashes: Output only. Hash(es) of the build source, which can be
+ // used to verify that
+ // the originalsource integrity was maintained in the build. Note
+ // that
+ // `FileHashes` willonly be populated if `BuildOptions` has requested
+ // a
+ // `SourceProvenanceHash`.
+ //
+ // The keys to this map are file paths used as build source and the
+ // values
+ // contain the hash values for those files.
+ //
+ // If the build source came in a single package such as a gzipped
+ // tarfile
+ // (`.tar.gz`), the `FileHash` will be for the single path to that file.
+ FileHashes map[string]FileHashes `json:"fileHashes,omitempty"`
+
+ // ResolvedRepoSource: A copy of the build's `source.repo_source`, if
+ // exists, with any
+ // revisions resolved.
+ ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"`
+
+ // ResolvedStorageSource: A copy of the build's `source.storage_source`,
+ // if exists, with any
+ // generations resolved.
+ ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "FileHashes") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "FileHashes") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *SourceProvenance) MarshalJSON() ([]byte, error) {
+ type NoMethod SourceProvenance
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// StorageSource: Location of the source in an archive file in Google
+// Cloud Storage.
+type StorageSource struct {
+ // Bucket: Google Cloud Storage bucket containing the source
+ // (see
+ // [Bucket
+ // Name
+ // Requirements](https://cloud.google.com/storage/docs/bucket-naming
+ // #requirements)).
+ Bucket string `json:"bucket,omitempty"`
+
+ // Generation: Google Cloud Storage generation for the object. If the
+ // generation is
+ // omitted, the latest generation will be used.
+ Generation int64 `json:"generation,omitempty,string"`
+
+ // Object: Google Cloud Storage object containing the source.
+ //
+ // This object must be a gzipped archive file (`.tar.gz`) containing
+ // source to
+ // build.
+ Object string `json:"object,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Bucket") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Bucket") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *StorageSource) MarshalJSON() ([]byte, error) {
+ type NoMethod StorageSource
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// TimeSpan: Start and end times for a build execution phase.
+type TimeSpan struct {
+ // EndTime: End of time span.
+ EndTime string `json:"endTime,omitempty"`
+
+ // StartTime: Start of time span.
+ StartTime string `json:"startTime,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "EndTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "EndTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TimeSpan) MarshalJSON() ([]byte, error) {
+ type NoMethod TimeSpan
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Volume: Volume describes a Docker container volume which is mounted
+// into build steps
+// in order to persist files across build step execution.
+type Volume struct {
+ // Name: Name of the volume to mount.
+ //
+ // Volume names must be unique per build step and must be valid names
+ // for
+ // Docker volumes. Each named volume must be used by at least two build
+ // steps.
+ Name string `json:"name,omitempty"`
+
+ // Path: Path at which to mount the volume.
+ //
+ // Paths must be absolute and cannot conflict with other volume paths on
+ // the
+ // same build step or with certain reserved volume paths.
+ Path string `json:"path,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Name") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Name") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Volume) MarshalJSON() ([]byte, error) {
+ type NoMethod Volume
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// WorkerConfig: WorkerConfig defines the configuration to be used for a
+// creating workers in
+// the pool.
+type WorkerConfig struct {
+ // DiskSizeGb: Size of the disk attached to the worker, in GB.
+ // See https://cloud.google.com/compute/docs/disks/
+ // If `0` is specified, Cloud Build will use a standard disk
+ // size.
+ // `disk_size` is overridden if you specify a different disk size
+ // in
+ // `build_options`. In this case, a VM with a disk size specified in
+ // the
+ // `build_options` will be created on demand at build time. For
+ // more
+ // information
+ // see
+ // https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/pr
+ // ojects.builds#buildoptions
+ DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
+
+ // MachineType: Machine Type of the worker, such as n1-standard-1.
+ // See https://cloud.google.com/compute/docs/machine-types.
+ // If left blank, Cloud Build will use a standard unspecified machine
+ // to
+ // create the worker pool.
+ // `machine_type` is overridden if you specify a different machine type
+ // in
+ // `build_options`. In this case, the VM specified in the
+ // `build_options`
+ // will be created on demand at build time. For more information
+ // see
+ // https://cloud.google.com/cloud-build/docs/speeding-up-builds#using
+ // _custom_virtual_machine_sizes
+ MachineType string `json:"machineType,omitempty"`
+
+ // Network: The network definition used to create the worker.
+ // If this section is left empty, the workers will be created
+ // in
+ // WorkerPool.project_id on the default network.
+ Network *Network `json:"network,omitempty"`
+
+ // Tag: The tag applied to the worker, and the same tag used by the
+ // firewall rule.
+ // It is used to identify the Cloud Build workers among other VMs.
+ // The default value for tag is `worker`.
+ Tag string `json:"tag,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DiskSizeGb") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *WorkerConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod WorkerConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// WorkerPool: Configuration for a WorkerPool to run the
+// builds.
+//
+// Workers are machines that Cloud Build uses to run your builds. By
+// default,
+// all workers run in a project owned by Cloud Build. To have full
+// control over
+// the workers that execute your builds -- such as enabling them to
+// access
+// private resources on your private network -- you can request Cloud
+// Build to
+// run the workers in your own project by creating a custom workers
+// pool.
+type WorkerPool struct {
+ // CreateTime: Output only. Time at which the request to create the
+ // `WorkerPool` was
+ // received.
+ CreateTime string `json:"createTime,omitempty"`
+
+ // DeleteTime: Output only. Time at which the request to delete the
+ // `WorkerPool` was
+ // received.
+ DeleteTime string `json:"deleteTime,omitempty"`
+
+ // Name: User-defined name of the `WorkerPool`.
+ Name string `json:"name,omitempty"`
+
+ // ProjectId: The project ID of the GCP project in which the
+ // `WorkerPool` is created.
+ ProjectId string `json:"projectId,omitempty"`
+
+ // Regions: List of regions to create the `WorkerPool`. Regions can’t
+ // be empty.
+ // If Cloud Build adds a new GCP region in the future, the
+ // existing
+ // `WorkerPool` will not be enabled in the new region automatically;
+ // you must add the new region to the `regions` field to enable
+ // the
+ // `WorkerPool` in that region.
+ //
+ // Possible values:
+ // "REGION_UNSPECIFIED" - no region
+ // "US_CENTRAL_1" - us-central-1 region
+ // "US_WEST_1" - us-west-1 region
+ // "US_EAST_1" - us-east-1 region
+ // "US_EAST_4" - us-east-4 region
+ Regions []string `json:"regions,omitempty"`
+
+ // ServiceAccountEmail: Output only. The service account used to manage
+ // the `WorkerPool`. The
+ // service account must have the Compute Instance Admin (Beta)
+ // permission at
+ // the project level.
+ ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
+
+ // Status: Output only. WorkerPool Status.
+ //
+ // Possible values:
+ // "STATUS_UNSPECIFIED" - Status of the `WorkerPool` is unknown.
+ // "CREATING" - `WorkerPool` is being created.
+ // "RUNNING" - `WorkerPool` is running.
+ // "DELETING" - `WorkerPool` is being deleting: cancelling builds and
+ // draining workers.
+ // "DELETED" - `WorkerPool` is deleted.
+ Status string `json:"status,omitempty"`
+
+ // UpdateTime: Output only. Time at which the request to update the
+ // `WorkerPool` was
+ // received.
+ UpdateTime string `json:"updateTime,omitempty"`
+
+ // WorkerConfig: Configuration to be used for a creating workers in the
+ // `WorkerPool`.
+ WorkerConfig *WorkerConfig `json:"workerConfig,omitempty"`
+
+ // WorkerCount: Total number of workers to be created across all
+ // requested regions.
+ WorkerCount int64 `json:"workerCount,omitempty,string"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CreateTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CreateTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *WorkerPool) MarshalJSON() ([]byte, error) {
+ type NoMethod WorkerPool
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// method id "cloudbuild.projects.workerPools.create":
+
+type ProjectsWorkerPoolsCreateCall struct {
+ s *Service
+ parent string
+ workerpool *WorkerPool
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Create: Creates a `WorkerPool` to run the builds, and returns the new
+// worker pool.
+//
+// This API is experimental.
+func (r *ProjectsWorkerPoolsService) Create(parent string, workerpool *WorkerPool) *ProjectsWorkerPoolsCreateCall {
+ c := &ProjectsWorkerPoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.parent = parent
+ c.workerpool = workerpool
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsWorkerPoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsCreateCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsWorkerPoolsCreateCall) Context(ctx context.Context) *ProjectsWorkerPoolsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsWorkerPoolsCreateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsWorkerPoolsCreateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/workerPools")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "parent": c.parent,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudbuild.projects.workerPools.create" call.
+// Exactly one of *WorkerPool or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *WorkerPool.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *ProjectsWorkerPoolsCreateCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &WorkerPool{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a `WorkerPool` to run the builds, and returns the new worker pool.\n\nThis API is experimental.",
+ // "flatPath": "v1alpha1/projects/{projectsId}/workerPools",
+ // "httpMethod": "POST",
+ // "id": "cloudbuild.projects.workerPools.create",
+ // "parameterOrder": [
+ // "parent"
+ // ],
+ // "parameters": {
+ // "parent": {
+ // "description": "ID of the parent project.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1alpha1/{+parent}/workerPools",
+ // "request": {
+ // "$ref": "WorkerPool"
+ // },
+ // "response": {
+ // "$ref": "WorkerPool"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudbuild.projects.workerPools.delete":
+
+type ProjectsWorkerPoolsDeleteCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes a `WorkerPool` by its project ID and WorkerPool
+// ID.
+//
+// This API is experimental.
+func (r *ProjectsWorkerPoolsService) Delete(name string) *ProjectsWorkerPoolsDeleteCall {
+ c := &ProjectsWorkerPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsWorkerPoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsWorkerPoolsDeleteCall) Context(ctx context.Context) *ProjectsWorkerPoolsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsWorkerPoolsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsWorkerPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudbuild.projects.workerPools.delete" call.
+// Exactly one of *Empty or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Empty.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsWorkerPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Empty{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Deletes a `WorkerPool` by its project ID and WorkerPool ID.\n\nThis API is experimental.",
+ // "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}",
+ // "httpMethod": "DELETE",
+ // "id": "cloudbuild.projects.workerPools.delete",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The field will contain name of the resource requested, for example:\n\"projects/project-1/workerPools/workerpool-name\"",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/workerPools/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1alpha1/{+name}",
+ // "response": {
+ // "$ref": "Empty"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudbuild.projects.workerPools.get":
+
+type ProjectsWorkerPoolsGetCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Returns information about a `WorkerPool`.
+//
+// This API is experimental.
+func (r *ProjectsWorkerPoolsService) Get(name string) *ProjectsWorkerPoolsGetCall {
+ c := &ProjectsWorkerPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsWorkerPoolsGetCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProjectsWorkerPoolsGetCall) IfNoneMatch(entityTag string) *ProjectsWorkerPoolsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsWorkerPoolsGetCall) Context(ctx context.Context) *ProjectsWorkerPoolsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsWorkerPoolsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsWorkerPoolsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudbuild.projects.workerPools.get" call.
+// Exactly one of *WorkerPool or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *WorkerPool.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *ProjectsWorkerPoolsGetCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &WorkerPool{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns information about a `WorkerPool`.\n\nThis API is experimental.",
+ // "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}",
+ // "httpMethod": "GET",
+ // "id": "cloudbuild.projects.workerPools.get",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The field will contain name of the resource requested, for example:\n\"projects/project-1/workerPools/workerpool-name\"",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/workerPools/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1alpha1/{+name}",
+ // "response": {
+ // "$ref": "WorkerPool"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudbuild.projects.workerPools.list":
+
+type ProjectsWorkerPoolsListCall struct {
+ s *Service
+ parent string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: List project's `WorkerPool`s.
+//
+// This API is experimental.
+func (r *ProjectsWorkerPoolsService) List(parent string) *ProjectsWorkerPoolsListCall {
+ c := &ProjectsWorkerPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.parent = parent
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsWorkerPoolsListCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProjectsWorkerPoolsListCall) IfNoneMatch(entityTag string) *ProjectsWorkerPoolsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsWorkerPoolsListCall) Context(ctx context.Context) *ProjectsWorkerPoolsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsWorkerPoolsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsWorkerPoolsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/workerPools")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "parent": c.parent,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudbuild.projects.workerPools.list" call.
+// Exactly one of *ListWorkerPoolsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *ListWorkerPoolsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsWorkerPoolsListCall) Do(opts ...googleapi.CallOption) (*ListWorkerPoolsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ListWorkerPoolsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "List project's `WorkerPool`s.\n\nThis API is experimental.",
+ // "flatPath": "v1alpha1/projects/{projectsId}/workerPools",
+ // "httpMethod": "GET",
+ // "id": "cloudbuild.projects.workerPools.list",
+ // "parameterOrder": [
+ // "parent"
+ // ],
+ // "parameters": {
+ // "parent": {
+ // "description": "ID of the parent project.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1alpha1/{+parent}/workerPools",
+ // "response": {
+ // "$ref": "ListWorkerPoolsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudbuild.projects.workerPools.patch":
+
+type ProjectsWorkerPoolsPatchCall struct {
+ s *Service
+ name string
+ workerpool *WorkerPool
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Patch: Update a `WorkerPool`.
+//
+// This API is experimental.
+func (r *ProjectsWorkerPoolsService) Patch(name string, workerpool *WorkerPool) *ProjectsWorkerPoolsPatchCall {
+ c := &ProjectsWorkerPoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.workerpool = workerpool
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsWorkerPoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsPatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsWorkerPoolsPatchCall) Context(ctx context.Context) *ProjectsWorkerPoolsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsWorkerPoolsPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsWorkerPoolsPatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PATCH", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudbuild.projects.workerPools.patch" call.
+// Exactly one of *WorkerPool or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *WorkerPool.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *ProjectsWorkerPoolsPatchCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &WorkerPool{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Update a `WorkerPool`.\n\nThis API is experimental.",
+ // "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}",
+ // "httpMethod": "PATCH",
+ // "id": "cloudbuild.projects.workerPools.patch",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The field will contain name of the resource requested, for example:\n\"projects/project-1/workerPools/workerpool-name\"",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/workerPools/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1alpha1/{+name}",
+ // "request": {
+ // "$ref": "WorkerPool"
+ // },
+ // "response": {
+ // "$ref": "WorkerPool"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
diff --git a/cloudkms/v1/cloudkms-api.json b/cloudkms/v1/cloudkms-api.json
index a43fedd..b6063ef 100644
--- a/cloudkms/v1/cloudkms-api.json
+++ b/cloudkms/v1/cloudkms-api.json
@@ -935,6 +935,91 @@
}
}
}
+ },
+ "importJobs": {
+ "methods": {
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
+ "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/importJobs/{importJobsId}:getIamPolicy",
+ "httpMethod": "GET",
+ "id": "cloudkms.projects.locations.keyRings.importJobs.getIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/importJobs/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
+ "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/importJobs/{importJobsId}:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "cloudkms.projects.locations.keyRings.importJobs.setIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/importJobs/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
+ "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/importJobs/{importJobsId}:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "cloudkms.projects.locations.keyRings.importJobs.testIamPermissions",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/importJobs/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ }
}
}
}
@@ -943,7 +1028,7 @@
}
}
},
- "revision": "20181113",
+ "revision": "20181210",
"rootUrl": "https://cloudkms.googleapis.com/",
"schemas": {
"AsymmetricDecryptRequest": {
diff --git a/cloudkms/v1/cloudkms-gen.go b/cloudkms/v1/cloudkms-gen.go
index fcda1cd..113c59d 100644
--- a/cloudkms/v1/cloudkms-gen.go
+++ b/cloudkms/v1/cloudkms-gen.go
@@ -109,6 +109,7 @@
func NewProjectsLocationsKeyRingsService(s *Service) *ProjectsLocationsKeyRingsService {
rs := &ProjectsLocationsKeyRingsService{s: s}
rs.CryptoKeys = NewProjectsLocationsKeyRingsCryptoKeysService(s)
+ rs.ImportJobs = NewProjectsLocationsKeyRingsImportJobsService(s)
return rs
}
@@ -116,6 +117,8 @@
s *Service
CryptoKeys *ProjectsLocationsKeyRingsCryptoKeysService
+
+ ImportJobs *ProjectsLocationsKeyRingsImportJobsService
}
func NewProjectsLocationsKeyRingsCryptoKeysService(s *Service) *ProjectsLocationsKeyRingsCryptoKeysService {
@@ -139,6 +142,15 @@
s *Service
}
+func NewProjectsLocationsKeyRingsImportJobsService(s *Service) *ProjectsLocationsKeyRingsImportJobsService {
+ rs := &ProjectsLocationsKeyRingsImportJobsService{s: s}
+ return rs
+}
+
+type ProjectsLocationsKeyRingsImportJobsService struct {
+ s *Service
+}
+
// AsymmetricDecryptRequest: Request message for
// KeyManagementService.AsymmetricDecrypt.
type AsymmetricDecryptRequest struct {
@@ -5947,3 +5959,439 @@
// }
}
+
+// method id "cloudkms.projects.locations.keyRings.importJobs.getIamPolicy":
+
+type ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall struct {
+ s *Service
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource.
+// Returns an empty policy if the resource exists and does not have a
+// policy
+// set.
+func (r *ProjectsLocationsKeyRingsImportJobsService) GetIamPolicy(resource string) *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall {
+ c := &ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudkms.projects.locations.keyRings.importJobs.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsLocationsKeyRingsImportJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
+ // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/importJobs/{importJobsId}:getIamPolicy",
+ // "httpMethod": "GET",
+ // "id": "cloudkms.projects.locations.keyRings.importJobs.getIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/importJobs/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudkms.projects.locations.keyRings.importJobs.setIamPolicy":
+
+type ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall struct {
+ s *Service
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any
+// existing policy.
+func (r *ProjectsLocationsKeyRingsImportJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall {
+ c := &ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.setiampolicyrequest = setiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudkms.projects.locations.keyRings.importJobs.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsLocationsKeyRingsImportJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
+ // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/importJobs/{importJobsId}:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "cloudkms.projects.locations.keyRings.importJobs.setIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/importJobs/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudkms.projects.locations.keyRings.importJobs.testIamPermissions":
+
+type ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall struct {
+ s *Service
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+// If the resource does not exist, this will return an empty set
+// of
+// permissions, not a NOT_FOUND error.
+//
+// Note: This operation is designed to be used for building
+// permission-aware
+// UIs and command-line tools, not for authorization checking. This
+// operation
+// may "fail open" without warning.
+func (r *ProjectsLocationsKeyRingsImportJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall {
+ c := &ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.testiampermissionsrequest = testiampermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudkms.projects.locations.keyRings.importJobs.testIamPermissions" call.
+// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsLocationsKeyRingsImportJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestIamPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
+ // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/importJobs/{importJobsId}:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "cloudkms.projects.locations.keyRings.importJobs.testIamPermissions",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/importJobs/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json
index 03873c4..7a10950 100644
--- a/cloudsearch/v1/cloudsearch-api.json
+++ b/cloudsearch/v1/cloudsearch-api.json
@@ -1429,7 +1429,7 @@
}
}
},
- "revision": "20181120",
+ "revision": "20181203",
"rootUrl": "https://cloudsearch.googleapis.com/",
"schemas": {
"BooleanOperatorOptions": {
@@ -1795,7 +1795,8 @@
"AUDIO",
"VIDEO",
"FOLDER",
- "ARCHIVE"
+ "ARCHIVE",
+ "SITE"
],
"enumDescriptions": [
"",
@@ -1811,6 +1812,7 @@
"",
"",
"",
+ "",
""
],
"type": "string"
@@ -2071,7 +2073,7 @@
"type": "string"
},
"freshnessProperty": {
- "description": "This property indicates the freshness level of the object in the index.\nIf set, this property must be a top-level property within the\nPropertyDefinitions\nand it must be a\ntimestamp type\nor\ndate type.\nOtherwise, the Indexing API uses\nupdateTime\nas the freshness indicator.\nThe maximum length is 256 characters.",
+ "description": "This property indicates the freshness level of the object in the index.\nIf set, this property must be a top-level property within the\nproperty definitions\nand it must be a\ntimestamp type\nor\ndate type.\nOtherwise, the Indexing API uses\nupdateTime\nas the freshness indicator.\nThe maximum length is 256 characters.",
"type": "string"
}
},
diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go
index 68925be..6563c1d 100644
--- a/cloudsearch/v1/cloudsearch-gen.go
+++ b/cloudsearch/v1/cloudsearch-gen.go
@@ -1146,6 +1146,7 @@
// "VIDEO"
// "FOLDER"
// "ARCHIVE"
+ // "SITE"
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Type") to
@@ -1783,7 +1784,7 @@
// object in the index.
// If set, this property must be a top-level property within
// the
- // PropertyDefinitions
+ // property definitions
// and it must be a
// timestamp type
// or
diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json
index eea9cfe..c219319 100644
--- a/compute/v0.alpha/compute-api.json
+++ b/compute/v0.alpha/compute-api.json
@@ -29,7 +29,7 @@
"description": "Creates and runs virtual machines on Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/compute/docs/reference/latest/",
- "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/vjfQ3Uqn-NRNnRjnJeJ37MKQuiM\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/QH7fzrKsRY3nc45UgS6oL1HCzmU\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/compute_engine-16.png",
"x32": "https://www.google.com/images/icons/product/compute_engine-32.png"
@@ -505,9 +505,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -1973,7 +1973,7 @@
]
},
"get": {
- "description": "Returns the specified BackendService resource. Gets a list of available backend services by making a list() request.",
+ "description": "Returns the specified BackendService resource. Gets a list of available backend services.",
"httpMethod": "GET",
"id": "compute.backendServices.get",
"parameterOrder": [
@@ -2452,7 +2452,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2550,7 +2550,7 @@
"disk": {
"description": "Name of the persistent disk to snapshot.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2835,7 +2835,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2884,7 +2884,7 @@
"disk": {
"description": "The name of the persistent disk.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2987,9 +2987,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -3653,9 +3653,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -3941,9 +3941,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -4213,9 +4213,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -5543,7 +5543,7 @@
"image": {
"description": "Name of the image resource to delete.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5581,7 +5581,7 @@
"image": {
"description": "Image name.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5656,7 +5656,7 @@
"family": {
"description": "Name of the image family to search for.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5855,9 +5855,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -6053,6 +6053,53 @@
"https://www.googleapis.com/auth/compute"
]
},
+ "createInstances": {
+ "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.",
+ "httpMethod": "POST",
+ "id": "compute.instanceGroupManagers.createInstances",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "instanceGroupManager"
+ ],
+ "parameters": {
+ "instanceGroupManager": {
+ "description": "The name of the managed instance group. It should conform to RFC1035.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances",
+ "request": {
+ "$ref": "InstanceGroupManagersCreateInstancesRequest"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"delete": {
"description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.",
"httpMethod": "DELETE",
@@ -6642,7 +6689,7 @@
]
},
"setAutoHealingPolicies": {
- "description": "Modifies the autohealing policies.",
+ "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.",
"httpMethod": "POST",
"id": "compute.instanceGroupManagers.setAutoHealingPolicies",
"parameterOrder": [
@@ -7689,7 +7736,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7744,7 +7791,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7847,7 +7894,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7950,7 +7997,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8001,15 +8048,15 @@
],
"parameters": {
"deviceName": {
- "description": "Disk device name to detach.",
+ "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.",
"location": "query",
"required": true,
"type": "string"
},
"instance": {
- "description": "Instance name.",
+ "description": "Instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8097,7 +8144,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8191,7 +8238,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8248,7 +8295,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8403,7 +8450,7 @@
"instance": {
"description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.",
"location": "path",
- "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8463,7 +8510,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8512,7 +8559,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8558,7 +8605,7 @@
"instance": {
"description": "Name of the instance resource to resume.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8623,9 +8670,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8665,16 +8712,16 @@
"type": "boolean"
},
"deviceName": {
- "description": "The device name of the disk to modify.",
+ "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.",
"location": "query",
"pattern": "\\w[\\w.-]{0,254}",
"required": true,
"type": "string"
},
"instance": {
- "description": "The instance name.",
+ "description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8764,7 +8811,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8813,7 +8860,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8862,7 +8909,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8911,7 +8958,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8960,7 +9007,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9007,9 +9054,9 @@
],
"parameters": {
"instance": {
- "description": "Instance name.",
+ "description": "Instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9058,7 +9105,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9107,7 +9154,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9156,7 +9203,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9205,7 +9252,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9246,7 +9293,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9292,7 +9339,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9346,7 +9393,7 @@
"instance": {
"description": "Name of the instance resource to stop.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9397,7 +9444,7 @@
"instance": {
"description": "Name of the instance resource to suspend.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9489,7 +9536,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9531,6 +9578,55 @@
"https://www.googleapis.com/auth/compute"
]
},
+ "updateDisplayDevice": {
+ "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ "httpMethod": "PATCH",
+ "id": "compute.instances.updateDisplayDevice",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "instance"
+ ],
+ "parameters": {
+ "instance": {
+ "description": "Name of the instance scoping this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice",
+ "request": {
+ "$ref": "DisplayDevice"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"updateNetworkInterface": {
"description": "Updates an instance's network interface. This method follows PATCH semantics.",
"httpMethod": "PATCH",
@@ -9545,7 +9641,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -9600,7 +9696,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -10040,9 +10136,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -10548,9 +10644,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -12515,7 +12611,7 @@
],
"parameters": {
"nodeGroup": {
- "description": "Name of the NodeGroup resource to delete.",
+ "description": "Name of the NodeGroup resource.",
"location": "path",
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
"required": true,
@@ -13614,6 +13710,377 @@
}
}
},
+ "organizationSecurityPolicies": {
+ "methods": {
+ "addAssociation": {
+ "description": "Inserts an association for the specified security policy.",
+ "httpMethod": "POST",
+ "id": "compute.organizationSecurityPolicies.addAssociation",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to update.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}/addAssociation",
+ "request": {
+ "$ref": "SecurityPolicyAssociation"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "addRule": {
+ "description": "Inserts a rule into a security policy.",
+ "httpMethod": "POST",
+ "id": "compute.organizationSecurityPolicies.addRule",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to update.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}/addRule",
+ "request": {
+ "$ref": "SecurityPolicyRule"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "delete": {
+ "description": "Deletes the specified policy.",
+ "httpMethod": "DELETE",
+ "id": "compute.organizationSecurityPolicies.delete",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to delete.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}",
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "get": {
+ "description": "List all of the ordered rules present in a single specified policy.",
+ "httpMethod": "GET",
+ "id": "compute.organizationSecurityPolicies.get",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "securityPolicy": {
+ "description": "Name of the security policy to get.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}",
+ "response": {
+ "$ref": "SecurityPolicy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "getAssociation": {
+ "description": "Gets an association with the specified name.",
+ "httpMethod": "GET",
+ "id": "compute.organizationSecurityPolicies.getAssociation",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The name of the association to get from the security policy.",
+ "location": "query",
+ "type": "string"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to which the queried rule belongs.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}/getAssociation",
+ "response": {
+ "$ref": "SecurityPolicyAssociation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "getRule": {
+ "description": "Gets a rule at the specified priority.",
+ "httpMethod": "GET",
+ "id": "compute.organizationSecurityPolicies.getRule",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "priority": {
+ "description": "The priority of the rule to get from the security policy.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to which the queried rule belongs.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}/getRule",
+ "response": {
+ "$ref": "SecurityPolicyRule"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "insert": {
+ "description": "Creates a new policy in the specified project using the data included in the request.",
+ "httpMethod": "POST",
+ "id": "compute.organizationSecurityPolicies.insert",
+ "parameters": {
+ "parentId": {
+ "description": "Parent ID for this request.",
+ "location": "query",
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies",
+ "request": {
+ "$ref": "SecurityPolicy"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "list": {
+ "description": "List all the policies that have been configured for the specified project.",
+ "httpMethod": "GET",
+ "id": "compute.organizationSecurityPolicies.list",
+ "parameters": {
+ "filter": {
+ "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ "location": "query",
+ "type": "string"
+ },
+ "maxResults": {
+ "default": "500",
+ "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ "format": "uint32",
+ "location": "query",
+ "minimum": "0",
+ "type": "integer"
+ },
+ "orderBy": {
+ "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ "location": "query",
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ "location": "query",
+ "type": "string"
+ },
+ "parentId": {
+ "description": "Parent ID for this request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies",
+ "response": {
+ "$ref": "SecurityPolicyList"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "patchRule": {
+ "description": "Patches a rule at the specified priority.",
+ "httpMethod": "POST",
+ "id": "compute.organizationSecurityPolicies.patchRule",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "priority": {
+ "description": "The priority of the rule to patch.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to update.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}/patchRule",
+ "request": {
+ "$ref": "SecurityPolicyRule"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "removeAssociation": {
+ "description": "Removes an association for the specified security policy.",
+ "httpMethod": "POST",
+ "id": "compute.organizationSecurityPolicies.removeAssociation",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "name": {
+ "description": "Name for the attachment that will be removed.",
+ "location": "query",
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to update.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}/removeAssociation",
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "removeRule": {
+ "description": "Deletes a rule at the specified priority.",
+ "httpMethod": "POST",
+ "id": "compute.organizationSecurityPolicies.removeRule",
+ "parameterOrder": [
+ "securityPolicy"
+ ],
+ "parameters": {
+ "priority": {
+ "description": "The priority of the rule to remove from the security policy.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "securityPolicy": {
+ "description": "Name of the security policy to update.",
+ "location": "path",
+ "pattern": "[0-9]{0,20}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "locations/global/securityPolicies/{securityPolicy}/removeRule",
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ }
+ }
+ },
"projects": {
"methods": {
"disableXpnHost": {
@@ -15157,7 +15624,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -15206,7 +15673,7 @@
"disk": {
"description": "Name of the regional persistent disk to snapshot.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -15304,7 +15771,7 @@
"disk": {
"description": "Name of the regional persistent disk to return.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -15449,7 +15916,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -15498,7 +15965,7 @@
"disk": {
"description": "Name of the regional persistent disk.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -15564,9 +16031,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -16597,7 +17064,7 @@
]
},
"setAutoHealingPolicies": {
- "description": "Modifies the autohealing policy for the instances in this managed instance group.",
+ "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.",
"httpMethod": "POST",
"id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies",
"parameterOrder": [
@@ -20217,9 +20684,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -20278,7 +20745,7 @@
"snapshots": {
"methods": {
"delete": {
- "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.",
+ "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.",
"httpMethod": "DELETE",
"id": "compute.snapshots.delete",
"parameterOrder": [
@@ -20301,7 +20768,7 @@
"snapshot": {
"description": "Name of the Snapshot resource to delete.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -20485,9 +20952,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -21447,7 +21914,7 @@
]
},
"patch": {
- "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range, allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.",
+ "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.",
"httpMethod": "PATCH",
"id": "compute.subnetworks.patch",
"parameterOrder": [
@@ -24098,9 +24565,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -24834,9 +25301,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -25167,9 +25634,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -25504,7 +25971,7 @@
}
}
},
- "revision": "20181022",
+ "revision": "20181128",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@@ -26006,7 +26473,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an Address.",
+ "description": "A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an Address.",
"format": "byte",
"type": "string"
},
@@ -26032,7 +26499,7 @@
"type": "string"
},
"networkTier": {
- "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM , STANDARD.\n\nIf this field is not specified, it is assumed to be PREMIUM.",
+ "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.",
"enum": [
"PREMIUM",
"SELECT",
@@ -26056,14 +26523,12 @@
"DNS_RESOLVER",
"GCE_ENDPOINT",
"NAT_AUTO",
- "UNSPECIFIED_PURPOSE",
"VPC_PEERING"
],
"enumDescriptions": [
"",
"",
"",
- "",
""
],
"type": "string"
@@ -26480,7 +26945,7 @@
"$ref": "AllocationSpecificSKUAllocation"
},
"specificAllocationRequired": {
- "description": "Indicates whether the allocation can be consumed by VMs with ?any allocation? defined. If the field is set, then only VMs that target the allocation by name using --allocation-affinity can consume this allocation.",
+ "description": "Indicates whether the allocation can be consumed by VMs with \"any allocation\" defined. If the field is set, then only VMs that target the allocation by name using --allocation-affinity can consume this allocation.",
"type": "boolean"
},
"zone": {
@@ -27710,7 +28175,7 @@
"type": "number"
},
"utilizationTargetType": {
- "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.",
+ "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.",
"enum": [
"DELTA_PER_MINUTE",
"DELTA_PER_SECOND",
@@ -27898,7 +28363,7 @@
"id": "BackendBucketCdnPolicy",
"properties": {
"signedUrlCacheMaxAgeSec": {
- "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
+ "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
"format": "int64",
"type": "string"
},
@@ -28078,7 +28543,7 @@
"$ref": "BackendServiceFailoverPolicy"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.",
"format": "byte",
"type": "string"
},
@@ -28120,6 +28585,10 @@
],
"type": "string"
},
+ "logConfig": {
+ "$ref": "BackendServiceLogConfig",
+ "description": "This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver."
+ },
"name": {
"description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.",
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
@@ -28333,7 +28802,7 @@
"description": "The CacheKeyPolicy for this CdnPolicy."
},
"signedUrlCacheMaxAgeSec": {
- "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
+ "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
"format": "int64",
"type": "string"
},
@@ -28560,6 +29029,22 @@
},
"type": "object"
},
+ "BackendServiceLogConfig": {
+ "description": "The available logging options for the load balancer traffic served by this backend service.",
+ "id": "BackendServiceLogConfig",
+ "properties": {
+ "enable": {
+ "description": "This field denotes whether to enable logging for the load balancer traffic served by this backend service.",
+ "type": "boolean"
+ },
+ "sampleRate": {
+ "description": "This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
"BackendServiceReference": {
"id": "BackendServiceReference",
"properties": {
@@ -29359,7 +29844,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.",
+ "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.",
"format": "byte",
"type": "string"
},
@@ -29408,7 +29893,7 @@
"type": "string"
},
"physicalBlockSizeBytes": {
- "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Initially only 4096 is supported, but other powers of two may be added. If an unsupported value is requested, the error message will list the supported values, but even a supported value may be allowed for only some projects.",
+ "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.",
"format": "int64",
"type": "string"
},
@@ -30292,6 +30777,17 @@
},
"type": "object"
},
+ "DisplayDevice": {
+ "description": "A set of Display Device options",
+ "id": "DisplayDevice",
+ "properties": {
+ "enableDisplay": {
+ "description": "Defines whether the instance has Display enabled.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"DistributionPolicy": {
"id": "DistributionPolicy",
"properties": {
@@ -30568,7 +31064,7 @@
"type": "boolean"
},
"enableLogging": {
- "description": "This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.",
+ "description": "Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.",
"type": "boolean"
},
"id": {
@@ -30581,6 +31077,10 @@
"description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.",
"type": "string"
},
+ "logConfig": {
+ "$ref": "FirewallLogConfig",
+ "description": "This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver."
+ },
"name": {
"annotations": {
"required": [
@@ -30755,6 +31255,17 @@
},
"type": "object"
},
+ "FirewallLogConfig": {
+ "description": "The available logging options for a firewall rule.",
+ "id": "FirewallLogConfig",
+ "properties": {
+ "enable": {
+ "description": "This field denotes whether to enable logging for a particular firewall rule.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"FixedOrPercent": {
"description": "Encapsulates numeric value that can be either absolute or relative.",
"id": "FixedOrPercent",
@@ -30855,7 +31366,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this resource, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a ForwardingRule.",
+ "description": "A fingerprint for the labels being applied to this resource, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a ForwardingRule.",
"format": "byte",
"type": "string"
},
@@ -30912,7 +31423,7 @@
"type": "string"
},
"ports": {
- "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.",
+ "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.",
"items": {
"type": "string"
},
@@ -31277,7 +31788,7 @@
"id": "GlobalSetLabelsRequest",
"properties": {
"labelFingerprint": {
- "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a get() request to the resource to get the latest fingerprint.",
+ "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.",
"format": "byte",
"type": "string"
},
@@ -31295,7 +31806,7 @@
"id": "GlobalSetPolicyRequest",
"properties": {
"bindings": {
- "description": "Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
"items": {
"$ref": "Binding"
},
@@ -32493,7 +33004,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.",
+ "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.",
"format": "byte",
"type": "string"
},
@@ -32774,6 +33285,10 @@
},
"type": "array"
},
+ "displayDevice": {
+ "$ref": "DisplayDevice",
+ "description": "Enables display device for the instance."
+ },
"guestAccelerators": {
"description": "A list of the type and count of accelerator cards attached to the instance.",
"items": {
@@ -33382,7 +33897,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager.\n\nTo see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.",
+ "description": "Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.",
"format": "byte",
"type": "string"
},
@@ -33964,6 +34479,20 @@
},
"type": "object"
},
+ "InstanceGroupManagersCreateInstancesRequest": {
+ "description": "InstanceGroupManagers.createInstances",
+ "id": "InstanceGroupManagersCreateInstancesRequest",
+ "properties": {
+ "instances": {
+ "description": "[Required] List of specifications of per-instance configs.",
+ "items": {
+ "$ref": "PerInstanceConfig"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
"InstanceGroupManagersDeleteInstancesRequest": {
"id": "InstanceGroupManagersDeleteInstancesRequest",
"properties": {
@@ -33987,6 +34516,13 @@
"type": "string"
},
"type": "array"
+ },
+ "names": {
+ "description": "The list of instance names for which we want to delete per-instance configs on this managed instance group.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
}
},
"type": "object"
@@ -34535,7 +35071,7 @@
"id": "InstanceGroupsSetNamedPortsRequest",
"properties": {
"fingerprint": {
- "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.",
+ "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. A request with an incorrect fingerprint will fail with error 412 conditionNotMet.",
"format": "byte",
"type": "string"
},
@@ -35379,7 +35915,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this Interconnect, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an Interconnect.",
+ "description": "A fingerprint for the labels being applied to this Interconnect, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an Interconnect.",
"format": "byte",
"type": "string"
},
@@ -35472,7 +36008,7 @@
"type": "boolean"
},
"bandwidth": {
- "description": "Provisioned bandwidth capacity for the interconnectAttachment. Can be set by the partner to update the customer's provisioned bandwidth. Output only for for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED.",
+ "description": "Provisioned bandwidth capacity for the interconnectAttachment. Can be set by the partner to update the customer's provisioned bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED.",
"enum": [
"BPS_100M",
"BPS_10G",
@@ -35555,7 +36091,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this InterconnectAttachment, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an InterconnectAttachment.",
+ "description": "A fingerprint for the labels being applied to this InterconnectAttachment, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an InterconnectAttachment.",
"format": "byte",
"type": "string"
},
@@ -35605,7 +36141,7 @@
"type": "string"
},
"router": {
- "description": "URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.",
+ "description": "URL of the Cloud Router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.",
"type": "string"
},
"selfLink": {
@@ -35648,7 +36184,7 @@
"type": "string"
},
"vlanTag8021q": {
- "description": "Available only for DEDICATED and PARTNER_PROVIDER. Desired VLAN tag for this attachment, in the range 2-4094. This field refers to 802.1q VLAN tag, also known as IEEE 802.1Q Only specified at creation time.",
+ "description": "The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. Only specified at creation time.",
"format": "int32",
"type": "integer"
}
@@ -35884,7 +36420,7 @@
"id": "InterconnectAttachmentPartnerMetadata",
"properties": {
"interconnectName": {
- "description": "Plain text name of the Interconnect this attachment is connected to, as displayed in the Partner?s portal. For instance ?Chicago 1?. This value may be validated to match approved Partner values.",
+ "description": "Plain text name of the Interconnect this attachment is connected to, as displayed in the Partner?s portal. For instance \"Chicago 1\". This value may be validated to match approved Partner values.",
"type": "string"
},
"partnerName": {
@@ -36109,7 +36645,7 @@
"type": "string"
},
"value": {
- "description": "Value of the current optical power, read in dBm.",
+ "description": "Value of the current optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.",
"format": "float",
"type": "number"
}
@@ -37258,7 +37794,7 @@
},
"sourceInstanceProperties": {
"$ref": "SourceInstanceProperties",
- "description": "[Output Only] properties of source instance. Currently, input for this field is not supported."
+ "description": "Properties of source instance."
},
"status": {
"description": "[Output Only] The status of disk creation.",
@@ -37869,6 +38405,14 @@
"$ref": "ManagedInstanceOverride",
"description": "[Output Only] Override defined for this instance."
},
+ "preservedStateFromConfig": {
+ "$ref": "PreservedState",
+ "description": "[Output Only] Preserved state applied from per-instance config for this instance."
+ },
+ "preservedStateFromPolicy": {
+ "$ref": "PreservedState",
+ "description": "[Output Only] Preserved state generated based on stateful policy for this instance."
+ },
"tag": {
"description": "[Output Only] Tag describing the version.",
"type": "string"
@@ -38036,7 +38580,7 @@
"id": "Metadata",
"properties": {
"fingerprint": {
- "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make a get() request to retrieve the resource.",
+ "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve the resource.",
"format": "byte",
"type": "string"
},
@@ -38830,7 +39374,7 @@
"type": "array"
},
"fingerprint": {
- "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface.",
+ "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.",
"format": "byte",
"type": "string"
},
@@ -38974,8 +39518,12 @@
"description": "A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.",
"id": "NetworkPeering",
"properties": {
+ "advertisePeerSubnetsViaRouters": {
+ "description": "Whether Cloud Routers in this network can automatically advertise subnets from the peer network.",
+ "type": "boolean"
+ },
"autoCreateRoutes": {
- "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.",
+ "description": "Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.",
"type": "boolean"
},
"exchangeSubnetRoutes": {
@@ -39044,11 +39592,11 @@
"type": "boolean"
},
"exportCustomRoutes": {
- "description": "Whether to export the custom routes to peer network.",
+ "description": "This field will be deprecated soon. Prefer using export_custom_routes in network_peering instead. Whether to export the custom routes to peer network.",
"type": "boolean"
},
"importCustomRoutes": {
- "description": "Whether to import the custom routes from peer network.",
+ "description": "This field will be deprecated soon. Prefer using import_custom_routes in network_peering instead. Whether to import the custom routes from peer network.",
"type": "boolean"
},
"name": {
@@ -39062,7 +39610,7 @@
},
"networkPeering": {
"$ref": "NetworkPeering",
- "description": "Network peering parameters."
+ "description": "Network peering parameters. In order to specify route policies for peering using import/export custom routes, you will have to fill all peering related parameters (name, peer network, exchange_subnet_routes) in network_peeringfield. Corresponding fields in NetworksAddPeeringRequest will be deprecated soon."
},
"peerNetwork": {
"description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.",
@@ -39094,6 +39642,9 @@
"description": "A NodeGroup resource.",
"id": "NodeGroup",
"properties": {
+ "autoscalingPolicy": {
+ "$ref": "NodeGroupAutoscalingPolicy"
+ },
"creationTimestamp": {
"description": "[Output Only] Creation timestamp in RFC3339 text format.",
"type": "string"
@@ -39263,6 +39814,20 @@
},
"type": "object"
},
+ "NodeGroupAutoscalingPolicy": {
+ "id": "NodeGroupAutoscalingPolicy",
+ "properties": {
+ "maxSize": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "minSize": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
"NodeGroupList": {
"description": "Contains a list of nodeGroups.",
"id": "NodeGroupList",
@@ -41034,8 +41599,16 @@
"description": "The URL of the instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same instance URL exists then it will be updated, otherwise a new one will be created.",
"type": "string"
},
+ "name": {
+ "description": "The name of the per-instance config and the corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in a failure.",
+ "type": "string"
+ },
"override": {
"$ref": "ManagedInstanceOverride"
+ },
+ "preservedState": {
+ "$ref": "PreservedState",
+ "description": "Intended preserved state for the given instance. Does not contain state generated based on Stateful Policy."
}
},
"type": "object"
@@ -41095,6 +41668,61 @@
},
"type": "object"
},
+ "PreservedState": {
+ "description": "Preserved state for a given instance.",
+ "id": "PreservedState",
+ "properties": {
+ "disks": {
+ "additionalProperties": {
+ "$ref": "PreservedStatePreservedDisk"
+ },
+ "description": "Preserved disks defined for this instance. This map is keyed with the device names of the disks.",
+ "type": "object"
+ },
+ "metadata": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Preserved metadata defined for this instance.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "PreservedStatePreservedDisk": {
+ "id": "PreservedStatePreservedDisk",
+ "properties": {
+ "autoDelete": {
+ "description": "These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.",
+ "enum": [
+ "NEVER",
+ "WHEN_NOT_IN_USE"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "mode": {
+ "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.",
+ "enum": [
+ "READ_ONLY",
+ "READ_WRITE"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "source": {
+ "description": "The URL of the disk resource that is stateful and should be attached to the VM instance.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Project": {
"description": "A Project resource. For an overview of projects, see Cloud Platform Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)",
"id": "Project",
@@ -41896,6 +42524,13 @@
"type": "string"
},
"type": "array"
+ },
+ "names": {
+ "description": "The list of instance names for which we want to delete per-instance configs on this managed instance group.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
}
},
"type": "object"
@@ -43009,7 +43644,7 @@
"type": "string"
},
"startTime": {
- "description": "Time within the window to start the operations. It must be in format \"HH:MM?, where HH : [00-23] and MM : [00-00] GMT.",
+ "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.",
"type": "string"
}
},
@@ -43029,7 +43664,7 @@
"type": "integer"
},
"startTime": {
- "description": "Time within the window to start the operations. It must be in format \"HH:MM?, where HH : [00-23] and MM : [00-00] GMT.",
+ "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.",
"type": "string"
}
},
@@ -43215,7 +43850,7 @@
"type": "string"
},
"startTime": {
- "description": "Time within the window to start the operations. It must be in format \"HH:MM?, where HH : [00-23] and MM : [00-00] GMT.",
+ "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.",
"type": "string"
}
},
@@ -43748,9 +44383,13 @@
"description": "User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.",
"items": {
"enum": [
- "ALL_SUBNETS"
+ "ALL_PEER_VPC_SUBNETS",
+ "ALL_SUBNETS",
+ "ALL_VPC_SUBNETS"
],
"enumDescriptions": [
+ "",
+ "",
""
],
"type": "string"
@@ -43791,9 +44430,13 @@
"description": "User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in Bgp message). These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.",
"items": {
"enum": [
- "ALL_SUBNETS"
+ "ALL_PEER_VPC_SUBNETS",
+ "ALL_SUBNETS",
+ "ALL_VPC_SUBNETS"
],
"enumDescriptions": [
+ "",
+ "",
""
],
"type": "string"
@@ -43821,7 +44464,7 @@
"type": "string"
},
"managementType": {
- "description": "[Output Only] Type of how the resource/configuration of the BGP peer is managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT represents an BGP peer that is automatically created for PARTNER interconnectAttachment, Google will automatically create/delete this type of BGP peer when the PARTNER interconnectAttachment is created/deleted.",
+ "description": "[Output Only] The resource that configures and manages this BGP peer. MANAGED_BY_USER is the default value and can be managed by you or other users; MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google will automatically create, update, and delete this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.",
"enum": [
"MANAGED_BY_ATTACHMENT",
"MANAGED_BY_USER"
@@ -43865,7 +44508,7 @@
"type": "string"
},
"managementType": {
- "description": "[Output Only] Type of how the resource/configuration of the interface is managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT represents an interface that is automatically created for PARTNER type interconnectAttachment, Google will automatically create/update/delete this type of interface when the PARTNER interconnectAttachment is created/provisioned/deleted.",
+ "description": "[Output Only] The resource that configures and manages this interface. MANAGED_BY_USER is the default value and can be managed by you or other users; MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google will automatically create, update, and delete this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.",
"enum": [
"MANAGED_BY_ATTACHMENT",
"MANAGED_BY_USER"
@@ -44742,7 +45385,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the security policy.",
+ "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make get() request to the security policy.",
"format": "byte",
"type": "string"
},
@@ -44971,7 +45614,7 @@
"type": "boolean"
},
"priority": {
- "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated in the increasing order of priority.",
+ "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.",
"format": "int32",
"type": "integer"
},
@@ -45147,7 +45790,8 @@
"id": "ShieldedVmIdentity",
"properties": {
"encryptionKey": {
- "$ref": "ShieldedVmIdentityEntry"
+ "$ref": "ShieldedVmIdentityEntry",
+ "description": "An Endorsement Key (EK) issued to the Shielded VM's vTPM."
},
"kind": {
"default": "compute#shieldedVmIdentity",
@@ -45155,7 +45799,8 @@
"type": "string"
},
"signingKey": {
- "$ref": "ShieldedVmIdentityEntry"
+ "$ref": "ShieldedVmIdentityEntry",
+ "description": "An Attestation Key (AK) issued to the Shielded VM's vTPM."
}
},
"type": "object"
@@ -45165,9 +45810,11 @@
"id": "ShieldedVmIdentityEntry",
"properties": {
"ekCert": {
+ "description": "A PEM-encoded X.509 certificate. This field can be empty.",
"type": "string"
},
"ekPub": {
+ "description": "A PEM-encoded public key.",
"type": "string"
}
},
@@ -45239,7 +45886,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.",
+ "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.",
"format": "byte",
"type": "string"
},
@@ -46161,7 +46808,7 @@
"type": "array"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy.\n\nTo see the latest fingerprint, make a get() request to retrieve an SslPolicy.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an SslPolicy.",
"format": "byte",
"type": "string"
},
@@ -46316,6 +46963,9 @@
"properties": {
"preservedResources": {
"$ref": "StatefulPolicyPreservedResources"
+ },
+ "preservedState": {
+ "$ref": "StatefulPolicyPreservedState"
}
},
"type": "object"
@@ -46344,6 +46994,38 @@
},
"type": "object"
},
+ "StatefulPolicyPreservedState": {
+ "description": "Configuration of preserved resources.",
+ "id": "StatefulPolicyPreservedState",
+ "properties": {
+ "disks": {
+ "additionalProperties": {
+ "$ref": "StatefulPolicyPreservedStateDiskDevice"
+ },
+ "description": "Disks created on the instances that will be preserved on instance delete, resize down, etc. This map is keyed with the device names of the disks.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "StatefulPolicyPreservedStateDiskDevice": {
+ "id": "StatefulPolicyPreservedStateDiskDevice",
+ "properties": {
+ "autoDelete": {
+ "description": "These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.",
+ "enum": [
+ "NEVER",
+ "WHEN_NOT_IN_USE"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Subnetwork": {
"description": "A Subnetwork resource. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)",
"id": "Subnetwork",
@@ -46389,7 +47071,7 @@
"type": "boolean"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork.\n\nTo see the latest fingerprint, make a get() request to retrieve a Subnetwork.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a Subnetwork.",
"format": "byte",
"type": "string"
},
@@ -46420,6 +47102,10 @@
"description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.",
"type": "string"
},
+ "logConfig": {
+ "$ref": "SubnetworkLogConfig",
+ "description": "This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver."
+ },
"metadata": {
"description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.",
"enum": [
@@ -46464,7 +47150,7 @@
"type": "string"
},
"role": {
- "description": "The role of subnetwork. Currenly, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining.",
+ "description": "The role of subnetwork. Currenly, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.",
"enum": [
"ACTIVE",
"BACKUP"
@@ -46476,7 +47162,7 @@
"type": "string"
},
"secondaryIpRanges": {
- "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.",
+ "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.",
"items": {
"$ref": "SubnetworkSecondaryRange"
},
@@ -46725,6 +47411,54 @@
},
"type": "object"
},
+ "SubnetworkLogConfig": {
+ "description": "The available logging options for this subnetwork.",
+ "id": "SubnetworkLogConfig",
+ "properties": {
+ "aggregationInterval": {
+ "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection.",
+ "enum": [
+ "INTERVAL_10_MIN",
+ "INTERVAL_15_MIN",
+ "INTERVAL_1_MIN",
+ "INTERVAL_30_SEC",
+ "INTERVAL_5_MIN",
+ "INTERVAL_5_SEC"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "enable": {
+ "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging.",
+ "type": "boolean"
+ },
+ "flowSampling": {
+ "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 which means half of all collected logs are reported.",
+ "format": "float",
+ "type": "number"
+ },
+ "metadata": {
+ "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.",
+ "enum": [
+ "EXCLUDE_ALL_METADATA",
+ "INCLUDE_ALL_METADATA"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"SubnetworkSecondaryRange": {
"description": "Represents a secondary IP range of a subnetwork.",
"id": "SubnetworkSecondaryRange",
@@ -48978,7 +49712,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this TargetVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a TargetVpnGateway.",
+ "description": "A fingerprint for the labels being applied to this TargetVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a TargetVpnGateway.",
"format": "byte",
"type": "string"
},
@@ -49444,7 +50178,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap.\n\nTo see the latest fingerprint, make a get() request to retrieve a UrlMap.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a UrlMap.",
"format": "byte",
"type": "string"
},
@@ -50237,7 +50971,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an VpnGateway.",
+ "description": "A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an VpnGateway.",
"format": "byte",
"type": "string"
},
@@ -50651,7 +51385,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a VpnTunnel.",
+ "description": "A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a VpnTunnel.",
"format": "byte",
"type": "string"
},
diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go
index eacf28c..b1a4b88 100644
--- a/compute/v0.alpha/compute-gen.go
+++ b/compute/v0.alpha/compute-gen.go
@@ -110,6 +110,7 @@
s.NodeGroups = NewNodeGroupsService(s)
s.NodeTemplates = NewNodeTemplatesService(s)
s.NodeTypes = NewNodeTypesService(s)
+ s.OrganizationSecurityPolicies = NewOrganizationSecurityPoliciesService(s)
s.Projects = NewProjectsService(s)
s.RegionAutoscalers = NewRegionAutoscalersService(s)
s.RegionBackendServices = NewRegionBackendServicesService(s)
@@ -221,6 +222,8 @@
NodeTypes *NodeTypesService
+ OrganizationSecurityPolicies *OrganizationSecurityPoliciesService
+
Projects *ProjectsService
RegionAutoscalers *RegionAutoscalersService
@@ -605,6 +608,15 @@
s *Service
}
+func NewOrganizationSecurityPoliciesService(s *Service) *OrganizationSecurityPoliciesService {
+ rs := &OrganizationSecurityPoliciesService{s: s}
+ return rs
+}
+
+type OrganizationSecurityPoliciesService struct {
+ s *Service
+}
+
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
return rs
@@ -1602,7 +1614,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// Address.
@@ -1627,8 +1640,12 @@
Network string `json:"network,omitempty"`
// NetworkTier: This signifies the networking tier used for configuring
- // this Address and can only take the following values: PREMIUM ,
- // STANDARD.
+ // this Address and can only take the following values: PREMIUM,
+ // STANDARD. Global forwarding rules can only be Premium Tier. Regional
+ // forwarding rules can be either Premium or Standard Tier. Standard
+ // Tier addresses applied to regional forwarding rules can be used with
+ // any external load balancer. Regional forwarding rules in Premium Tier
+ // can only be used with a Network load balancer.
//
// If this field is not specified, it is assumed to be PREMIUM.
//
@@ -1648,7 +1665,6 @@
// "DNS_RESOLVER"
// "GCE_ENDPOINT"
// "NAT_AUTO"
- // "UNSPECIFIED_PURPOSE"
// "VPC_PEERING"
Purpose string `json:"purpose,omitempty"`
@@ -2230,7 +2246,7 @@
SpecificAllocation *AllocationSpecificSKUAllocation `json:"specificAllocation,omitempty"`
// SpecificAllocationRequired: Indicates whether the allocation can be
- // consumed by VMs with ?any allocation? defined. If the field is set,
+ // consumed by VMs with "any allocation" defined. If the field is set,
// then only VMs that target the allocation by name using
// --allocation-affinity can consume this allocation.
SpecificAllocationRequired bool `json:"specificAllocationRequired,omitempty"`
@@ -4123,8 +4139,7 @@
// UtilizationTargetType: Defines how target utilization value is
// expressed for a Stackdriver Monitoring metric. Either GAUGE,
- // DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default
- // is GAUGE.
+ // DELTA_PER_SECOND, or DELTA_PER_MINUTE.
//
// Possible values:
// "DELTA_PER_MINUTE"
@@ -4549,7 +4564,7 @@
// the response will be revalidated before being served. Defaults to 1hr
// (3600s). When serving responses to signed URL requests, Cloud CDN
// will internally behave as though all responses from this backend had
- // a ?Cache-Control: public, max-age=[TTL]? header, regardless of any
+ // a "Cache-Control: public, max-age=[TTL]" header, regardless of any
// existing Cache-Control header. The actual headers served in responses
// will not be altered.
SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"`
@@ -4789,8 +4804,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a BackendService. An up-to-date
- // fingerprint must be provided in order to update the
- // BackendService.
+ // fingerprint must be provided in order to update the BackendService,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// BackendService.
@@ -4830,6 +4845,11 @@
// "INVALID_LOAD_BALANCING_SCHEME"
LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
+ // LogConfig: This field denotes the logging options for the load
+ // balancer traffic served by this backend service. If logging is
+ // enabled, logs will be exported to Stackdriver.
+ LogConfig *BackendServiceLogConfig `json:"logConfig,omitempty"`
+
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
@@ -5141,7 +5161,7 @@
// the response will be revalidated before being served. Defaults to 1hr
// (3600s). When serving responses to signed URL requests, Cloud CDN
// will internally behave as though all responses from this backend had
- // a ?Cache-Control: public, max-age=[TTL]? header, regardless of any
+ // a "Cache-Control: public, max-age=[TTL]" header, regardless of any
// existing Cache-Control header. The actual headers served in responses
// will not be altered.
SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"`
@@ -5555,6 +5575,57 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// BackendServiceLogConfig: The available logging options for the load
+// balancer traffic served by this backend service.
+type BackendServiceLogConfig struct {
+ // Enable: This field denotes whether to enable logging for the load
+ // balancer traffic served by this backend service.
+ Enable bool `json:"enable,omitempty"`
+
+ // SampleRate: This field can only be specified if logging is enabled
+ // for this backend service. The value of the field must be in [0, 1].
+ // This configures the sampling rate of requests to the load balancer
+ // where 1.0 means all logged requests are reported and 0.0 means no
+ // logged requests are reported. The default value is 1.0.
+ SampleRate float64 `json:"sampleRate,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Enable") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Enable") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BackendServiceLogConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod BackendServiceLogConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *BackendServiceLogConfig) UnmarshalJSON(data []byte) error {
+ type NoMethod BackendServiceLogConfig
+ var s1 struct {
+ SampleRate gensupport.JSONFloat64 `json:"sampleRate"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.SampleRate = float64(s1.SampleRate)
+ return nil
+}
+
type BackendServiceReference struct {
BackendService string `json:"backendService,omitempty"`
@@ -6719,7 +6790,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// disk.
@@ -6759,10 +6831,9 @@
// PhysicalBlockSizeBytes: Physical block size of the persistent disk,
// in bytes. If not present in a request, a default value is used.
- // Initially only 4096 is supported, but other powers of two may be
- // added. If an unsupported value is requested, the error message will
- // list the supported values, but even a supported value may be allowed
- // for only some projects.
+ // Currently supported sizes are 4096 and 16384, other sizes may be
+ // added in the future. If an unsupported value is requested, the error
+ // message will list the supported values for the caller's project.
PhysicalBlockSizeBytes int64 `json:"physicalBlockSizeBytes,omitempty,string"`
// Region: [Output Only] URL of the region where the disk resides. Only
@@ -8071,6 +8142,34 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// DisplayDevice: A set of Display Device options
+type DisplayDevice struct {
+ // EnableDisplay: Defines whether the instance has Display enabled.
+ EnableDisplay bool `json:"enableDisplay,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "EnableDisplay") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "EnableDisplay") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DisplayDevice) MarshalJSON() ([]byte, error) {
+ type NoMethod DisplayDevice
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
type DistributionPolicy struct {
// Zones: Zones where the regional managed instance group will create
// and manage instances.
@@ -8421,9 +8520,9 @@
// not exist. If this is unspecified, the firewall rule will be enabled.
Disabled bool `json:"disabled,omitempty"`
- // EnableLogging: This field denotes whether to enable logging for a
- // particular firewall rule. If logging is enabled, logs will be
- // exported to Stackdriver.
+ // EnableLogging: Deprecated in favor of enable in LogConfig. This field
+ // denotes whether to enable logging for a particular firewall rule. If
+ // logging is enabled, logs will be exported to Stackdriver.
EnableLogging bool `json:"enableLogging,omitempty"`
// Id: [Output Only] The unique identifier for the resource. This
@@ -8434,6 +8533,11 @@
// firewall rules.
Kind string `json:"kind,omitempty"`
+ // LogConfig: This field denotes the logging options for a particular
+ // firewall rule. If logging is enabled, logs will be exported to
+ // Stackdriver.
+ LogConfig *FirewallLogConfig `json:"logConfig,omitempty"`
+
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
@@ -8778,6 +8882,35 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// FirewallLogConfig: The available logging options for a firewall rule.
+type FirewallLogConfig struct {
+ // Enable: This field denotes whether to enable logging for a particular
+ // firewall rule.
+ Enable bool `json:"enable,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Enable") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Enable") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *FirewallLogConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod FirewallLogConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// FixedOrPercent: Encapsulates numeric value that can be either
// absolute or relative.
type FixedOrPercent struct {
@@ -8952,7 +9085,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// ForwardingRule.
@@ -9037,10 +9171,10 @@
// Ports: This field is used along with the backend_service field for
// internal load balancing.
//
- // When the load balancing scheme is INTERNAL, a single port or a comma
- // separated list of ports can be configured. Only packets addressed to
- // these ports will be forwarded to the backends configured with this
- // forwarding rule.
+ // When the load balancing scheme is INTERNAL, a list of ports can be
+ // configured, for example, ['80'], ['8000','9000'] etc. Only packets
+ // addressed to these ports will be forwarded to the backends configured
+ // with this forwarding rule.
//
// You may specify a maximum of up to 5 ports.
Ports []string `json:"ports,omitempty"`
@@ -9597,7 +9731,8 @@
// this resource, used to detect conflicts. The fingerprint is initially
// generated by Compute Engine and changes after every request to modify
// or update labels. You must always provide an up-to-date fingerprint
- // hash when updating or changing labels. Make a get() request to the
+ // hash when updating or changing labels, otherwise the request will
+ // fail with error 412 conditionNotMet. Make a get() request to the
// resource to get the latest fingerprint.
LabelFingerprint string `json:"labelFingerprint,omitempty"`
@@ -9636,7 +9771,7 @@
}
type GlobalSetPolicyRequest struct {
- // Bindings: Flatten Policy to create a backwacd compatible wire-format.
+ // Bindings: Flatten Policy to create a backward compatible wire-format.
// Deprecated. Use 'policy' to specify bindings.
Bindings []*Binding `json:"bindings,omitempty"`
@@ -11331,7 +11466,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update labels. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change labels.
+ // change labels, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// image.
@@ -11696,6 +11832,9 @@
// must be created before you can assign them.
Disks []*AttachedDisk `json:"disks,omitempty"`
+ // DisplayDevice: Enables display device for the instance.
+ DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"`
+
// GuestAccelerators: A list of the type and count of accelerator cards
// attached to the instance.
GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"`
@@ -12492,7 +12631,8 @@
// Fingerprint: Fingerprint of this resource. This field may be used in
// optimistic locking. It will be ignored when inserting an
// InstanceGroupManager. An up-to-date fingerprint must be provided in
- // order to update the InstanceGroupManager.
+ // order to update the InstanceGroupManager, otherwise the request will
+ // fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// InstanceGroupManager.
@@ -13364,6 +13504,35 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// InstanceGroupManagersCreateInstancesRequest:
+// InstanceGroupManagers.createInstances
+type InstanceGroupManagersCreateInstancesRequest struct {
+ // Instances: [Required] List of specifications of per-instance configs.
+ Instances []*PerInstanceConfig `json:"instances,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Instances") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Instances") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *InstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod InstanceGroupManagersCreateInstancesRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
type InstanceGroupManagersDeleteInstancesRequest struct {
// Instances: The URLs of one or more instances to delete. This can be a
// full URL or a partial URL, such as
@@ -13400,6 +13569,10 @@
// per-instance configs on this managed instance group.
Instances []string `json:"instances,omitempty"`
+ // Names: The list of instance names for which we want to delete
+ // per-instance configs on this managed instance group.
+ Names []string `json:"names,omitempty"`
+
// ForceSendFields is a list of field names (e.g. "Instances") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -14341,7 +14514,9 @@
// multiple users change the named ports settings concurrently. Obtain
// the fingerprint with the instanceGroups.get method. Then, include the
// fingerprint in your request to ensure that you do not overwrite
- // changes that were applied from another concurrent request.
+ // changes that were applied from another concurrent request. A request
+ // with an incorrect fingerprint will fail with error 412
+ // conditionNotMet.
Fingerprint string `json:"fingerprint,omitempty"`
// NamedPorts: The list of named ports to set for this instance group.
@@ -15613,7 +15788,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// Interconnect.
@@ -15723,8 +15899,8 @@
// Bandwidth: Provisioned bandwidth capacity for the
// interconnectAttachment. Can be set by the partner to update the
- // customer's provisioned bandwidth. Output only for for PARTNER type,
- // mutable for PARTNER_PROVIDER, not available for DEDICATED.
+ // customer's provisioned bandwidth. Output only for PARTNER type,
+ // mutable for PARTNER_PROVIDER and DEDICATED.
//
// Possible values:
// "BPS_100M"
@@ -15802,7 +15978,8 @@
// used for optimistic locking. The fingerprint is initially generated
// by Compute Engine and changes after every request to modify or update
// labels. You must always provide an up-to-date fingerprint hash in
- // order to update or change labels.
+ // order to update or change labels, otherwise the request will fail
+ // with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// InterconnectAttachment.
@@ -15858,7 +16035,7 @@
// body.
Region string `json:"region,omitempty"`
- // Router: URL of the cloud router to be used for dynamic routing. This
+ // Router: URL of the Cloud Router to be used for dynamic routing. This
// router must be in the same region as this InterconnectAttachment. The
// InterconnectAttachment will automatically connect the Interconnect to
// the network & region within which the Cloud Router is configured.
@@ -15886,10 +16063,8 @@
// "PARTNER_PROVIDER"
Type string `json:"type,omitempty"`
- // VlanTag8021q: Available only for DEDICATED and PARTNER_PROVIDER.
- // Desired VLAN tag for this attachment, in the range 2-4094. This field
- // refers to 802.1q VLAN tag, also known as IEEE 802.1Q Only specified
- // at creation time.
+ // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the
+ // range 2-4094. Only specified at creation time.
VlanTag8021q int64 `json:"vlanTag8021q,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -16240,7 +16415,7 @@
type InterconnectAttachmentPartnerMetadata struct {
// InterconnectName: Plain text name of the Interconnect this attachment
// is connected to, as displayed in the Partner?s portal. For instance
- // ?Chicago 1?. This value may be validated to match approved Partner
+ // "Chicago 1". This value may be validated to match approved Partner
// values.
InterconnectName string `json:"interconnectName,omitempty"`
@@ -16604,7 +16779,10 @@
// "OK"
State string `json:"state,omitempty"`
- // Value: Value of the current optical power, read in dBm.
+ // Value: Value of the current optical power, read in dBm. Take a known
+ // good optical value, give it a 10% margin and trigger warnings
+ // relative to that value. In general, a -7dBm warning and a -11dBm
+ // alarm are good optical value estimates for most links.
Value float64 `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "State") to
@@ -18209,8 +18387,7 @@
// - projects/project/zones/zone/instances/instance
SourceInstance string `json:"sourceInstance,omitempty"`
- // SourceInstanceProperties: [Output Only] properties of source
- // instance. Currently, input for this field is not supported.
+ // SourceInstanceProperties: Properties of source instance.
SourceInstanceProperties *SourceInstanceProperties `json:"sourceInstanceProperties,omitempty"`
// Status: [Output Only] The status of disk creation.
@@ -19017,6 +19194,14 @@
// Override: [Output Only] Override defined for this instance.
Override *ManagedInstanceOverride `json:"override,omitempty"`
+ // PreservedStateFromConfig: [Output Only] Preserved state applied from
+ // per-instance config for this instance.
+ PreservedStateFromConfig *PreservedState `json:"preservedStateFromConfig,omitempty"`
+
+ // PreservedStateFromPolicy: [Output Only] Preserved state generated
+ // based on stateful policy for this instance.
+ PreservedStateFromPolicy *PreservedState `json:"preservedStateFromPolicy,omitempty"`
+
// Tag: [Output Only] Tag describing the version.
Tag string `json:"tag,omitempty"`
@@ -19332,7 +19517,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update metadata. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change metadata.
+ // change metadata, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve the
// resource.
@@ -20473,7 +20659,8 @@
// Fingerprint: Fingerprint hash of contents stored in this network
// interface. This field will be ignored when inserting an Instance or
// adding a NetworkInterface. An up-to-date fingerprint must be provided
- // in order to update the NetworkInterface.
+ // in order to update the NetworkInterface, otherwise the request will
+ // fail with error 412 conditionNotMet.
Fingerprint string `json:"fingerprint,omitempty"`
// Kind: [Output Only] Type of the resource. Always
@@ -20702,11 +20889,15 @@
// flag indicating whether Google Compute Engine should automatically
// create routes for the peering.
type NetworkPeering struct {
- // AutoCreateRoutes: Whether full mesh connectivity is created and
- // managed automatically. When it is set to true, Google Compute Engine
- // will automatically create and manage the routes between two networks
- // when the state is ACTIVE. Otherwise, user needs to create routes
- // manually to route packets to peer network.
+ // AdvertisePeerSubnetsViaRouters: Whether Cloud Routers in this network
+ // can automatically advertise subnets from the peer network.
+ AdvertisePeerSubnetsViaRouters bool `json:"advertisePeerSubnetsViaRouters,omitempty"`
+
+ // AutoCreateRoutes: Indicates whether full mesh connectivity is created
+ // and managed automatically. When it is set to true, Google Compute
+ // Engine will automatically create and manage the routes between two
+ // networks when the state is ACTIVE. Otherwise, user needs to create
+ // routes manually to route packets to peer network.
AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`
// ExchangeSubnetRoutes: Whether full mesh connectivity is created and
@@ -20750,21 +20941,22 @@
// peering.
StateDetails string `json:"stateDetails,omitempty"`
- // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
+ // ForceSendFields is a list of field names (e.g.
+ // "AdvertisePeerSubnetsViaRouters") to unconditionally include in API
+ // requests. By default, fields with empty values are omitted from API
+ // requests. However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "AutoCreateRoutes") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
+ // NullFields is a list of field names (e.g.
+ // "AdvertisePeerSubnetsViaRouters") to include in API requests with the
+ // JSON null value. By default, fields with empty values are omitted
+ // from API requests. However, any field with an empty value appearing
+ // in NullFields will be sent to the server as null. It is an error if a
+ // field in this list has a non-empty value. This may be used to include
+ // null fields in Patch requests.
NullFields []string `json:"-"`
}
@@ -20818,18 +21010,24 @@
// automatically.
AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`
- // ExportCustomRoutes: Whether to export the custom routes to peer
- // network.
+ // ExportCustomRoutes: This field will be deprecated soon. Prefer using
+ // export_custom_routes in network_peering instead. Whether to export
+ // the custom routes to peer network.
ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"`
- // ImportCustomRoutes: Whether to import the custom routes from peer
- // network.
+ // ImportCustomRoutes: This field will be deprecated soon. Prefer using
+ // import_custom_routes in network_peering instead. Whether to import
+ // the custom routes from peer network.
ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"`
// Name: Name of the peering, which should conform to RFC1035.
Name string `json:"name,omitempty"`
- // NetworkPeering: Network peering parameters.
+ // NetworkPeering: Network peering parameters. In order to specify route
+ // policies for peering using import/export custom routes, you will have
+ // to fill all peering related parameters (name, peer network,
+ // exchange_subnet_routes) in network_peeringfield. Corresponding fields
+ // in NetworksAddPeeringRequest will be deprecated soon.
NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"`
// PeerNetwork: URL of the peer network. It can be either full URL or
@@ -20918,6 +21116,8 @@
// NodeGroup: A NodeGroup resource.
type NodeGroup struct {
+ AutoscalingPolicy *NodeGroupAutoscalingPolicy `json:"autoscalingPolicy,omitempty"`
+
// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
// format.
CreationTimestamp string `json:"creationTimestamp,omitempty"`
@@ -20969,7 +21169,7 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "CreationTimestamp")
+ // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
@@ -20977,7 +21177,7 @@
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "CreationTimestamp") to
+ // NullFields is a list of field names (e.g. "AutoscalingPolicy") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
@@ -21148,6 +21348,34 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+type NodeGroupAutoscalingPolicy struct {
+ MaxSize int64 `json:"maxSize,omitempty"`
+
+ MinSize int64 `json:"minSize,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "MaxSize") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "MaxSize") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *NodeGroupAutoscalingPolicy) MarshalJSON() ([]byte, error) {
+ type NoMethod NodeGroupAutoscalingPolicy
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// NodeGroupList: Contains a list of nodeGroups.
type NodeGroupList struct {
// Id: [Output Only] Unique identifier for the resource; defined by the
@@ -23673,8 +23901,21 @@
// one will be created.
Instance string `json:"instance,omitempty"`
+ // Name: The name of the per-instance config and the corresponding
+ // instance. Serves as a merge key during UpdatePerInstanceConfigs
+ // operation, i.e. if per-instance config with the same name exists then
+ // it will be updated, otherwise a new one will be created for the VM
+ // instance with the same name. An attempt to create a per-instance
+ // config for a VM instance that either doesn't exist or is not part of
+ // the group will result in a failure.
+ Name string `json:"name,omitempty"`
+
Override *ManagedInstanceOverride `json:"override,omitempty"`
+ // PreservedState: Intended preserved state for the given instance. Does
+ // not contain state generated based on Stateful Policy.
+ PreservedState *PreservedState `json:"preservedState,omitempty"`
+
// ForceSendFields is a list of field names (e.g. "Fingerprint") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -23823,6 +24064,87 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// PreservedState: Preserved state for a given instance.
+type PreservedState struct {
+ // Disks: Preserved disks defined for this instance. This map is keyed
+ // with the device names of the disks.
+ Disks map[string]PreservedStatePreservedDisk `json:"disks,omitempty"`
+
+ // Metadata: Preserved metadata defined for this instance.
+ Metadata map[string]string `json:"metadata,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Disks") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Disks") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PreservedState) MarshalJSON() ([]byte, error) {
+ type NoMethod PreservedState
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PreservedStatePreservedDisk struct {
+ // AutoDelete: These stateful disks will never be deleted during
+ // autohealing, update, instance recreate operations. This flag is used
+ // to configure if the disk should be deleted after it is no longer used
+ // by the group, e.g. when the given instance or the whole MIG is
+ // deleted. Note: disks attached in READ_ONLY mode cannot be
+ // auto-deleted.
+ //
+ // Possible values:
+ // "NEVER"
+ // "WHEN_NOT_IN_USE"
+ AutoDelete string `json:"autoDelete,omitempty"`
+
+ // Mode: The mode in which to attach this disk, either READ_WRITE or
+ // READ_ONLY. If not specified, the default is to attach the disk in
+ // READ_WRITE mode.
+ //
+ // Possible values:
+ // "READ_ONLY"
+ // "READ_WRITE"
+ Mode string `json:"mode,omitempty"`
+
+ // Source: The URL of the disk resource that is stateful and should be
+ // attached to the VM instance.
+ Source string `json:"source,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AutoDelete") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AutoDelete") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PreservedStatePreservedDisk) MarshalJSON() ([]byte, error) {
+ type NoMethod PreservedStatePreservedDisk
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Project: A Project resource. For an overview of projects, see Cloud
// Platform Resource Hierarchy. (== resource_for v1.projects ==) (==
// resource_for beta.projects ==)
@@ -24892,6 +25214,10 @@
// per-instance configs on this managed instance group.
Instances []string `json:"instances,omitempty"`
+ // Names: The list of instance names for which we want to delete
+ // per-instance configs on this managed instance group.
+ Names []string `json:"names,omitempty"`
+
// ForceSendFields is a list of field names (e.g. "Instances") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -26634,7 +26960,7 @@
Duration string `json:"duration,omitempty"`
// StartTime: Time within the window to start the operations. It must be
- // in format "HH:MM?, where HH : [00-23] and MM : [00-00] GMT.
+ // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "DaysInCycle") to
@@ -26671,7 +26997,7 @@
HoursInCycle int64 `json:"hoursInCycle,omitempty"`
// StartTime: Time within the window to start the operations. It must be
- // in format "HH:MM?, where HH : [00-23] and MM : [00-00] GMT.
+ // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "Duration") to
@@ -26962,7 +27288,7 @@
Duration string `json:"duration,omitempty"`
// StartTime: Time within the window to start the operations. It must be
- // in format "HH:MM?, where HH : [00-23] and MM : [00-00] GMT.
+ // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "Day") to
@@ -27666,7 +27992,9 @@
// field blank to advertise no custom groups.
//
// Possible values:
+ // "ALL_PEER_VPC_SUBNETS"
// "ALL_SUBNETS"
+ // "ALL_VPC_SUBNETS"
AdvertisedGroups []string `json:"advertisedGroups,omitempty"`
// AdvertisedIpRanges: User-specified list of individual IP ranges to
@@ -27723,7 +28051,9 @@
// groups.
//
// Possible values:
+ // "ALL_PEER_VPC_SUBNETS"
// "ALL_SUBNETS"
+ // "ALL_VPC_SUBNETS"
AdvertisedGroups []string `json:"advertisedGroups,omitempty"`
// AdvertisedIpRanges: User-specified list of individual IP ranges to
@@ -27746,12 +28076,13 @@
// Only IPv4 is supported.
IpAddress string `json:"ipAddress,omitempty"`
- // ManagementType: [Output Only] Type of how the resource/configuration
- // of the BGP peer is managed. MANAGED_BY_USER is the default value;
- // MANAGED_BY_ATTACHMENT represents an BGP peer that is automatically
- // created for PARTNER interconnectAttachment, Google will automatically
- // create/delete this type of BGP peer when the PARTNER
- // interconnectAttachment is created/deleted.
+ // ManagementType: [Output Only] The resource that configures and
+ // manages this BGP peer. MANAGED_BY_USER is the default value and can
+ // be managed by you or other users; MANAGED_BY_ATTACHMENT is a BGP peer
+ // that is configured and managed by Cloud Interconnect, specifically by
+ // an InterconnectAttachment of type PARTNER. Google will automatically
+ // create, update, and delete this type of BGP peer when the PARTNER
+ // InterconnectAttachment is created, updated, or deleted.
//
// Possible values:
// "MANAGED_BY_ATTACHMENT"
@@ -27813,12 +28144,14 @@
// attachment.
LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"`
- // ManagementType: [Output Only] Type of how the resource/configuration
- // of the interface is managed. MANAGED_BY_USER is the default value;
- // MANAGED_BY_ATTACHMENT represents an interface that is automatically
- // created for PARTNER type interconnectAttachment, Google will
- // automatically create/update/delete this type of interface when the
- // PARTNER interconnectAttachment is created/provisioned/deleted.
+ // ManagementType: [Output Only] The resource that configures and
+ // manages this interface. MANAGED_BY_USER is the default value and can
+ // be managed by you or other users; MANAGED_BY_ATTACHMENT is an
+ // interface that is configured and managed by Cloud Interconnect,
+ // specifically by an InterconnectAttachment of type PARTNER. Google
+ // will automatically create, update, and delete this type of interface
+ // when the PARTNER InterconnectAttachment is created, updated, or
+ // deleted.
//
// Possible values:
// "MANAGED_BY_ATTACHMENT"
@@ -29027,7 +29360,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update metadata. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change metadata.
+ // change metadata, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make get() request to the security
// policy.
@@ -29118,6 +29452,10 @@
// Name: The name for an association.
Name string `json:"name,omitempty"`
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
// ForceSendFields is a list of field names (e.g. "AttachmentId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -29364,7 +29702,8 @@
// Priority: An integer indicating the priority of a rule in the list.
// The priority must be a positive value between 0 and 2147483647. Rules
- // are evaluated in the increasing order of priority.
+ // are evaluated from highest to lowest priority where 0 is the highest
+ // priority and 2147483647 is the lowest prority.
Priority int64 `json:"priority,omitempty"`
// TargetResources: A list of network resource URLs to which this rule
@@ -29684,12 +30023,15 @@
// ShieldedVmIdentity: A shielded VM identity entry.
type ShieldedVmIdentity struct {
+ // EncryptionKey: An Endorsement Key (EK) issued to the Shielded VM's
+ // vTPM.
EncryptionKey *ShieldedVmIdentityEntry `json:"encryptionKey,omitempty"`
// Kind: [Output Only] Type of the resource. Always
// compute#shieldedVmIdentity for shielded VM identity entry.
Kind string `json:"kind,omitempty"`
+ // SigningKey: An Attestation Key (AK) issued to the Shielded VM's vTPM.
SigningKey *ShieldedVmIdentityEntry `json:"signingKey,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -29721,8 +30063,10 @@
// ShieldedVmIdentityEntry: A Shielded VM Identity Entry.
type ShieldedVmIdentityEntry struct {
+ // EkCert: A PEM-encoded X.509 certificate. This field can be empty.
EkCert string `json:"ekCert,omitempty"`
+ // EkPub: A PEM-encoded public key.
EkPub string `json:"ekPub,omitempty"`
// ForceSendFields is a list of field names (e.g. "EkCert") to
@@ -29855,7 +30199,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// snapshot.
@@ -31086,7 +31431,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a SslPolicy. An up-to-date
- // fingerprint must be provided in order to update the SslPolicy.
+ // fingerprint must be provided in order to update the SslPolicy,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// SslPolicy.
@@ -31300,6 +31646,8 @@
type StatefulPolicy struct {
PreservedResources *StatefulPolicyPreservedResources `json:"preservedResources,omitempty"`
+ PreservedState *StatefulPolicyPreservedState `json:"preservedState,omitempty"`
+
// ForceSendFields is a list of field names (e.g. "PreservedResources")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -31381,6 +31729,72 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// StatefulPolicyPreservedState: Configuration of preserved resources.
+type StatefulPolicyPreservedState struct {
+ // Disks: Disks created on the instances that will be preserved on
+ // instance delete, resize down, etc. This map is keyed with the device
+ // names of the disks.
+ Disks map[string]StatefulPolicyPreservedStateDiskDevice `json:"disks,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Disks") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Disks") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *StatefulPolicyPreservedState) MarshalJSON() ([]byte, error) {
+ type NoMethod StatefulPolicyPreservedState
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type StatefulPolicyPreservedStateDiskDevice struct {
+ // AutoDelete: These stateful disks will never be deleted during
+ // autohealing, update or VM instance recreate operations. This flag is
+ // used to configure if the disk should be deleted after it is no longer
+ // used by the group, e.g. when the given instance or the whole group is
+ // deleted. Note: disks attached in READ_ONLY mode cannot be
+ // auto-deleted.
+ //
+ // Possible values:
+ // "NEVER"
+ // "WHEN_NOT_IN_USE"
+ AutoDelete string `json:"autoDelete,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AutoDelete") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AutoDelete") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *StatefulPolicyPreservedStateDiskDevice) MarshalJSON() ([]byte, error) {
+ type NoMethod StatefulPolicyPreservedStateDiskDevice
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Subnetwork: A Subnetwork resource. (== resource_for beta.subnetworks
// ==) (== resource_for v1.subnetworks ==)
type Subnetwork struct {
@@ -31438,7 +31852,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a Subnetwork. An up-to-date
- // fingerprint must be provided in order to update the Subnetwork.
+ // fingerprint must be provided in order to update the Subnetwork,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// Subnetwork.
@@ -31475,6 +31890,11 @@
// for Subnetwork resources.
Kind string `json:"kind,omitempty"`
+ // LogConfig: This field denotes the logging options for the load
+ // balancer traffic served by this backend service. If logging is
+ // enabled, logs will be exported to Stackdriver.
+ LogConfig *SubnetworkLogConfig `json:"logConfig,omitempty"`
+
// Metadata: Can only be specified if VPC flow logging for this
// subnetwork is enabled. Configures whether metadata fields should be
// added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.
@@ -31525,7 +31945,8 @@
// purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to
// ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being
// used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one
- // that is ready to be promoted to ACTIVE or is currently draining.
+ // that is ready to be promoted to ACTIVE or is currently draining. This
+ // field can be updated with a patch request.
//
// Possible values:
// "ACTIVE"
@@ -31535,7 +31956,8 @@
// SecondaryIpRanges: An array of configurations for secondary IP ranges
// for VM instances contained in this subnetwork. The primary IP of such
// VM must belong to the primary ipCidrRange of the subnetwork. The
- // alias IPs may belong to either primary or secondary ranges.
+ // alias IPs may belong to either primary or secondary ranges. This
+ // field can be updated with a patch request.
SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"`
// SelfLink: [Output Only] Server-defined URL for the resource.
@@ -31906,6 +32328,84 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// SubnetworkLogConfig: The available logging options for this
+// subnetwork.
+type SubnetworkLogConfig struct {
+ // AggregationInterval: Can only be specified if VPC flow logging for
+ // this subnetwork is enabled. Toggles the aggregation interval for
+ // collecting flow logs. Increasing the interval time will reduce the
+ // amount of generated flow logs for long lasting connections. Default
+ // is an interval of 5 seconds per connection.
+ //
+ // Possible values:
+ // "INTERVAL_10_MIN"
+ // "INTERVAL_15_MIN"
+ // "INTERVAL_1_MIN"
+ // "INTERVAL_30_SEC"
+ // "INTERVAL_5_MIN"
+ // "INTERVAL_5_SEC"
+ AggregationInterval string `json:"aggregationInterval,omitempty"`
+
+ // Enable: Whether to enable flow logging for this subnetwork. If this
+ // field is not explicitly set, it will not appear in get listings. If
+ // not set the default behavior is to disable flow logging.
+ Enable bool `json:"enable,omitempty"`
+
+ // FlowSampling: Can only be specified if VPC flow logging for this
+ // subnetwork is enabled. The value of the field must be in [0, 1]. Set
+ // the sampling rate of VPC flow logs within the subnetwork where 1.0
+ // means all collected logs are reported and 0.0 means no logs are
+ // reported. Default is 0.5 which means half of all collected logs are
+ // reported.
+ FlowSampling float64 `json:"flowSampling,omitempty"`
+
+ // Metadata: Can only be specified if VPC flow logging for this
+ // subnetwork is enabled. Configures whether metadata fields should be
+ // added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.
+ //
+ // Possible values:
+ // "EXCLUDE_ALL_METADATA"
+ // "INCLUDE_ALL_METADATA"
+ Metadata string `json:"metadata,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AggregationInterval")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AggregationInterval") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *SubnetworkLogConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod SubnetworkLogConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *SubnetworkLogConfig) UnmarshalJSON(data []byte) error {
+ type NoMethod SubnetworkLogConfig
+ var s1 struct {
+ FlowSampling gensupport.JSONFloat64 `json:"flowSampling"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.FlowSampling = float64(s1.FlowSampling)
+ return nil
+}
+
// SubnetworkSecondaryRange: Represents a secondary IP range of a
// subnetwork.
type SubnetworkSecondaryRange struct {
@@ -35319,7 +35819,8 @@
// for optimistic locking. The fingerprint is initially generated by
// Compute Engine and changes after every request to modify or update
// labels. You must always provide an up-to-date fingerprint hash in
- // order to update or change labels.
+ // order to update or change labels, otherwise the request will fail
+ // with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// TargetVpnGateway.
@@ -35997,7 +36498,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a UrlMap. An up-to-date
- // fingerprint must be provided in order to update the UrlMap.
+ // fingerprint must be provided in order to update the UrlMap, otherwise
+ // the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// UrlMap.
@@ -37201,7 +37703,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// VpnGateway.
@@ -37772,7 +38275,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// VpnTunnel.
@@ -40768,9 +41272,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -46898,7 +47402,7 @@
}
// Get: Returns the specified BackendService resource. Gets a list of
-// available backend services by making a list() request.
+// available backend services.
// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get
func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall {
c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -47006,7 +47510,7 @@
}
return ret, nil
// {
- // "description": "Returns the specified BackendService resource. Gets a list of available backend services by making a list() request.",
+ // "description": "Returns the specified BackendService resource. Gets a list of available backend services.",
// "httpMethod": "GET",
// "id": "compute.backendServices.get",
// "parameterOrder": [
@@ -49130,7 +49634,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -49574,7 +50078,7 @@
// "disk": {
// "description": "Name of the persistent disk to snapshot.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -50731,7 +51235,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -50917,7 +51421,7 @@
// "disk": {
// "description": "The name of the persistent disk.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -51275,9 +51779,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -54100,9 +54604,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -55340,9 +55844,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -56560,9 +57064,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -62616,7 +63120,7 @@
// "image": {
// "description": "Name of the image resource to delete.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -62791,7 +63295,7 @@
// "image": {
// "description": "Image name.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -63111,7 +63615,7 @@
// "family": {
// "description": "Name of the image family to search for.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -64010,9 +64514,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -64797,6 +65301,193 @@
}
+// method id "compute.instanceGroupManagers.createInstances":
+
+type InstanceGroupManagersCreateInstancesCall struct {
+ s *Service
+ project string
+ zone string
+ instanceGroupManager string
+ instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// CreateInstances: Creates instances with per-instance configs in this
+// managed instance group. Instances are created using the current
+// instance template. The create instances operation is marked DONE if
+// the createInstances request is successful. The underlying actions
+// take additional time. You must separately verify the status of the
+// creating or actions with the listmanagedinstances method.
+func (r *InstanceGroupManagersService) CreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest) *InstanceGroupManagersCreateInstancesCall {
+ c := &InstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.instanceGroupManager = instanceGroupManager
+ c.instancegroupmanagerscreateinstancesrequest = instancegroupmanagerscreateinstancesrequest
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *InstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersCreateInstancesCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersCreateInstancesCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersCreateInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstanceGroupManagersCreateInstancesCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerscreateinstancesrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "instanceGroupManager": c.instanceGroupManager,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instanceGroupManagers.createInstances" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.",
+ // "httpMethod": "POST",
+ // "id": "compute.instanceGroupManagers.createInstances",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "instanceGroupManager"
+ // ],
+ // "parameters": {
+ // "instanceGroupManager": {
+ // "description": "The name of the managed instance group. It should conform to RFC1035.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances",
+ // "request": {
+ // "$ref": "InstanceGroupManagersCreateInstancesRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.instanceGroupManagers.delete":
type InstanceGroupManagersDeleteCall struct {
@@ -67264,6 +67955,7 @@
}
// SetAutoHealingPolicies: Modifies the autohealing policies.
+// [Deprecated] This method is deprecated. Please use Patch instead.
func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall {
c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
@@ -67384,7 +68076,7 @@
}
return ret, nil
// {
- // "description": "Modifies the autohealing policies.",
+ // "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.",
// "httpMethod": "POST",
// "id": "compute.instanceGroupManagers.setAutoHealingPolicies",
// "parameterOrder": [
@@ -71712,7 +72404,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -71905,7 +72597,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -72360,7 +73052,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -72727,7 +73419,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -72909,15 +73601,15 @@
// ],
// "parameters": {
// "deviceName": {
- // "description": "Disk device name to detach.",
+ // "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.",
// "location": "query",
// "required": true,
// "type": "string"
// },
// "instance": {
- // "description": "Instance name.",
+ // "description": "Instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -73269,7 +73961,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -73632,7 +74324,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -73814,7 +74506,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -74529,7 +75221,7 @@
// "instance": {
// "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.",
// "location": "path",
- // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -74746,7 +75438,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -74926,7 +75618,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -75109,7 +75801,7 @@
// "instance": {
// "description": "Name of the instance resource to resume.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -75310,9 +76002,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -75485,16 +76177,16 @@
// "type": "boolean"
// },
// "deviceName": {
- // "description": "The device name of the disk to modify.",
+ // "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.",
// "location": "query",
// "pattern": "\\w[\\w.-]{0,254}",
// "required": true,
// "type": "string"
// },
// "instance": {
- // "description": "The instance name.",
+ // "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -75839,7 +76531,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -76025,7 +76717,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -76211,7 +76903,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -76398,7 +77090,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -76586,7 +77278,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -76770,9 +77462,9 @@
// ],
// "parameters": {
// "instance": {
- // "description": "Instance name.",
+ // "description": "Instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -76959,7 +77651,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -77147,7 +77839,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -77334,7 +78026,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -77494,7 +78186,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -77666,7 +78358,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -77850,7 +78542,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -78047,7 +78739,7 @@
// "instance": {
// "description": "Name of the instance resource to stop.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -78240,7 +78932,7 @@
// "instance": {
// "description": "Name of the instance resource to suspend.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -78590,7 +79282,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -78635,6 +79327,194 @@
}
+// method id "compute.instances.updateDisplayDevice":
+
+type InstancesUpdateDisplayDeviceCall struct {
+ s *Service
+ project string
+ zone string
+ instance string
+ displaydevice *DisplayDevice
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// UpdateDisplayDevice: Updates the Display config for a VM instance.
+// You can only use this method on a stopped VM instance. This method
+// supports PATCH semantics and uses the JSON merge patch format and
+// processing rules.
+func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall {
+ c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.instance = instance
+ c.displaydevice = displaydevice
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.displaydevice)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PATCH", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "instance": c.instance,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instances.updateDisplayDevice" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ // "httpMethod": "PATCH",
+ // "id": "compute.instances.updateDisplayDevice",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "instance"
+ // ],
+ // "parameters": {
+ // "instance": {
+ // "description": "Name of the instance scoping this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice",
+ // "request": {
+ // "$ref": "DisplayDevice"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.instances.updateNetworkInterface":
type InstancesUpdateNetworkInterfaceCall struct {
@@ -78784,7 +79664,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -78978,7 +79858,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -80729,9 +81609,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -82980,9 +83860,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -91511,7 +92391,7 @@
// ],
// "parameters": {
// "nodeGroup": {
- // "description": "Name of the NodeGroup resource to delete.",
+ // "description": "Name of the NodeGroup resource.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
@@ -95920,6 +96800,1862 @@
}
}
+// method id "compute.organizationSecurityPolicies.addAssociation":
+
+type OrganizationSecurityPoliciesAddAssociationCall struct {
+ s *Service
+ securityPolicy string
+ securitypolicyassociation *SecurityPolicyAssociation
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// AddAssociation: Inserts an association for the specified security
+// policy.
+func (r *OrganizationSecurityPoliciesService) AddAssociation(securityPolicy string, securitypolicyassociation *SecurityPolicyAssociation) *OrganizationSecurityPoliciesAddAssociationCall {
+ c := &OrganizationSecurityPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ c.securitypolicyassociation = securitypolicyassociation
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *OrganizationSecurityPoliciesAddAssociationCall) RequestId(requestId string) *OrganizationSecurityPoliciesAddAssociationCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesAddAssociationCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesAddAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesAddAssociationCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesAddAssociationCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyassociation)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/addAssociation")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.addAssociation" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Inserts an association for the specified security policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.organizationSecurityPolicies.addAssociation",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to update.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}/addAssociation",
+ // "request": {
+ // "$ref": "SecurityPolicyAssociation"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.addRule":
+
+type OrganizationSecurityPoliciesAddRuleCall struct {
+ s *Service
+ securityPolicy string
+ securitypolicyrule *SecurityPolicyRule
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// AddRule: Inserts a rule into a security policy.
+func (r *OrganizationSecurityPoliciesService) AddRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesAddRuleCall {
+ c := &OrganizationSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ c.securitypolicyrule = securitypolicyrule
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *OrganizationSecurityPoliciesAddRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesAddRuleCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesAddRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesAddRuleCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesAddRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesAddRuleCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesAddRuleCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyrule)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/addRule")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.addRule" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Inserts a rule into a security policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.organizationSecurityPolicies.addRule",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to update.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}/addRule",
+ // "request": {
+ // "$ref": "SecurityPolicyRule"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.delete":
+
+type OrganizationSecurityPoliciesDeleteCall struct {
+ s *Service
+ securityPolicy string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes the specified policy.
+func (r *OrganizationSecurityPoliciesService) Delete(securityPolicy string) *OrganizationSecurityPoliciesDeleteCall {
+ c := &OrganizationSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *OrganizationSecurityPoliciesDeleteCall) RequestId(requestId string) *OrganizationSecurityPoliciesDeleteCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesDeleteCall) Context(ctx context.Context) *OrganizationSecurityPoliciesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.delete" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Deletes the specified policy.",
+ // "httpMethod": "DELETE",
+ // "id": "compute.organizationSecurityPolicies.delete",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to delete.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}",
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.get":
+
+type OrganizationSecurityPoliciesGetCall struct {
+ s *Service
+ securityPolicy string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: List all of the ordered rules present in a single specified
+// policy.
+func (r *OrganizationSecurityPoliciesService) Get(securityPolicy string) *OrganizationSecurityPoliciesGetCall {
+ c := &OrganizationSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesGetCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrganizationSecurityPoliciesGetCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesGetCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.get" call.
+// Exactly one of *SecurityPolicy or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *SecurityPolicy.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &SecurityPolicy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "List all of the ordered rules present in a single specified policy.",
+ // "httpMethod": "GET",
+ // "id": "compute.organizationSecurityPolicies.get",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "securityPolicy": {
+ // "description": "Name of the security policy to get.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}",
+ // "response": {
+ // "$ref": "SecurityPolicy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.getAssociation":
+
+type OrganizationSecurityPoliciesGetAssociationCall struct {
+ s *Service
+ securityPolicy string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetAssociation: Gets an association with the specified name.
+func (r *OrganizationSecurityPoliciesService) GetAssociation(securityPolicy string) *OrganizationSecurityPoliciesGetAssociationCall {
+ c := &OrganizationSecurityPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ return c
+}
+
+// Name sets the optional parameter "name": The name of the association
+// to get from the security policy.
+func (c *OrganizationSecurityPoliciesGetAssociationCall) Name(name string) *OrganizationSecurityPoliciesGetAssociationCall {
+ c.urlParams_.Set("name", name)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetAssociationCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrganizationSecurityPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetAssociationCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesGetAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetAssociationCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesGetAssociationCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/getAssociation")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.getAssociation" call.
+// Exactly one of *SecurityPolicyAssociation or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *SecurityPolicyAssociation.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyAssociation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &SecurityPolicyAssociation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets an association with the specified name.",
+ // "httpMethod": "GET",
+ // "id": "compute.organizationSecurityPolicies.getAssociation",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The name of the association to get from the security policy.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to which the queried rule belongs.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}/getAssociation",
+ // "response": {
+ // "$ref": "SecurityPolicyAssociation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.getRule":
+
+type OrganizationSecurityPoliciesGetRuleCall struct {
+ s *Service
+ securityPolicy string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetRule: Gets a rule at the specified priority.
+func (r *OrganizationSecurityPoliciesService) GetRule(securityPolicy string) *OrganizationSecurityPoliciesGetRuleCall {
+ c := &OrganizationSecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ return c
+}
+
+// Priority sets the optional parameter "priority": The priority of the
+// rule to get from the security policy.
+func (c *OrganizationSecurityPoliciesGetRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesGetRuleCall {
+ c.urlParams_.Set("priority", fmt.Sprint(priority))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesGetRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetRuleCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrganizationSecurityPoliciesGetRuleCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetRuleCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesGetRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetRuleCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesGetRuleCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/getRule")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.getRule" call.
+// Exactly one of *SecurityPolicyRule or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *SecurityPolicyRule.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyRule, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &SecurityPolicyRule{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets a rule at the specified priority.",
+ // "httpMethod": "GET",
+ // "id": "compute.organizationSecurityPolicies.getRule",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "priority": {
+ // "description": "The priority of the rule to get from the security policy.",
+ // "format": "int32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to which the queried rule belongs.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}/getRule",
+ // "response": {
+ // "$ref": "SecurityPolicyRule"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.insert":
+
+type OrganizationSecurityPoliciesInsertCall struct {
+ s *Service
+ securitypolicy *SecurityPolicy
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Creates a new policy in the specified project using the data
+// included in the request.
+func (r *OrganizationSecurityPoliciesService) Insert(securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesInsertCall {
+ c := &OrganizationSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securitypolicy = securitypolicy
+ return c
+}
+
+// ParentId sets the optional parameter "parentId": Parent ID for this
+// request.
+func (c *OrganizationSecurityPoliciesInsertCall) ParentId(parentId string) *OrganizationSecurityPoliciesInsertCall {
+ c.urlParams_.Set("parentId", parentId)
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *OrganizationSecurityPoliciesInsertCall) RequestId(requestId string) *OrganizationSecurityPoliciesInsertCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesInsertCall) Context(ctx context.Context) *OrganizationSecurityPoliciesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicy)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.insert" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a new policy in the specified project using the data included in the request.",
+ // "httpMethod": "POST",
+ // "id": "compute.organizationSecurityPolicies.insert",
+ // "parameters": {
+ // "parentId": {
+ // "description": "Parent ID for this request.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies",
+ // "request": {
+ // "$ref": "SecurityPolicy"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.list":
+
+type OrganizationSecurityPoliciesListCall struct {
+ s *Service
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: List all the policies that have been configured for the
+// specified project.
+func (r *OrganizationSecurityPoliciesService) List() *OrganizationSecurityPoliciesListCall {
+ c := &OrganizationSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ return c
+}
+
+// Filter sets the optional parameter "filter": A filter expression that
+// filters resources listed in the response. The expression must specify
+// the field name, a comparison operator, and the value that you want to
+// use for filtering. The value must be a string, a number, or a
+// boolean. The comparison operator must be either =, !=, >, or <.
+//
+// For example, if you are filtering Compute Engine instances, you can
+// exclude instances named example-instance by specifying name !=
+// example-instance.
+//
+// You can also filter nested fields. For example, you could specify
+// scheduling.automaticRestart = false to include instances only if they
+// are not scheduled for automatic restarts. You can use filtering on
+// nested fields to filter based on resource labels.
+//
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart = true)
+// (cpuPlatform = "Intel Skylake"). By default, each expression is an
+// AND expression. However, you can include AND and OR expressions
+// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
+// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
+// true).
+func (c *OrganizationSecurityPoliciesListCall) Filter(filter string) *OrganizationSecurityPoliciesListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of results per page that should be returned. If the number of
+// available results is larger than maxResults, Compute Engine returns a
+// nextPageToken that can be used to get the next page of results in
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
+func (c *OrganizationSecurityPoliciesListCall) MaxResults(maxResults int64) *OrganizationSecurityPoliciesListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *OrganizationSecurityPoliciesListCall) OrderBy(orderBy string) *OrganizationSecurityPoliciesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": Specifies a page
+// token to use. Set pageToken to the nextPageToken returned by a
+// previous list request to get the next page of results.
+func (c *OrganizationSecurityPoliciesListCall) PageToken(pageToken string) *OrganizationSecurityPoliciesListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// ParentId sets the optional parameter "parentId": Parent ID for this
+// request.
+func (c *OrganizationSecurityPoliciesListCall) ParentId(parentId string) *OrganizationSecurityPoliciesListCall {
+ c.urlParams_.Set("parentId", parentId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesListCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrganizationSecurityPoliciesListCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesListCall) Context(ctx context.Context) *OrganizationSecurityPoliciesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.list" call.
+// Exactly one of *SecurityPolicyList or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *SecurityPolicyList.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &SecurityPolicyList{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "List all the policies that have been configured for the specified project.",
+ // "httpMethod": "GET",
+ // "id": "compute.organizationSecurityPolicies.list",
+ // "parameters": {
+ // "filter": {
+ // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "default": "500",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ // "format": "uint32",
+ // "location": "query",
+ // "minimum": "0",
+ // "type": "integer"
+ // },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "parentId": {
+ // "description": "Parent ID for this request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies",
+ // "response": {
+ // "$ref": "SecurityPolicyList"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *OrganizationSecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "compute.organizationSecurityPolicies.patchRule":
+
+type OrganizationSecurityPoliciesPatchRuleCall struct {
+ s *Service
+ securityPolicy string
+ securitypolicyrule *SecurityPolicyRule
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// PatchRule: Patches a rule at the specified priority.
+func (r *OrganizationSecurityPoliciesService) PatchRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesPatchRuleCall {
+ c := &OrganizationSecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ c.securitypolicyrule = securitypolicyrule
+ return c
+}
+
+// Priority sets the optional parameter "priority": The priority of the
+// rule to patch.
+func (c *OrganizationSecurityPoliciesPatchRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesPatchRuleCall {
+ c.urlParams_.Set("priority", fmt.Sprint(priority))
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *OrganizationSecurityPoliciesPatchRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesPatchRuleCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesPatchRuleCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesPatchRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesPatchRuleCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesPatchRuleCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyrule)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/patchRule")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.patchRule" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Patches a rule at the specified priority.",
+ // "httpMethod": "POST",
+ // "id": "compute.organizationSecurityPolicies.patchRule",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "priority": {
+ // "description": "The priority of the rule to patch.",
+ // "format": "int32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to update.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}/patchRule",
+ // "request": {
+ // "$ref": "SecurityPolicyRule"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.removeAssociation":
+
+type OrganizationSecurityPoliciesRemoveAssociationCall struct {
+ s *Service
+ securityPolicy string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// RemoveAssociation: Removes an association for the specified security
+// policy.
+func (r *OrganizationSecurityPoliciesService) RemoveAssociation(securityPolicy string) *OrganizationSecurityPoliciesRemoveAssociationCall {
+ c := &OrganizationSecurityPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ return c
+}
+
+// Name sets the optional parameter "name": Name for the attachment that
+// will be removed.
+func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Name(name string) *OrganizationSecurityPoliciesRemoveAssociationCall {
+ c.urlParams_.Set("name", name)
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *OrganizationSecurityPoliciesRemoveAssociationCall) RequestId(requestId string) *OrganizationSecurityPoliciesRemoveAssociationCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesRemoveAssociationCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesRemoveAssociationCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/removeAssociation")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.removeAssociation" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Removes an association for the specified security policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.organizationSecurityPolicies.removeAssociation",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "Name for the attachment that will be removed.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to update.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}/removeAssociation",
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.organizationSecurityPolicies.removeRule":
+
+type OrganizationSecurityPoliciesRemoveRuleCall struct {
+ s *Service
+ securityPolicy string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// RemoveRule: Deletes a rule at the specified priority.
+func (r *OrganizationSecurityPoliciesService) RemoveRule(securityPolicy string) *OrganizationSecurityPoliciesRemoveRuleCall {
+ c := &OrganizationSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.securityPolicy = securityPolicy
+ return c
+}
+
+// Priority sets the optional parameter "priority": The priority of the
+// rule to remove from the security policy.
+func (c *OrganizationSecurityPoliciesRemoveRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesRemoveRuleCall {
+ c.urlParams_.Set("priority", fmt.Sprint(priority))
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *OrganizationSecurityPoliciesRemoveRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesRemoveRuleCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrganizationSecurityPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesRemoveRuleCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrganizationSecurityPoliciesRemoveRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesRemoveRuleCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrganizationSecurityPoliciesRemoveRuleCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrganizationSecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/removeRule")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "securityPolicy": c.securityPolicy,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.organizationSecurityPolicies.removeRule" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *OrganizationSecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Deletes a rule at the specified priority.",
+ // "httpMethod": "POST",
+ // "id": "compute.organizationSecurityPolicies.removeRule",
+ // "parameterOrder": [
+ // "securityPolicy"
+ // ],
+ // "parameters": {
+ // "priority": {
+ // "description": "The priority of the rule to remove from the security policy.",
+ // "format": "int32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "securityPolicy": {
+ // "description": "Name of the security policy to update.",
+ // "location": "path",
+ // "pattern": "[0-9]{0,20}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "locations/global/securityPolicies/{securityPolicy}/removeRule",
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.projects.disableXpnHost":
type ProjectsDisableXpnHostCall struct {
@@ -102736,7 +105472,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -102927,7 +105663,7 @@
// "disk": {
// "description": "Name of the regional persistent disk to snapshot.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -103281,7 +106017,7 @@
// "disk": {
// "description": "Name of the regional persistent disk to return.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -103910,7 +106646,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -104095,7 +106831,7 @@
// "disk": {
// "description": "Name of the regional persistent disk.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -104297,9 +107033,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -108415,7 +111151,8 @@
}
// SetAutoHealingPolicies: Modifies the autohealing policy for the
-// instances in this managed instance group.
+// instances in this managed instance group. [Deprecated] This method is
+// deprecated. Please use Patch instead.
func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall {
c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
@@ -108536,7 +111273,7 @@
}
return ret, nil
// {
- // "description": "Modifies the autohealing policy for the instances in this managed instance group.",
+ // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.",
// "httpMethod": "POST",
// "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies",
// "parameterOrder": [
@@ -123181,9 +125918,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -123372,7 +126109,7 @@
// deletion is needed for subsequent snapshots, the data will be moved
// to the next corresponding snapshot.
//
-// For more information, see Deleting snaphots.
+// For more information, see Deleting snapshots.
// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete
func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall {
c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -123486,7 +126223,7 @@
}
return ret, nil
// {
- // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.",
+ // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.",
// "httpMethod": "DELETE",
// "id": "compute.snapshots.delete",
// "parameterOrder": [
@@ -123509,7 +126246,7 @@
// "snapshot": {
// "description": "Name of the Snapshot resource to delete.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -124372,9 +127109,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -128630,11 +131367,9 @@
}
// Patch: Patches the specified subnetwork with the data included in the
-// request. Only the following fields within the subnetwork resource can
-// be specified in the request: secondary_ip_range,
-// allow_subnet_cidr_routes_overlap and role. It is also mandatory to
-// specify the current fingeprint of the subnetwork resource being
-// patched.
+// request. Only certain fields can up updated with a patch request as
+// indicated in the field descriptions. You must specify the current
+// fingeprint of the subnetwork resource being patched.
func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall {
c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
@@ -128770,7 +131505,7 @@
}
return ret, nil
// {
- // "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range, allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.",
+ // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.",
// "httpMethod": "PATCH",
// "id": "compute.subnetworks.patch",
// "parameterOrder": [
@@ -140018,9 +142753,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -143223,9 +145958,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -144603,9 +147338,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json
index c6c1057..48ba9b4 100644
--- a/compute/v0.beta/compute-api.json
+++ b/compute/v0.beta/compute-api.json
@@ -29,7 +29,7 @@
"description": "Creates and runs virtual machines on Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/compute/docs/reference/latest/",
- "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/At36vPKEZBFd0Uc10g70TlDzuwc\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/70HwCjepND3diNgOBIRhqPb-9sI\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/compute_engine-16.png",
"x32": "https://www.google.com/images/icons/product/compute_engine-32.png"
@@ -505,9 +505,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -571,6 +571,376 @@
}
}
},
+ "allocations": {
+ "methods": {
+ "aggregatedList": {
+ "description": "Retrieves an aggregated list of allocations.",
+ "httpMethod": "GET",
+ "id": "compute.allocations.aggregatedList",
+ "parameterOrder": [
+ "project"
+ ],
+ "parameters": {
+ "filter": {
+ "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ "location": "query",
+ "type": "string"
+ },
+ "maxResults": {
+ "default": "500",
+ "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ "format": "uint32",
+ "location": "query",
+ "minimum": "0",
+ "type": "integer"
+ },
+ "orderBy": {
+ "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ "location": "query",
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ "location": "query",
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/aggregated/allocations",
+ "response": {
+ "$ref": "AllocationAggregatedList"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "delete": {
+ "description": "Deletes the specified allocation.",
+ "httpMethod": "DELETE",
+ "id": "compute.allocations.delete",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "allocation"
+ ],
+ "parameters": {
+ "allocation": {
+ "description": "Name of the allocation to delete.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "zone": {
+ "description": "Name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/allocations/{allocation}",
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "get": {
+ "description": "Retrieves all information of the specified allocation.",
+ "httpMethod": "GET",
+ "id": "compute.allocations.get",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "allocation"
+ ],
+ "parameters": {
+ "allocation": {
+ "description": "Name of the allocation to retrieve.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "Name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/allocations/{allocation}",
+ "response": {
+ "$ref": "Allocation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.allocations.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/allocations/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "insert": {
+ "description": "Creates a new allocation.",
+ "httpMethod": "POST",
+ "id": "compute.allocations.insert",
+ "parameterOrder": [
+ "project",
+ "zone"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "zone": {
+ "description": "Name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/allocations",
+ "request": {
+ "$ref": "Allocation"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "list": {
+ "description": "A list all the allocations that have been configured for the specified project in specified zone.",
+ "httpMethod": "GET",
+ "id": "compute.allocations.list",
+ "parameterOrder": [
+ "project",
+ "zone"
+ ],
+ "parameters": {
+ "filter": {
+ "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ "location": "query",
+ "type": "string"
+ },
+ "maxResults": {
+ "default": "500",
+ "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ "format": "uint32",
+ "location": "query",
+ "minimum": "0",
+ "type": "integer"
+ },
+ "orderBy": {
+ "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ "location": "query",
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ "location": "query",
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "Name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/allocations",
+ "response": {
+ "$ref": "AllocationList"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.allocations.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/allocations/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "ZoneSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.allocations.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/allocations/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ }
+ }
+ },
"autoscalers": {
"methods": {
"aggregatedList": {
@@ -1447,7 +1817,7 @@
]
},
"get": {
- "description": "Returns the specified BackendService resource. Gets a list of available backend services by making a list() request.",
+ "description": "Returns the specified BackendService resource. Gets a list of available backend services.",
"httpMethod": "GET",
"id": "compute.backendServices.get",
"parameterOrder": [
@@ -1926,7 +2296,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2024,7 +2394,7 @@
"disk": {
"description": "Name of the persistent disk to snapshot.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2309,7 +2679,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2358,7 +2728,7 @@
"disk": {
"description": "The name of the persistent disk.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2461,9 +2831,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -3078,9 +3448,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -3366,9 +3736,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -3597,9 +3967,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -4707,7 +5077,7 @@
"image": {
"description": "Name of the image resource to delete.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -4745,7 +5115,7 @@
"image": {
"description": "Image name.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -4820,7 +5190,7 @@
"family": {
"description": "Name of the image family to search for.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5019,9 +5389,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -5659,7 +6029,7 @@
]
},
"setAutoHealingPolicies": {
- "description": "Modifies the autohealing policies.",
+ "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.",
"httpMethod": "POST",
"id": "compute.instanceGroupManagers.setAutoHealingPolicies",
"parameterOrder": [
@@ -6659,7 +7029,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6768,7 +7138,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6871,7 +7241,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6922,15 +7292,15 @@
],
"parameters": {
"deviceName": {
- "description": "Disk device name to detach.",
+ "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.",
"location": "query",
"required": true,
"type": "string"
},
"instance": {
- "description": "Instance name.",
+ "description": "Instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7018,7 +7388,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7112,7 +7482,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7169,7 +7539,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7319,7 +7689,7 @@
"instance": {
"description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.",
"location": "path",
- "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7379,7 +7749,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7425,7 +7795,7 @@
"instance": {
"description": "Name of the instance resource to resume.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7490,9 +7860,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7532,16 +7902,16 @@
"type": "boolean"
},
"deviceName": {
- "description": "The device name of the disk to modify.",
+ "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.",
"location": "query",
"pattern": "\\w[\\w.-]{0,254}",
"required": true,
"type": "string"
},
"instance": {
- "description": "The instance name.",
+ "description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7631,7 +8001,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7680,7 +8050,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7729,7 +8099,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7778,7 +8148,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7827,7 +8197,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7874,9 +8244,9 @@
],
"parameters": {
"instance": {
- "description": "Instance name.",
+ "description": "Instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7925,7 +8295,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7974,7 +8344,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8023,7 +8393,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8072,7 +8442,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8113,7 +8483,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8159,7 +8529,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8208,7 +8578,7 @@
"instance": {
"description": "Name of the instance resource to stop.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8259,7 +8629,7 @@
"instance": {
"description": "Name of the instance resource to suspend.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8351,7 +8721,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8393,6 +8763,55 @@
"https://www.googleapis.com/auth/compute"
]
},
+ "updateDisplayDevice": {
+ "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ "httpMethod": "PATCH",
+ "id": "compute.instances.updateDisplayDevice",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "instance"
+ ],
+ "parameters": {
+ "instance": {
+ "description": "Name of the instance scoping this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice",
+ "request": {
+ "$ref": "DisplayDevice"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"updateNetworkInterface": {
"description": "Updates an instance's network interface. This method follows PATCH semantics.",
"httpMethod": "PATCH",
@@ -8407,7 +8826,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8462,7 +8881,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -8816,9 +9235,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -9217,9 +9636,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -9471,6 +9890,42 @@
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"
]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.licenses.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/licenses/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "GlobalSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
}
}
},
@@ -10261,6 +10716,86 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "listPeeringRoutes": {
+ "description": "Lists the peering routes exchanged over peering connection.",
+ "httpMethod": "GET",
+ "id": "compute.networks.listPeeringRoutes",
+ "parameterOrder": [
+ "project",
+ "network"
+ ],
+ "parameters": {
+ "direction": {
+ "description": "The direction of the exchanged routes.",
+ "enum": [
+ "INCOMING",
+ "OUTGOING"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "filter": {
+ "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ "location": "query",
+ "type": "string"
+ },
+ "maxResults": {
+ "default": "500",
+ "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ "format": "uint32",
+ "location": "query",
+ "minimum": "0",
+ "type": "integer"
+ },
+ "network": {
+ "description": "Name of the network for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "orderBy": {
+ "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ "location": "query",
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ "location": "query",
+ "type": "string"
+ },
+ "peeringName": {
+ "description": "The response will show routes exchanged over the given peering connection.",
+ "location": "query",
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/networks/{network}/listPeeringRoutes",
+ "response": {
+ "$ref": "ExchangedPeeringRoutesList"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"patch": {
"description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.",
"httpMethod": "PATCH",
@@ -10417,6 +10952,47 @@
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"
]
+ },
+ "updatePeering": {
+ "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes",
+ "httpMethod": "PATCH",
+ "id": "compute.networks.updatePeering",
+ "parameterOrder": [
+ "project",
+ "network"
+ ],
+ "parameters": {
+ "network": {
+ "description": "Name of the network resource which the updated peering is belonging to.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/networks/{network}/updatePeering",
+ "request": {
+ "$ref": "NetworksUpdatePeeringRequest"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
}
}
},
@@ -10433,7 +11009,7 @@
],
"parameters": {
"nodeGroup": {
- "description": "Name of the NodeGroup resource to delete.",
+ "description": "Name of the NodeGroup resource.",
"location": "path",
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
"required": true,
@@ -12997,7 +13573,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -13046,7 +13622,7 @@
"disk": {
"description": "Name of the regional persistent disk to snapshot.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -13140,7 +13716,7 @@
"disk": {
"description": "Name of the regional persistent disk to return.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -13285,7 +13861,7 @@
"disk": {
"description": "The disk name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -13334,7 +13910,7 @@
"disk": {
"description": "Name of the regional persistent disk.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -13400,9 +13976,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -13953,7 +14529,7 @@
]
},
"setAutoHealingPolicies": {
- "description": "Modifies the autohealing policy for the instances in this managed instance group.",
+ "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.",
"httpMethod": "POST",
"id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies",
"parameterOrder": [
@@ -16120,9 +16696,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -16181,7 +16757,7 @@
"snapshots": {
"methods": {
"delete": {
- "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.",
+ "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.",
"httpMethod": "DELETE",
"id": "compute.snapshots.delete",
"parameterOrder": [
@@ -16204,7 +16780,7 @@
"snapshot": {
"description": "Name of the Snapshot resource to delete.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -16388,9 +16964,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -17301,7 +17877,7 @@
]
},
"patch": {
- "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range, allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.",
+ "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.",
"httpMethod": "PATCH",
"id": "compute.subnetworks.patch",
"parameterOrder": [
@@ -19811,9 +20387,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -20498,9 +21074,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -20793,7 +21369,7 @@
}
}
},
- "revision": "20181022",
+ "revision": "20181128",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@@ -21283,7 +21859,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an Address.",
+ "description": "A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an Address.",
"format": "byte",
"type": "string"
},
@@ -21309,7 +21885,7 @@
"type": "string"
},
"networkTier": {
- "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM , STANDARD.\n\nIf this field is not specified, it is assumed to be PREMIUM.",
+ "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.",
"enum": [
"PREMIUM",
"STANDARD"
@@ -21330,13 +21906,11 @@
"enum": [
"DNS_RESOLVER",
"GCE_ENDPOINT",
- "UNSPECIFIED_PURPOSE",
"VPC_PEERING"
],
"enumDescriptions": [
"",
"",
- "",
""
],
"type": "string"
@@ -21710,6 +22284,477 @@
},
"type": "object"
},
+ "Allocation": {
+ "description": "Allocation resource",
+ "id": "Allocation",
+ "properties": {
+ "creationTimestamp": {
+ "description": "[Output Only] Creation timestamp in RFC3339 text format.",
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "id": {
+ "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "kind": {
+ "default": "compute#allocation",
+ "description": "[Output Only] Type of the resource. Always compute#allocations for allocations.",
+ "type": "string"
+ },
+ "name": {
+ "annotations": {
+ "required": [
+ "compute.instances.insert"
+ ]
+ },
+ "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "[Output Only] Server-defined fully-qualified URL for this resource.",
+ "type": "string"
+ },
+ "specificAllocation": {
+ "$ref": "AllocationSpecificSKUAllocation"
+ },
+ "specificAllocationRequired": {
+ "description": "Indicates whether the allocation can be consumed by VMs with \"any allocation\" defined. If the field is set, then only VMs that target the allocation by name using --allocation-affinity can consume this allocation.",
+ "type": "boolean"
+ },
+ "zone": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AllocationAffinity": {
+ "description": "AllocationAffinity is the configuration of desired allocation which this instance could take capacity from.",
+ "id": "AllocationAffinity",
+ "properties": {
+ "consumeAllocationType": {
+ "enum": [
+ "ANY_ALLOCATION",
+ "NO_ALLOCATION",
+ "SPECIFIC_ALLOCATION",
+ "UNSPECIFIED"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "key": {
+ "description": "Corresponds to the label key of allocation resource.",
+ "type": "string"
+ },
+ "values": {
+ "description": "Corresponds to the label values of allocation resource.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AllocationAggregatedList": {
+ "description": "Contains a list of allocations.",
+ "id": "AllocationAggregatedList",
+ "properties": {
+ "id": {
+ "description": "[Output Only] Unique identifier for the resource; defined by the server.",
+ "type": "string"
+ },
+ "items": {
+ "additionalProperties": {
+ "$ref": "AllocationsScopedList",
+ "description": "Name of the scope containing this set of allocations."
+ },
+ "description": "A list of Allocation resources.",
+ "type": "object"
+ },
+ "kind": {
+ "default": "compute#allocationAggregatedList",
+ "description": "Type of resource.",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "[Output Only] Server-defined URL for this resource.",
+ "type": "string"
+ },
+ "warning": {
+ "description": "[Output Only] Informational warning message.",
+ "properties": {
+ "code": {
+ "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.",
+ "enum": [
+ "CLEANUP_FAILED",
+ "DEPRECATED_RESOURCE_USED",
+ "DEPRECATED_TYPE_USED",
+ "DISK_SIZE_LARGER_THAN_IMAGE_SIZE",
+ "EXPERIMENTAL_TYPE_USED",
+ "EXTERNAL_API_WARNING",
+ "FIELD_VALUE_OVERRIDEN",
+ "INJECTED_KERNELS_DEPRECATED",
+ "MISSING_TYPE_DEPENDENCY",
+ "NEXT_HOP_ADDRESS_NOT_ASSIGNED",
+ "NEXT_HOP_CANNOT_IP_FORWARD",
+ "NEXT_HOP_INSTANCE_NOT_FOUND",
+ "NEXT_HOP_INSTANCE_NOT_ON_NETWORK",
+ "NEXT_HOP_NOT_RUNNING",
+ "NOT_CRITICAL_ERROR",
+ "NO_RESULTS_ON_PAGE",
+ "REQUIRED_TOS_AGREEMENT",
+ "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING",
+ "RESOURCE_NOT_DELETED",
+ "SCHEMA_VALIDATION_IGNORED",
+ "SINGLE_INSTANCE_PROPERTY_TEMPLATE",
+ "UNDECLARED_PROPERTIES",
+ "UNREACHABLE"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "data": {
+ "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }",
+ "items": {
+ "properties": {
+ "key": {
+ "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).",
+ "type": "string"
+ },
+ "value": {
+ "description": "[Output Only] A warning data value corresponding to the key.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "description": "[Output Only] A human-readable description of the warning code.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "AllocationList": {
+ "id": "AllocationList",
+ "properties": {
+ "id": {
+ "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.",
+ "type": "string"
+ },
+ "items": {
+ "description": "[Output Only] A list of Allocation resources.",
+ "items": {
+ "$ref": "Allocation"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "compute#allocationList",
+ "description": "[Output Only] Type of resource.Always compute#allocationsList for listsof allocations",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "[Output Only] Server-defined URL for this resource.",
+ "type": "string"
+ },
+ "warning": {
+ "description": "[Output Only] Informational warning message.",
+ "properties": {
+ "code": {
+ "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.",
+ "enum": [
+ "CLEANUP_FAILED",
+ "DEPRECATED_RESOURCE_USED",
+ "DEPRECATED_TYPE_USED",
+ "DISK_SIZE_LARGER_THAN_IMAGE_SIZE",
+ "EXPERIMENTAL_TYPE_USED",
+ "EXTERNAL_API_WARNING",
+ "FIELD_VALUE_OVERRIDEN",
+ "INJECTED_KERNELS_DEPRECATED",
+ "MISSING_TYPE_DEPENDENCY",
+ "NEXT_HOP_ADDRESS_NOT_ASSIGNED",
+ "NEXT_HOP_CANNOT_IP_FORWARD",
+ "NEXT_HOP_INSTANCE_NOT_FOUND",
+ "NEXT_HOP_INSTANCE_NOT_ON_NETWORK",
+ "NEXT_HOP_NOT_RUNNING",
+ "NOT_CRITICAL_ERROR",
+ "NO_RESULTS_ON_PAGE",
+ "REQUIRED_TOS_AGREEMENT",
+ "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING",
+ "RESOURCE_NOT_DELETED",
+ "SCHEMA_VALIDATION_IGNORED",
+ "SINGLE_INSTANCE_PROPERTY_TEMPLATE",
+ "UNDECLARED_PROPERTIES",
+ "UNREACHABLE"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "data": {
+ "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }",
+ "items": {
+ "properties": {
+ "key": {
+ "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).",
+ "type": "string"
+ },
+ "value": {
+ "description": "[Output Only] A warning data value corresponding to the key.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "description": "[Output Only] A human-readable description of the warning code.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "AllocationSpecificSKUAllocation": {
+ "description": "This allocation type allows to pre allocate specific instance configuration.",
+ "id": "AllocationSpecificSKUAllocation",
+ "properties": {
+ "count": {
+ "description": "Specifies number of resources that are allocated.",
+ "format": "int64",
+ "type": "string"
+ },
+ "inUseCount": {
+ "description": "[OutputOnly] Indicates how many resource are in use.",
+ "format": "int64",
+ "type": "string"
+ },
+ "instanceProperties": {
+ "$ref": "AllocationSpecificSKUAllocationAllocatedInstanceProperties"
+ }
+ },
+ "type": "object"
+ },
+ "AllocationSpecificSKUAllocationAllocatedInstanceProperties": {
+ "description": "Properties of the SKU instances being reserved.",
+ "id": "AllocationSpecificSKUAllocationAllocatedInstanceProperties",
+ "properties": {
+ "guestAccelerators": {
+ "description": "Specifies accelerator type and count.",
+ "items": {
+ "$ref": "AcceleratorConfig"
+ },
+ "type": "array"
+ },
+ "localSsds": {
+ "description": "Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.",
+ "items": {
+ "$ref": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk"
+ },
+ "type": "array"
+ },
+ "machineType": {
+ "description": "Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.",
+ "type": "string"
+ },
+ "minCpuPlatform": {
+ "description": "Minimum cpu platform the allocation.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk": {
+ "id": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk",
+ "properties": {
+ "diskSizeGb": {
+ "description": "Specifies the size of the disk in base-2 GB.",
+ "format": "int64",
+ "type": "string"
+ },
+ "interface": {
+ "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.",
+ "enum": [
+ "NVME",
+ "SCSI"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AllocationsScopedList": {
+ "id": "AllocationsScopedList",
+ "properties": {
+ "allocations": {
+ "description": "A list of allocations contained in this scope.",
+ "items": {
+ "$ref": "Allocation"
+ },
+ "type": "array"
+ },
+ "warning": {
+ "description": "Informational warning which replaces the list of allocations when the list is empty.",
+ "properties": {
+ "code": {
+ "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.",
+ "enum": [
+ "CLEANUP_FAILED",
+ "DEPRECATED_RESOURCE_USED",
+ "DEPRECATED_TYPE_USED",
+ "DISK_SIZE_LARGER_THAN_IMAGE_SIZE",
+ "EXPERIMENTAL_TYPE_USED",
+ "EXTERNAL_API_WARNING",
+ "FIELD_VALUE_OVERRIDEN",
+ "INJECTED_KERNELS_DEPRECATED",
+ "MISSING_TYPE_DEPENDENCY",
+ "NEXT_HOP_ADDRESS_NOT_ASSIGNED",
+ "NEXT_HOP_CANNOT_IP_FORWARD",
+ "NEXT_HOP_INSTANCE_NOT_FOUND",
+ "NEXT_HOP_INSTANCE_NOT_ON_NETWORK",
+ "NEXT_HOP_NOT_RUNNING",
+ "NOT_CRITICAL_ERROR",
+ "NO_RESULTS_ON_PAGE",
+ "REQUIRED_TOS_AGREEMENT",
+ "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING",
+ "RESOURCE_NOT_DELETED",
+ "SCHEMA_VALIDATION_IGNORED",
+ "SINGLE_INSTANCE_PROPERTY_TEMPLATE",
+ "UNDECLARED_PROPERTIES",
+ "UNREACHABLE"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "data": {
+ "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }",
+ "items": {
+ "properties": {
+ "key": {
+ "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).",
+ "type": "string"
+ },
+ "value": {
+ "description": "[Output Only] A warning data value corresponding to the key.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "description": "[Output Only] A human-readable description of the warning code.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
"AttachedDisk": {
"description": "An instance-attached disk resource.",
"id": "AttachedDisk",
@@ -22436,7 +23481,7 @@
"type": "number"
},
"utilizationTargetType": {
- "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.",
+ "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.",
"enum": [
"DELTA_PER_MINUTE",
"DELTA_PER_SECOND",
@@ -22584,7 +23629,7 @@
"id": "BackendBucketCdnPolicy",
"properties": {
"signedUrlCacheMaxAgeSec": {
- "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
+ "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
"format": "int64",
"type": "string"
},
@@ -22753,7 +23798,7 @@
"type": "boolean"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.",
"format": "byte",
"type": "string"
},
@@ -22985,7 +24030,7 @@
"description": "The CacheKeyPolicy for this CdnPolicy."
},
"signedUrlCacheMaxAgeSec": {
- "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
+ "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
"format": "int64",
"type": "string"
},
@@ -23324,6 +24369,13 @@
"description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts. (== resource_for beta.commitments ==) (== resource_for v1.commitments ==)",
"id": "Commitment",
"properties": {
+ "allocations": {
+ "description": "List of allocations for this commitment.",
+ "items": {
+ "$ref": "Allocation"
+ },
+ "type": "array"
+ },
"creationTimestamp": {
"description": "[Output Only] Creation timestamp in RFC3339 text format.",
"type": "string"
@@ -23927,7 +24979,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.",
+ "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.",
"format": "byte",
"type": "string"
},
@@ -23975,6 +25027,11 @@
"description": "Internal use only.",
"type": "string"
},
+ "physicalBlockSizeBytes": {
+ "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.",
+ "format": "int64",
+ "type": "string"
+ },
"region": {
"description": "[Output Only] URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.",
"type": "string"
@@ -24855,6 +25912,17 @@
},
"type": "object"
},
+ "DisplayDevice": {
+ "description": "A set of Display Device options",
+ "id": "DisplayDevice",
+ "properties": {
+ "enableDisplay": {
+ "description": "Defines whether the instance has Display enabled.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"DistributionPolicy": {
"id": "DistributionPolicy",
"properties": {
@@ -24884,6 +25952,154 @@
},
"type": "object"
},
+ "ExchangedPeeringRoute": {
+ "id": "ExchangedPeeringRoute",
+ "properties": {
+ "destRange": {
+ "description": "The destination range of the route.",
+ "type": "string"
+ },
+ "imported": {
+ "description": "If the peering route is imported if there is no confliction.",
+ "type": "boolean"
+ },
+ "nextHopRegion": {
+ "description": "The region of peering route next hop, only applies to dynamic routes.",
+ "type": "string"
+ },
+ "priority": {
+ "description": "The priority of the peering route.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "type": {
+ "description": "The type of the peering route.",
+ "enum": [
+ "DYNAMIC_PEERING_ROUTE",
+ "STATIC_PEERING_ROUTE",
+ "SUBNET_PEERING_ROUTE"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ExchangedPeeringRoutesList": {
+ "id": "ExchangedPeeringRoutesList",
+ "properties": {
+ "id": {
+ "description": "[Output Only] Unique identifier for the resource; defined by the server.",
+ "type": "string"
+ },
+ "items": {
+ "description": "A list of ExchangedPeeringRoute resources.",
+ "items": {
+ "$ref": "ExchangedPeeringRoute"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "compute#exchangedPeeringRoutesList",
+ "description": "[Output Only] Type of resource. Always compute#exchangedPeeringRoutesList for exchanged peering routes lists.",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.",
+ "type": "string"
+ },
+ "selfLink": {
+ "description": "[Output Only] Server-defined URL for this resource.",
+ "type": "string"
+ },
+ "warning": {
+ "description": "[Output Only] Informational warning message.",
+ "properties": {
+ "code": {
+ "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.",
+ "enum": [
+ "CLEANUP_FAILED",
+ "DEPRECATED_RESOURCE_USED",
+ "DEPRECATED_TYPE_USED",
+ "DISK_SIZE_LARGER_THAN_IMAGE_SIZE",
+ "EXPERIMENTAL_TYPE_USED",
+ "EXTERNAL_API_WARNING",
+ "FIELD_VALUE_OVERRIDEN",
+ "INJECTED_KERNELS_DEPRECATED",
+ "MISSING_TYPE_DEPENDENCY",
+ "NEXT_HOP_ADDRESS_NOT_ASSIGNED",
+ "NEXT_HOP_CANNOT_IP_FORWARD",
+ "NEXT_HOP_INSTANCE_NOT_FOUND",
+ "NEXT_HOP_INSTANCE_NOT_ON_NETWORK",
+ "NEXT_HOP_NOT_RUNNING",
+ "NOT_CRITICAL_ERROR",
+ "NO_RESULTS_ON_PAGE",
+ "REQUIRED_TOS_AGREEMENT",
+ "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING",
+ "RESOURCE_NOT_DELETED",
+ "SCHEMA_VALIDATION_IGNORED",
+ "SINGLE_INSTANCE_PROPERTY_TEMPLATE",
+ "UNDECLARED_PROPERTIES",
+ "UNREACHABLE"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "data": {
+ "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }",
+ "items": {
+ "properties": {
+ "key": {
+ "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).",
+ "type": "string"
+ },
+ "value": {
+ "description": "[Output Only] A warning data value corresponding to the key.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "message": {
+ "description": "[Output Only] A human-readable description of the warning code.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
"Expr": {
"description": "Represents an expression text. Example:\n\ntitle: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) \u003e 0\"",
"id": "Expr",
@@ -24983,7 +26199,7 @@
"type": "boolean"
},
"enableLogging": {
- "description": "This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.",
+ "description": "Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.",
"type": "boolean"
},
"id": {
@@ -24996,6 +26212,10 @@
"description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.",
"type": "string"
},
+ "logConfig": {
+ "$ref": "FirewallLogConfig",
+ "description": "This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver."
+ },
"name": {
"annotations": {
"required": [
@@ -25170,6 +26390,17 @@
},
"type": "object"
},
+ "FirewallLogConfig": {
+ "description": "The available logging options for a firewall rule.",
+ "id": "FirewallLogConfig",
+ "properties": {
+ "enable": {
+ "description": "This field denotes whether to enable logging for a particular firewall rule.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"FixedOrPercent": {
"description": "Encapsulates numeric value that can be either absolute or relative.",
"id": "FixedOrPercent",
@@ -25261,7 +26492,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this resource, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a ForwardingRule.",
+ "description": "A fingerprint for the labels being applied to this resource, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a ForwardingRule.",
"format": "byte",
"type": "string"
},
@@ -25312,7 +26543,7 @@
"type": "string"
},
"ports": {
- "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.",
+ "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.",
"items": {
"type": "string"
},
@@ -25677,7 +26908,7 @@
"id": "GlobalSetLabelsRequest",
"properties": {
"labelFingerprint": {
- "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a get() request to the resource to get the latest fingerprint.",
+ "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.",
"format": "byte",
"type": "string"
},
@@ -25695,7 +26926,7 @@
"id": "GlobalSetPolicyRequest",
"properties": {
"bindings": {
- "description": "Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
"items": {
"$ref": "Binding"
},
@@ -26671,7 +27902,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.",
+ "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.",
"format": "byte",
"type": "string"
},
@@ -26921,6 +28152,10 @@
"description": "An Instance resource. (== resource_for beta.instances ==) (== resource_for v1.instances ==)",
"id": "Instance",
"properties": {
+ "allocationAffinity": {
+ "$ref": "AllocationAffinity",
+ "description": "The configuration of desired allocations which this Instance could consume capacity from."
+ },
"canIpForward": {
"description": "Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.",
"type": "boolean"
@@ -26948,6 +28183,10 @@
},
"type": "array"
},
+ "displayDevice": {
+ "$ref": "DisplayDevice",
+ "description": "Enables display device for the instance."
+ },
"guestAccelerators": {
"description": "A list of the type and count of accelerator cards attached to the instance.",
"items": {
@@ -27536,7 +28775,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager.\n\nTo see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.",
+ "description": "Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.",
"format": "byte",
"type": "string"
},
@@ -28476,7 +29715,7 @@
"id": "InstanceGroupsSetNamedPortsRequest",
"properties": {
"fingerprint": {
- "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.",
+ "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. A request with an incorrect fingerprint will fail with error 412 conditionNotMet.",
"format": "byte",
"type": "string"
},
@@ -28732,6 +29971,10 @@
"description": "",
"id": "InstanceProperties",
"properties": {
+ "allocationAffinity": {
+ "$ref": "AllocationAffinity",
+ "description": "The configuration of desired allocations which this Instance could consume capacity from."
+ },
"canIpForward": {
"description": "Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.",
"type": "boolean"
@@ -29286,7 +30529,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this Interconnect, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an Interconnect.",
+ "description": "A fingerprint for the labels being applied to this Interconnect, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an Interconnect.",
"format": "byte",
"type": "string"
},
@@ -29379,7 +30622,7 @@
"type": "boolean"
},
"bandwidth": {
- "description": "Provisioned bandwidth capacity for the interconnectAttachment. Can be set by the partner to update the customer's provisioned bandwidth. Output only for for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED.",
+ "description": "Provisioned bandwidth capacity for the interconnectAttachment. Can be set by the partner to update the customer's provisioned bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED.",
"enum": [
"BPS_100M",
"BPS_10G",
@@ -29462,7 +30705,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this InterconnectAttachment, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an InterconnectAttachment.",
+ "description": "A fingerprint for the labels being applied to this InterconnectAttachment, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an InterconnectAttachment.",
"format": "byte",
"type": "string"
},
@@ -29512,7 +30755,7 @@
"type": "string"
},
"router": {
- "description": "URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.",
+ "description": "URL of the Cloud Router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.",
"type": "string"
},
"selfLink": {
@@ -29555,7 +30798,7 @@
"type": "string"
},
"vlanTag8021q": {
- "description": "Available only for DEDICATED and PARTNER_PROVIDER. Desired VLAN tag for this attachment, in the range 2-4094. This field refers to 802.1q VLAN tag, also known as IEEE 802.1Q Only specified at creation time.",
+ "description": "The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. Only specified at creation time.",
"format": "int32",
"type": "integer"
}
@@ -29791,7 +31034,7 @@
"id": "InterconnectAttachmentPartnerMetadata",
"properties": {
"interconnectName": {
- "description": "Plain text name of the Interconnect this attachment is connected to, as displayed in the Partner?s portal. For instance ?Chicago 1?. This value may be validated to match approved Partner values.",
+ "description": "Plain text name of the Interconnect this attachment is connected to, as displayed in the Partner?s portal. For instance \"Chicago 1\". This value may be validated to match approved Partner values.",
"type": "string"
},
"partnerName": {
@@ -30016,7 +31259,7 @@
"type": "string"
},
"value": {
- "description": "Value of the current optical power, read in dBm.",
+ "description": "Value of the current optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.",
"format": "float",
"type": "number"
}
@@ -30253,6 +31496,18 @@
"selfLink": {
"description": "[Output Only] Server-defined URL for the resource.",
"type": "string"
+ },
+ "status": {
+ "description": "[Output Only] The status of this InterconnectLocation. If the status is AVAILABLE, new Interconnects may be provisioned in this InterconnectLocation. Otherwise, no new Interconnects may be provisioned.",
+ "enum": [
+ "AVAILABLE",
+ "CLOSED"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "type": "string"
}
},
"type": "object"
@@ -31333,7 +32588,7 @@
"id": "Metadata",
"properties": {
"fingerprint": {
- "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make a get() request to retrieve the resource.",
+ "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve the resource.",
"format": "byte",
"type": "string"
},
@@ -32079,7 +33334,7 @@
"type": "array"
},
"fingerprint": {
- "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface.",
+ "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.",
"format": "byte",
"type": "string"
},
@@ -32224,7 +33479,19 @@
"id": "NetworkPeering",
"properties": {
"autoCreateRoutes": {
- "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.",
+ "description": "Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.",
+ "type": "boolean"
+ },
+ "exchangeSubnetRoutes": {
+ "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.",
+ "type": "boolean"
+ },
+ "exportCustomRoutes": {
+ "description": "Whether to export the custom routes to peer network.",
+ "type": "boolean"
+ },
+ "importCustomRoutes": {
+ "description": "Whether to import the custom routes from peer network.",
"type": "boolean"
},
"name": {
@@ -32289,6 +33556,10 @@
"description": "Name of the peering, which should conform to RFC1035.",
"type": "string"
},
+ "networkPeering": {
+ "$ref": "NetworkPeering",
+ "description": "Network peering parameters. In order to specify route policies for peering using import/export custom routes, you will have to fill all peering related parameters (name, peer network, exchange_subnet_routes) in network_peeringfield. Corresponding fields in NetworksAddPeeringRequest will be deprecated soon."
+ },
"peerNetwork": {
"description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.",
"type": "string"
@@ -32306,6 +33577,15 @@
},
"type": "object"
},
+ "NetworksUpdatePeeringRequest": {
+ "id": "NetworksUpdatePeeringRequest",
+ "properties": {
+ "networkPeering": {
+ "$ref": "NetworkPeering"
+ }
+ },
+ "type": "object"
+ },
"NodeGroup": {
"description": "A NodeGroup resource.",
"id": "NodeGroup",
@@ -35949,7 +37229,7 @@
"type": "string"
},
"startTime": {
- "description": "Time within the window to start the operations. It must be in format \"HH:MM?, where HH : [00-23] and MM : [00-00] GMT.",
+ "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.",
"type": "string"
}
},
@@ -35969,7 +37249,7 @@
"type": "integer"
},
"startTime": {
- "description": "Time within the window to start the operations. It must be in format \"HH:MM?, where HH : [00-23] and MM : [00-00] GMT.",
+ "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.",
"type": "string"
}
},
@@ -36135,7 +37415,7 @@
"type": "string"
},
"startTime": {
- "description": "Time within the window to start the operations. It must be in format \"HH:MM?, where HH : [00-23] and MM : [00-00] GMT.",
+ "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.",
"type": "string"
}
},
@@ -36741,7 +38021,7 @@
"type": "string"
},
"managementType": {
- "description": "[Output Only] Type of how the resource/configuration of the BGP peer is managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT represents an BGP peer that is automatically created for PARTNER interconnectAttachment, Google will automatically create/delete this type of BGP peer when the PARTNER interconnectAttachment is created/deleted.",
+ "description": "[Output Only] The resource that configures and manages this BGP peer. MANAGED_BY_USER is the default value and can be managed by you or other users; MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google will automatically create, update, and delete this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.",
"enum": [
"MANAGED_BY_ATTACHMENT",
"MANAGED_BY_USER"
@@ -36785,7 +38065,7 @@
"type": "string"
},
"managementType": {
- "description": "[Output Only] Type of how the resource/configuration of the interface is managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT represents an interface that is automatically created for PARTNER type interconnectAttachment, Google will automatically create/update/delete this type of interface when the PARTNER interconnectAttachment is created/provisioned/deleted.",
+ "description": "[Output Only] The resource that configures and manages this interface. MANAGED_BY_USER is the default value and can be managed by you or other users; MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google will automatically create, update, and delete this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.",
"enum": [
"MANAGED_BY_ATTACHMENT",
"MANAGED_BY_USER"
@@ -37496,7 +38776,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the security policy.",
+ "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make get() request to the security policy.",
"format": "byte",
"type": "string"
},
@@ -37683,7 +38963,7 @@
"type": "boolean"
},
"priority": {
- "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated in the increasing order of priority.",
+ "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.",
"format": "int32",
"type": "integer"
}
@@ -37800,7 +39080,8 @@
"id": "ShieldedVmIdentity",
"properties": {
"encryptionKey": {
- "$ref": "ShieldedVmIdentityEntry"
+ "$ref": "ShieldedVmIdentityEntry",
+ "description": "An Endorsement Key (EK) issued to the Shielded VM's vTPM."
},
"kind": {
"default": "compute#shieldedVmIdentity",
@@ -37808,7 +39089,8 @@
"type": "string"
},
"signingKey": {
- "$ref": "ShieldedVmIdentityEntry"
+ "$ref": "ShieldedVmIdentityEntry",
+ "description": "An Attestation Key (AK) issued to the Shielded VM's vTPM."
}
},
"type": "object"
@@ -37818,9 +39100,11 @@
"id": "ShieldedVmIdentityEntry",
"properties": {
"ekCert": {
+ "description": "A PEM-encoded X.509 certificate. This field can be empty.",
"type": "string"
},
"ekPub": {
+ "description": "A PEM-encoded public key.",
"type": "string"
}
},
@@ -37885,7 +39169,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.",
+ "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.",
"format": "byte",
"type": "string"
},
@@ -38518,7 +39802,7 @@
"type": "array"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy.\n\nTo see the latest fingerprint, make a get() request to retrieve an SslPolicy.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an SslPolicy.",
"format": "byte",
"type": "string"
},
@@ -38689,7 +39973,7 @@
"type": "boolean"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork.\n\nTo see the latest fingerprint, make a get() request to retrieve a Subnetwork.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a Subnetwork.",
"format": "byte",
"type": "string"
},
@@ -38729,7 +40013,7 @@
"type": "string"
},
"secondaryIpRanges": {
- "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.",
+ "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.",
"items": {
"$ref": "SubnetworkSecondaryRange"
},
@@ -40799,7 +42083,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this TargetVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a TargetVpnGateway.",
+ "description": "A fingerprint for the labels being applied to this TargetVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a TargetVpnGateway.",
"format": "byte",
"type": "string"
},
@@ -41242,7 +42526,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap.\n\nTo see the latest fingerprint, make a get() request to retrieve a UrlMap.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a UrlMap.",
"format": "byte",
"type": "string"
},
@@ -41834,7 +43118,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a VpnTunnel.",
+ "description": "A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a VpnTunnel.",
"format": "byte",
"type": "string"
},
diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go
index 355cd1c..e3be3a4 100644
--- a/compute/v0.beta/compute-gen.go
+++ b/compute/v0.beta/compute-gen.go
@@ -78,6 +78,7 @@
s := &Service{client: client, BasePath: basePath}
s.AcceleratorTypes = NewAcceleratorTypesService(s)
s.Addresses = NewAddressesService(s)
+ s.Allocations = NewAllocationsService(s)
s.Autoscalers = NewAutoscalersService(s)
s.BackendBuckets = NewBackendBucketsService(s)
s.BackendServices = NewBackendServicesService(s)
@@ -148,6 +149,8 @@
Addresses *AddressesService
+ Allocations *AllocationsService
+
Autoscalers *AutoscalersService
BackendBuckets *BackendBucketsService
@@ -290,6 +293,15 @@
s *Service
}
+func NewAllocationsService(s *Service) *AllocationsService {
+ rs := &AllocationsService{s: s}
+ return rs
+}
+
+type AllocationsService struct {
+ s *Service
+}
+
func NewAutoscalersService(s *Service) *AutoscalersService {
rs := &AutoscalersService{s: s}
return rs
@@ -1484,7 +1496,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// Address.
@@ -1509,8 +1522,12 @@
Network string `json:"network,omitempty"`
// NetworkTier: This signifies the networking tier used for configuring
- // this Address and can only take the following values: PREMIUM ,
- // STANDARD.
+ // this Address and can only take the following values: PREMIUM,
+ // STANDARD. Global forwarding rules can only be Premium Tier. Regional
+ // forwarding rules can be either Premium or Standard Tier. Standard
+ // Tier addresses applied to regional forwarding rules can be used with
+ // any external load balancer. Regional forwarding rules in Premium Tier
+ // can only be used with a Network load balancer.
//
// If this field is not specified, it is assumed to be PREMIUM.
//
@@ -1528,7 +1545,6 @@
// Possible values:
// "DNS_RESOLVER"
// "GCE_ENDPOINT"
- // "UNSPECIFIED_PURPOSE"
// "VPC_PEERING"
Purpose string `json:"purpose,omitempty"`
@@ -2072,6 +2088,671 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Allocation: Allocation resource
+type Allocation struct {
+ // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
+ // format.
+ CreationTimestamp string `json:"creationTimestamp,omitempty"`
+
+ Description string `json:"description,omitempty"`
+
+ // Id: [Output Only] The unique identifier for the resource. This
+ // identifier is defined by the server.
+ Id uint64 `json:"id,omitempty,string"`
+
+ // Kind: [Output Only] Type of the resource. Always compute#allocations
+ // for allocations.
+ Kind string `json:"kind,omitempty"`
+
+ // Name: The name of the resource, provided by the client when initially
+ // creating the resource. The resource name must be 1-63 characters
+ // long, and comply with RFC1035. Specifically, the name must be 1-63
+ // characters long and match the regular expression
+ // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be
+ // a lowercase letter, and all following characters must be a dash,
+ // lowercase letter, or digit, except the last character, which cannot
+ // be a dash.
+ Name string `json:"name,omitempty"`
+
+ // SelfLink: [Output Only] Server-defined fully-qualified URL for this
+ // resource.
+ SelfLink string `json:"selfLink,omitempty"`
+
+ SpecificAllocation *AllocationSpecificSKUAllocation `json:"specificAllocation,omitempty"`
+
+ // SpecificAllocationRequired: Indicates whether the allocation can be
+ // consumed by VMs with "any allocation" defined. If the field is set,
+ // then only VMs that target the allocation by name using
+ // --allocation-affinity can consume this allocation.
+ SpecificAllocationRequired bool `json:"specificAllocationRequired,omitempty"`
+
+ Zone string `json:"zone,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CreationTimestamp")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CreationTimestamp") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Allocation) MarshalJSON() ([]byte, error) {
+ type NoMethod Allocation
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AllocationAffinity: AllocationAffinity is the configuration of
+// desired allocation which this instance could take capacity from.
+type AllocationAffinity struct {
+ // Possible values:
+ // "ANY_ALLOCATION"
+ // "NO_ALLOCATION"
+ // "SPECIFIC_ALLOCATION"
+ // "UNSPECIFIED"
+ ConsumeAllocationType string `json:"consumeAllocationType,omitempty"`
+
+ // Key: Corresponds to the label key of allocation resource.
+ Key string `json:"key,omitempty"`
+
+ // Values: Corresponds to the label values of allocation resource.
+ Values []string `json:"values,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "ConsumeAllocationType") to unconditionally include in API requests.
+ // By default, fields with empty values are omitted from API requests.
+ // However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ConsumeAllocationType") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationAffinity) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationAffinity
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AllocationAggregatedList: Contains a list of allocations.
+type AllocationAggregatedList struct {
+ // Id: [Output Only] Unique identifier for the resource; defined by the
+ // server.
+ Id string `json:"id,omitempty"`
+
+ // Items: A list of Allocation resources.
+ Items map[string]AllocationsScopedList `json:"items,omitempty"`
+
+ // Kind: Type of resource.
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: [Output Only] This token allows you to get the next
+ // page of results for list requests. If the number of results is larger
+ // than maxResults, use the nextPageToken as a value for the query
+ // parameter pageToken in the next list request. Subsequent list
+ // requests will have their own nextPageToken to continue paging through
+ // the results.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // SelfLink: [Output Only] Server-defined URL for this resource.
+ SelfLink string `json:"selfLink,omitempty"`
+
+ // Warning: [Output Only] Informational warning message.
+ Warning *AllocationAggregatedListWarning `json:"warning,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Id") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Id") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationAggregatedList) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationAggregatedList
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AllocationAggregatedListWarning: [Output Only] Informational warning
+// message.
+type AllocationAggregatedListWarning struct {
+ // Code: [Output Only] A warning code, if applicable. For example,
+ // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
+ // the response.
+ //
+ // Possible values:
+ // "CLEANUP_FAILED"
+ // "DEPRECATED_RESOURCE_USED"
+ // "DEPRECATED_TYPE_USED"
+ // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
+ // "EXPERIMENTAL_TYPE_USED"
+ // "EXTERNAL_API_WARNING"
+ // "FIELD_VALUE_OVERRIDEN"
+ // "INJECTED_KERNELS_DEPRECATED"
+ // "MISSING_TYPE_DEPENDENCY"
+ // "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
+ // "NEXT_HOP_CANNOT_IP_FORWARD"
+ // "NEXT_HOP_INSTANCE_NOT_FOUND"
+ // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
+ // "NEXT_HOP_NOT_RUNNING"
+ // "NOT_CRITICAL_ERROR"
+ // "NO_RESULTS_ON_PAGE"
+ // "REQUIRED_TOS_AGREEMENT"
+ // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
+ // "RESOURCE_NOT_DELETED"
+ // "SCHEMA_VALIDATION_IGNORED"
+ // "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
+ // "UNDECLARED_PROPERTIES"
+ // "UNREACHABLE"
+ Code string `json:"code,omitempty"`
+
+ // Data: [Output Only] Metadata about this warning in key: value format.
+ // For example:
+ // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
+ Data []*AllocationAggregatedListWarningData `json:"data,omitempty"`
+
+ // Message: [Output Only] A human-readable description of the warning
+ // code.
+ Message string `json:"message,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Code") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Code") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationAggregatedListWarning) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationAggregatedListWarning
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AllocationAggregatedListWarningData struct {
+ // Key: [Output Only] A key that provides more detail on the warning
+ // being returned. For example, for warnings where there are no results
+ // in a list request for a particular zone, this key might be scope and
+ // the key value might be the zone name. Other examples might be a key
+ // indicating a deprecated resource and a suggested replacement, or a
+ // warning about invalid network settings (for example, if an instance
+ // attempts to perform IP forwarding but is not enabled for IP
+ // forwarding).
+ Key string `json:"key,omitempty"`
+
+ // Value: [Output Only] A warning data value corresponding to the key.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Key") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Key") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationAggregatedListWarningData) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationAggregatedListWarningData
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AllocationList struct {
+ // Id: [Output Only] The unique identifier for the resource. This
+ // identifier is defined by the server.
+ Id string `json:"id,omitempty"`
+
+ // Items: [Output Only] A list of Allocation resources.
+ Items []*Allocation `json:"items,omitempty"`
+
+ // Kind: [Output Only] Type of resource.Always compute#allocationsList
+ // for listsof allocations
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: [Output Only] This token allows you to get the next
+ // page of results for list requests. If the number of results is larger
+ // than maxResults, use the nextPageToken as a value for the query
+ // parameter pageToken in the next list request. Subsequent list
+ // requests will have their own nextPageToken to continue paging through
+ // the results.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // SelfLink: [Output Only] Server-defined URL for this resource.
+ SelfLink string `json:"selfLink,omitempty"`
+
+ // Warning: [Output Only] Informational warning message.
+ Warning *AllocationListWarning `json:"warning,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Id") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Id") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationList) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationList
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AllocationListWarning: [Output Only] Informational warning message.
+type AllocationListWarning struct {
+ // Code: [Output Only] A warning code, if applicable. For example,
+ // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
+ // the response.
+ //
+ // Possible values:
+ // "CLEANUP_FAILED"
+ // "DEPRECATED_RESOURCE_USED"
+ // "DEPRECATED_TYPE_USED"
+ // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
+ // "EXPERIMENTAL_TYPE_USED"
+ // "EXTERNAL_API_WARNING"
+ // "FIELD_VALUE_OVERRIDEN"
+ // "INJECTED_KERNELS_DEPRECATED"
+ // "MISSING_TYPE_DEPENDENCY"
+ // "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
+ // "NEXT_HOP_CANNOT_IP_FORWARD"
+ // "NEXT_HOP_INSTANCE_NOT_FOUND"
+ // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
+ // "NEXT_HOP_NOT_RUNNING"
+ // "NOT_CRITICAL_ERROR"
+ // "NO_RESULTS_ON_PAGE"
+ // "REQUIRED_TOS_AGREEMENT"
+ // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
+ // "RESOURCE_NOT_DELETED"
+ // "SCHEMA_VALIDATION_IGNORED"
+ // "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
+ // "UNDECLARED_PROPERTIES"
+ // "UNREACHABLE"
+ Code string `json:"code,omitempty"`
+
+ // Data: [Output Only] Metadata about this warning in key: value format.
+ // For example:
+ // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
+ Data []*AllocationListWarningData `json:"data,omitempty"`
+
+ // Message: [Output Only] A human-readable description of the warning
+ // code.
+ Message string `json:"message,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Code") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Code") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationListWarning) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationListWarning
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AllocationListWarningData struct {
+ // Key: [Output Only] A key that provides more detail on the warning
+ // being returned. For example, for warnings where there are no results
+ // in a list request for a particular zone, this key might be scope and
+ // the key value might be the zone name. Other examples might be a key
+ // indicating a deprecated resource and a suggested replacement, or a
+ // warning about invalid network settings (for example, if an instance
+ // attempts to perform IP forwarding but is not enabled for IP
+ // forwarding).
+ Key string `json:"key,omitempty"`
+
+ // Value: [Output Only] A warning data value corresponding to the key.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Key") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Key") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationListWarningData) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationListWarningData
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AllocationSpecificSKUAllocation: This allocation type allows to pre
+// allocate specific instance configuration.
+type AllocationSpecificSKUAllocation struct {
+ // Count: Specifies number of resources that are allocated.
+ Count int64 `json:"count,omitempty,string"`
+
+ // InUseCount: [OutputOnly] Indicates how many resource are in use.
+ InUseCount int64 `json:"inUseCount,omitempty,string"`
+
+ InstanceProperties *AllocationSpecificSKUAllocationAllocatedInstanceProperties `json:"instanceProperties,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Count") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Count") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationSpecificSKUAllocation) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationSpecificSKUAllocation
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AllocationSpecificSKUAllocationAllocatedInstanceProperties:
+// Properties of the SKU instances being reserved.
+type AllocationSpecificSKUAllocationAllocatedInstanceProperties struct {
+ // GuestAccelerators: Specifies accelerator type and count.
+ GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"`
+
+ // LocalSsds: Specifies amount of local ssd to reserve with each
+ // instance. The type of disk is local-ssd.
+ LocalSsds []*AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk `json:"localSsds,omitempty"`
+
+ // MachineType: Specifies type of machine (name only) which has fixed
+ // number of vCPUs and fixed amount of memory. This also includes
+ // specifying custom machine type following
+ // custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
+ MachineType string `json:"machineType,omitempty"`
+
+ // MinCpuPlatform: Minimum cpu platform the allocation.
+ MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "GuestAccelerators")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "GuestAccelerators") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationSpecificSKUAllocationAllocatedInstanceProperties) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationSpecificSKUAllocationAllocatedInstanceProperties
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk struct {
+ // DiskSizeGb: Specifies the size of the disk in base-2 GB.
+ DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
+
+ // Interface: Specifies the disk interface to use for attaching this
+ // disk, which is either SCSI or NVME. The default is SCSI. For
+ // performance characteristics of SCSI over NVMe, see Local SSD
+ // performance.
+ //
+ // Possible values:
+ // "NVME"
+ // "SCSI"
+ Interface string `json:"interface,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DiskSizeGb") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationSpecificSKUAllocationAllocatedInstancePropertiesAllocatedDisk
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AllocationsScopedList struct {
+ // Allocations: A list of allocations contained in this scope.
+ Allocations []*Allocation `json:"allocations,omitempty"`
+
+ // Warning: Informational warning which replaces the list of allocations
+ // when the list is empty.
+ Warning *AllocationsScopedListWarning `json:"warning,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Allocations") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Allocations") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationsScopedList) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationsScopedList
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AllocationsScopedListWarning: Informational warning which replaces
+// the list of allocations when the list is empty.
+type AllocationsScopedListWarning struct {
+ // Code: [Output Only] A warning code, if applicable. For example,
+ // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
+ // the response.
+ //
+ // Possible values:
+ // "CLEANUP_FAILED"
+ // "DEPRECATED_RESOURCE_USED"
+ // "DEPRECATED_TYPE_USED"
+ // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
+ // "EXPERIMENTAL_TYPE_USED"
+ // "EXTERNAL_API_WARNING"
+ // "FIELD_VALUE_OVERRIDEN"
+ // "INJECTED_KERNELS_DEPRECATED"
+ // "MISSING_TYPE_DEPENDENCY"
+ // "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
+ // "NEXT_HOP_CANNOT_IP_FORWARD"
+ // "NEXT_HOP_INSTANCE_NOT_FOUND"
+ // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
+ // "NEXT_HOP_NOT_RUNNING"
+ // "NOT_CRITICAL_ERROR"
+ // "NO_RESULTS_ON_PAGE"
+ // "REQUIRED_TOS_AGREEMENT"
+ // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
+ // "RESOURCE_NOT_DELETED"
+ // "SCHEMA_VALIDATION_IGNORED"
+ // "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
+ // "UNDECLARED_PROPERTIES"
+ // "UNREACHABLE"
+ Code string `json:"code,omitempty"`
+
+ // Data: [Output Only] Metadata about this warning in key: value format.
+ // For example:
+ // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
+ Data []*AllocationsScopedListWarningData `json:"data,omitempty"`
+
+ // Message: [Output Only] A human-readable description of the warning
+ // code.
+ Message string `json:"message,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Code") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Code") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationsScopedListWarning) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationsScopedListWarning
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AllocationsScopedListWarningData struct {
+ // Key: [Output Only] A key that provides more detail on the warning
+ // being returned. For example, for warnings where there are no results
+ // in a list request for a particular zone, this key might be scope and
+ // the key value might be the zone name. Other examples might be a key
+ // indicating a deprecated resource and a suggested replacement, or a
+ // warning about invalid network settings (for example, if an instance
+ // attempts to perform IP forwarding but is not enabled for IP
+ // forwarding).
+ Key string `json:"key,omitempty"`
+
+ // Value: [Output Only] A warning data value corresponding to the key.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Key") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Key") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AllocationsScopedListWarningData) MarshalJSON() ([]byte, error) {
+ type NoMethod AllocationsScopedListWarningData
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// AttachedDisk: An instance-attached disk resource.
type AttachedDisk struct {
// AutoDelete: Specifies whether the disk will be auto-deleted when the
@@ -3245,8 +3926,7 @@
// UtilizationTargetType: Defines how target utilization value is
// expressed for a Stackdriver Monitoring metric. Either GAUGE,
- // DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default
- // is GAUGE.
+ // DELTA_PER_SECOND, or DELTA_PER_MINUTE.
//
// Possible values:
// "DELTA_PER_MINUTE"
@@ -3568,7 +4248,7 @@
// the response will be revalidated before being served. Defaults to 1hr
// (3600s). When serving responses to signed URL requests, Cloud CDN
// will internally behave as though all responses from this backend had
- // a ?Cache-Control: public, max-age=[TTL]? header, regardless of any
+ // a "Cache-Control: public, max-age=[TTL]" header, regardless of any
// existing Cache-Control header. The actual headers served in responses
// will not be altered.
SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"`
@@ -3798,8 +4478,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a BackendService. An up-to-date
- // fingerprint must be provided in order to update the
- // BackendService.
+ // fingerprint must be provided in order to update the BackendService,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// BackendService.
@@ -4109,7 +4789,7 @@
// the response will be revalidated before being served. Defaults to 1hr
// (3600s). When serving responses to signed URL requests, Cloud CDN
// will internally behave as though all responses from this backend had
- // a ?Cache-Control: public, max-age=[TTL]? header, regardless of any
+ // a "Cache-Control: public, max-age=[TTL]" header, regardless of any
// existing Cache-Control header. The actual headers served in responses
// will not be altered.
SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"`
@@ -4689,6 +5369,9 @@
// must purchase a new commitment to continue receiving discounts. (==
// resource_for beta.commitments ==) (== resource_for v1.commitments ==)
type Commitment struct {
+ // Allocations: List of allocations for this commitment.
+ Allocations []*Allocation `json:"allocations,omitempty"`
+
// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
// format.
CreationTimestamp string `json:"creationTimestamp,omitempty"`
@@ -4762,21 +5445,20 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "CreationTimestamp")
- // to unconditionally include in API requests. By default, fields with
+ // ForceSendFields is a list of field names (e.g. "Allocations") to
+ // unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "CreationTimestamp") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
+ // NullFields is a list of field names (e.g. "Allocations") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
@@ -5522,7 +6204,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// disk.
@@ -5560,6 +6243,13 @@
// Options: Internal use only.
Options string `json:"options,omitempty"`
+ // PhysicalBlockSizeBytes: Physical block size of the persistent disk,
+ // in bytes. If not present in a request, a default value is used.
+ // Currently supported sizes are 4096 and 16384, other sizes may be
+ // added in the future. If an unsupported value is requested, the error
+ // message will list the supported values for the caller's project.
+ PhysicalBlockSizeBytes int64 `json:"physicalBlockSizeBytes,omitempty,string"`
+
// Region: [Output Only] URL of the region where the disk resides. Only
// applicable for regional resources. You must specify this field as
// part of the HTTP request URL. It is not settable as a field in the
@@ -6866,6 +7556,34 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// DisplayDevice: A set of Display Device options
+type DisplayDevice struct {
+ // EnableDisplay: Defines whether the instance has Display enabled.
+ EnableDisplay bool `json:"enableDisplay,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "EnableDisplay") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "EnableDisplay") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DisplayDevice) MarshalJSON() ([]byte, error) {
+ type NoMethod DisplayDevice
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
type DistributionPolicy struct {
// Zones: Zones where the regional managed instance group will create
// and manage instances.
@@ -6922,6 +7640,208 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+type ExchangedPeeringRoute struct {
+ // DestRange: The destination range of the route.
+ DestRange string `json:"destRange,omitempty"`
+
+ // Imported: If the peering route is imported if there is no
+ // confliction.
+ Imported bool `json:"imported,omitempty"`
+
+ // NextHopRegion: The region of peering route next hop, only applies to
+ // dynamic routes.
+ NextHopRegion string `json:"nextHopRegion,omitempty"`
+
+ // Priority: The priority of the peering route.
+ Priority int64 `json:"priority,omitempty"`
+
+ // Type: The type of the peering route.
+ //
+ // Possible values:
+ // "DYNAMIC_PEERING_ROUTE"
+ // "STATIC_PEERING_ROUTE"
+ // "SUBNET_PEERING_ROUTE"
+ Type string `json:"type,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DestRange") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DestRange") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ExchangedPeeringRoute) MarshalJSON() ([]byte, error) {
+ type NoMethod ExchangedPeeringRoute
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ExchangedPeeringRoutesList struct {
+ // Id: [Output Only] Unique identifier for the resource; defined by the
+ // server.
+ Id string `json:"id,omitempty"`
+
+ // Items: A list of ExchangedPeeringRoute resources.
+ Items []*ExchangedPeeringRoute `json:"items,omitempty"`
+
+ // Kind: [Output Only] Type of resource. Always
+ // compute#exchangedPeeringRoutesList for exchanged peering routes
+ // lists.
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: [Output Only] This token allows you to get the next
+ // page of results for list requests. If the number of results is larger
+ // than maxResults, use the nextPageToken as a value for the query
+ // parameter pageToken in the next list request. Subsequent list
+ // requests will have their own nextPageToken to continue paging through
+ // the results.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // SelfLink: [Output Only] Server-defined URL for this resource.
+ SelfLink string `json:"selfLink,omitempty"`
+
+ // Warning: [Output Only] Informational warning message.
+ Warning *ExchangedPeeringRoutesListWarning `json:"warning,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Id") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Id") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ExchangedPeeringRoutesList) MarshalJSON() ([]byte, error) {
+ type NoMethod ExchangedPeeringRoutesList
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ExchangedPeeringRoutesListWarning: [Output Only] Informational
+// warning message.
+type ExchangedPeeringRoutesListWarning struct {
+ // Code: [Output Only] A warning code, if applicable. For example,
+ // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
+ // the response.
+ //
+ // Possible values:
+ // "CLEANUP_FAILED"
+ // "DEPRECATED_RESOURCE_USED"
+ // "DEPRECATED_TYPE_USED"
+ // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
+ // "EXPERIMENTAL_TYPE_USED"
+ // "EXTERNAL_API_WARNING"
+ // "FIELD_VALUE_OVERRIDEN"
+ // "INJECTED_KERNELS_DEPRECATED"
+ // "MISSING_TYPE_DEPENDENCY"
+ // "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
+ // "NEXT_HOP_CANNOT_IP_FORWARD"
+ // "NEXT_HOP_INSTANCE_NOT_FOUND"
+ // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
+ // "NEXT_HOP_NOT_RUNNING"
+ // "NOT_CRITICAL_ERROR"
+ // "NO_RESULTS_ON_PAGE"
+ // "REQUIRED_TOS_AGREEMENT"
+ // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
+ // "RESOURCE_NOT_DELETED"
+ // "SCHEMA_VALIDATION_IGNORED"
+ // "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
+ // "UNDECLARED_PROPERTIES"
+ // "UNREACHABLE"
+ Code string `json:"code,omitempty"`
+
+ // Data: [Output Only] Metadata about this warning in key: value format.
+ // For example:
+ // "data": [ { "key": "scope", "value": "zones/us-east1-d" }
+ Data []*ExchangedPeeringRoutesListWarningData `json:"data,omitempty"`
+
+ // Message: [Output Only] A human-readable description of the warning
+ // code.
+ Message string `json:"message,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Code") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Code") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ExchangedPeeringRoutesListWarning) MarshalJSON() ([]byte, error) {
+ type NoMethod ExchangedPeeringRoutesListWarning
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ExchangedPeeringRoutesListWarningData struct {
+ // Key: [Output Only] A key that provides more detail on the warning
+ // being returned. For example, for warnings where there are no results
+ // in a list request for a particular zone, this key might be scope and
+ // the key value might be the zone name. Other examples might be a key
+ // indicating a deprecated resource and a suggested replacement, or a
+ // warning about invalid network settings (for example, if an instance
+ // attempts to perform IP forwarding but is not enabled for IP
+ // forwarding).
+ Key string `json:"key,omitempty"`
+
+ // Value: [Output Only] A warning data value corresponding to the key.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Key") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Key") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ExchangedPeeringRoutesListWarningData) MarshalJSON() ([]byte, error) {
+ type NoMethod ExchangedPeeringRoutesListWarningData
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Expr: Represents an expression text. Example:
//
// title: "User account presence" description: "Determines whether the
@@ -7014,9 +7934,9 @@
// not exist. If this is unspecified, the firewall rule will be enabled.
Disabled bool `json:"disabled,omitempty"`
- // EnableLogging: This field denotes whether to enable logging for a
- // particular firewall rule. If logging is enabled, logs will be
- // exported to Stackdriver.
+ // EnableLogging: Deprecated in favor of enable in LogConfig. This field
+ // denotes whether to enable logging for a particular firewall rule. If
+ // logging is enabled, logs will be exported to Stackdriver.
EnableLogging bool `json:"enableLogging,omitempty"`
// Id: [Output Only] The unique identifier for the resource. This
@@ -7027,6 +7947,11 @@
// firewall rules.
Kind string `json:"kind,omitempty"`
+ // LogConfig: This field denotes the logging options for a particular
+ // firewall rule. If logging is enabled, logs will be exported to
+ // Stackdriver.
+ LogConfig *FirewallLogConfig `json:"logConfig,omitempty"`
+
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
@@ -7371,6 +8296,35 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// FirewallLogConfig: The available logging options for a firewall rule.
+type FirewallLogConfig struct {
+ // Enable: This field denotes whether to enable logging for a particular
+ // firewall rule.
+ Enable bool `json:"enable,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Enable") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Enable") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *FirewallLogConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod FirewallLogConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// FixedOrPercent: Encapsulates numeric value that can be either
// absolute or relative.
type FixedOrPercent struct {
@@ -7528,7 +8482,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// ForwardingRule.
@@ -7610,10 +8565,10 @@
// Ports: This field is used along with the backend_service field for
// internal load balancing.
//
- // When the load balancing scheme is INTERNAL, a single port or a comma
- // separated list of ports can be configured. Only packets addressed to
- // these ports will be forwarded to the backends configured with this
- // forwarding rule.
+ // When the load balancing scheme is INTERNAL, a list of ports can be
+ // configured, for example, ['80'], ['8000','9000'] etc. Only packets
+ // addressed to these ports will be forwarded to the backends configured
+ // with this forwarding rule.
//
// You may specify a maximum of up to 5 ports.
Ports []string `json:"ports,omitempty"`
@@ -8170,7 +9125,8 @@
// this resource, used to detect conflicts. The fingerprint is initially
// generated by Compute Engine and changes after every request to modify
// or update labels. You must always provide an up-to-date fingerprint
- // hash when updating or changing labels. Make a get() request to the
+ // hash when updating or changing labels, otherwise the request will
+ // fail with error 412 conditionNotMet. Make a get() request to the
// resource to get the latest fingerprint.
LabelFingerprint string `json:"labelFingerprint,omitempty"`
@@ -8209,7 +9165,7 @@
}
type GlobalSetPolicyRequest struct {
- // Bindings: Flatten Policy to create a backwacd compatible wire-format.
+ // Bindings: Flatten Policy to create a backward compatible wire-format.
// Deprecated. Use 'policy' to specify bindings.
Bindings []*Binding `json:"bindings,omitempty"`
@@ -9607,7 +10563,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update labels. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change labels.
+ // change labels, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// image.
@@ -9943,6 +10900,10 @@
// Instance: An Instance resource. (== resource_for beta.instances ==)
// (== resource_for v1.instances ==)
type Instance struct {
+ // AllocationAffinity: The configuration of desired allocations which
+ // this Instance could consume capacity from.
+ AllocationAffinity *AllocationAffinity `json:"allocationAffinity,omitempty"`
+
// CanIpForward: Allows this instance to send and receive packets with
// non-matching destination or source IPs. This is required if you plan
// to use this instance to forward routes. For more information, see
@@ -9968,6 +10929,9 @@
// must be created before you can assign them.
Disks []*AttachedDisk `json:"disks,omitempty"`
+ // DisplayDevice: Enables display device for the instance.
+ DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"`
+
// GuestAccelerators: A list of the type and count of accelerator cards
// attached to the instance.
GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"`
@@ -10104,20 +11068,21 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "CanIpForward") to
- // unconditionally include in API requests. By default, fields with
+ // ForceSendFields is a list of field names (e.g. "AllocationAffinity")
+ // to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "CanIpForward") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
+ // NullFields is a list of field names (e.g. "AllocationAffinity") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
NullFields []string `json:"-"`
}
@@ -10732,7 +11697,8 @@
// Fingerprint: Fingerprint of this resource. This field may be used in
// optimistic locking. It will be ignored when inserting an
// InstanceGroupManager. An up-to-date fingerprint must be provided in
- // order to update the InstanceGroupManager.
+ // order to update the InstanceGroupManager, otherwise the request will
+ // fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// InstanceGroupManager.
@@ -12264,7 +13230,9 @@
// multiple users change the named ports settings concurrently. Obtain
// the fingerprint with the instanceGroups.get method. Then, include the
// fingerprint in your request to ensure that you do not overwrite
- // changes that were applied from another concurrent request.
+ // changes that were applied from another concurrent request. A request
+ // with an incorrect fingerprint will fail with error 412
+ // conditionNotMet.
Fingerprint string `json:"fingerprint,omitempty"`
// NamedPorts: The list of named ports to set for this instance group.
@@ -12648,6 +13616,10 @@
}
type InstanceProperties struct {
+ // AllocationAffinity: The configuration of desired allocations which
+ // this Instance could consume capacity from.
+ AllocationAffinity *AllocationAffinity `json:"allocationAffinity,omitempty"`
+
// CanIpForward: Enables instances created based on this template to
// send packets with source IP addresses other than their own and
// receive packets with destination IP addresses other than their own.
@@ -12715,20 +13687,21 @@
// within the list must comply with RFC1035.
Tags *Tags `json:"tags,omitempty"`
- // ForceSendFields is a list of field names (e.g. "CanIpForward") to
- // unconditionally include in API requests. By default, fields with
+ // ForceSendFields is a list of field names (e.g. "AllocationAffinity")
+ // to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "CanIpForward") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
+ // NullFields is a list of field names (e.g. "AllocationAffinity") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
NullFields []string `json:"-"`
}
@@ -13467,7 +14440,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// Interconnect.
@@ -13577,8 +14551,8 @@
// Bandwidth: Provisioned bandwidth capacity for the
// interconnectAttachment. Can be set by the partner to update the
- // customer's provisioned bandwidth. Output only for for PARTNER type,
- // mutable for PARTNER_PROVIDER, not available for DEDICATED.
+ // customer's provisioned bandwidth. Output only for PARTNER type,
+ // mutable for PARTNER_PROVIDER and DEDICATED.
//
// Possible values:
// "BPS_100M"
@@ -13656,7 +14630,8 @@
// used for optimistic locking. The fingerprint is initially generated
// by Compute Engine and changes after every request to modify or update
// labels. You must always provide an up-to-date fingerprint hash in
- // order to update or change labels.
+ // order to update or change labels, otherwise the request will fail
+ // with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// InterconnectAttachment.
@@ -13712,7 +14687,7 @@
// body.
Region string `json:"region,omitempty"`
- // Router: URL of the cloud router to be used for dynamic routing. This
+ // Router: URL of the Cloud Router to be used for dynamic routing. This
// router must be in the same region as this InterconnectAttachment. The
// InterconnectAttachment will automatically connect the Interconnect to
// the network & region within which the Cloud Router is configured.
@@ -13740,10 +14715,8 @@
// "PARTNER_PROVIDER"
Type string `json:"type,omitempty"`
- // VlanTag8021q: Available only for DEDICATED and PARTNER_PROVIDER.
- // Desired VLAN tag for this attachment, in the range 2-4094. This field
- // refers to 802.1q VLAN tag, also known as IEEE 802.1Q Only specified
- // at creation time.
+ // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the
+ // range 2-4094. Only specified at creation time.
VlanTag8021q int64 `json:"vlanTag8021q,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -14094,7 +15067,7 @@
type InterconnectAttachmentPartnerMetadata struct {
// InterconnectName: Plain text name of the Interconnect this attachment
// is connected to, as displayed in the Partner?s portal. For instance
- // ?Chicago 1?. This value may be validated to match approved Partner
+ // "Chicago 1". This value may be validated to match approved Partner
// values.
InterconnectName string `json:"interconnectName,omitempty"`
@@ -14458,7 +15431,10 @@
// "OK"
State string `json:"state,omitempty"`
- // Value: Value of the current optical power, read in dBm.
+ // Value: Value of the current optical power, read in dBm. Take a known
+ // good optical value, give it a 10% margin and trigger warnings
+ // relative to that value. In general, a -7dBm warning and a -11dBm
+ // alarm are good optical value estimates for most links.
Value float64 `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "State") to
@@ -14770,6 +15746,16 @@
// SelfLink: [Output Only] Server-defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
+ // Status: [Output Only] The status of this InterconnectLocation. If the
+ // status is AVAILABLE, new Interconnects may be provisioned in this
+ // InterconnectLocation. Otherwise, no new Interconnects may be
+ // provisioned.
+ //
+ // Possible values:
+ // "AVAILABLE"
+ // "CLOSED"
+ Status string `json:"status,omitempty"`
+
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@@ -16375,7 +17361,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update metadata. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change metadata.
+ // change metadata, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve the
// resource.
@@ -17487,7 +18474,8 @@
// Fingerprint: Fingerprint hash of contents stored in this network
// interface. This field will be ignored when inserting an Instance or
// adding a NetworkInterface. An up-to-date fingerprint must be provided
- // in order to update the NetworkInterface.
+ // in order to update the NetworkInterface, otherwise the request will
+ // fail with error 412 conditionNotMet.
Fingerprint string `json:"fingerprint,omitempty"`
// Kind: [Output Only] Type of the resource. Always
@@ -17716,12 +18704,27 @@
// flag indicating whether Google Compute Engine should automatically
// create routes for the peering.
type NetworkPeering struct {
- // AutoCreateRoutes: Whether full mesh connectivity is created and
+ // AutoCreateRoutes: Indicates whether full mesh connectivity is created
+ // and managed automatically. When it is set to true, Google Compute
+ // Engine will automatically create and manage the routes between two
+ // networks when the state is ACTIVE. Otherwise, user needs to create
+ // routes manually to route packets to peer network.
+ AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`
+
+ // ExchangeSubnetRoutes: Whether full mesh connectivity is created and
// managed automatically. When it is set to true, Google Compute Engine
// will automatically create and manage the routes between two networks
- // when the state is ACTIVE. Otherwise, user needs to create routes
- // manually to route packets to peer network.
- AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`
+ // when the peering state is ACTIVE. Otherwise, user needs to create
+ // routes manually to route packets to peer network.
+ ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"`
+
+ // ExportCustomRoutes: Whether to export the custom routes to peer
+ // network.
+ ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"`
+
+ // ImportCustomRoutes: Whether to import the custom routes from peer
+ // network.
+ ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"`
// Name: Name of this peering. Provided by the client when the peering
// is created. The name must comply with RFC1035. Specifically, the name
@@ -17820,6 +18823,13 @@
// Name: Name of the peering, which should conform to RFC1035.
Name string `json:"name,omitempty"`
+ // NetworkPeering: Network peering parameters. In order to specify route
+ // policies for peering using import/export custom routes, you will have
+ // to fill all peering related parameters (name, peer network,
+ // exchange_subnet_routes) in network_peeringfield. Corresponding fields
+ // in NetworksAddPeeringRequest will be deprecated soon.
+ NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"`
+
// PeerNetwork: URL of the peer network. It can be either full URL or
// partial URL. The peer network may belong to a different project. If
// the partial URL does not contain project, it is assumed that the peer
@@ -17877,6 +18887,33 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+type NetworksUpdatePeeringRequest struct {
+ NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "NetworkPeering") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "NetworkPeering") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod NetworksUpdatePeeringRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// NodeGroup: A NodeGroup resource.
type NodeGroup struct {
// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
@@ -23181,7 +24218,7 @@
Duration string `json:"duration,omitempty"`
// StartTime: Time within the window to start the operations. It must be
- // in format "HH:MM?, where HH : [00-23] and MM : [00-00] GMT.
+ // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "DaysInCycle") to
@@ -23218,7 +24255,7 @@
HoursInCycle int64 `json:"hoursInCycle,omitempty"`
// StartTime: Time within the window to start the operations. It must be
- // in format "HH:MM?, where HH : [00-23] and MM : [00-00] GMT.
+ // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "Duration") to
@@ -23449,7 +24486,7 @@
Duration string `json:"duration,omitempty"`
// StartTime: Time within the window to start the operations. It must be
- // in format "HH:MM?, where HH : [00-23] and MM : [00-00] GMT.
+ // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "Day") to
@@ -24233,12 +25270,13 @@
// Only IPv4 is supported.
IpAddress string `json:"ipAddress,omitempty"`
- // ManagementType: [Output Only] Type of how the resource/configuration
- // of the BGP peer is managed. MANAGED_BY_USER is the default value;
- // MANAGED_BY_ATTACHMENT represents an BGP peer that is automatically
- // created for PARTNER interconnectAttachment, Google will automatically
- // create/delete this type of BGP peer when the PARTNER
- // interconnectAttachment is created/deleted.
+ // ManagementType: [Output Only] The resource that configures and
+ // manages this BGP peer. MANAGED_BY_USER is the default value and can
+ // be managed by you or other users; MANAGED_BY_ATTACHMENT is a BGP peer
+ // that is configured and managed by Cloud Interconnect, specifically by
+ // an InterconnectAttachment of type PARTNER. Google will automatically
+ // create, update, and delete this type of BGP peer when the PARTNER
+ // InterconnectAttachment is created, updated, or deleted.
//
// Possible values:
// "MANAGED_BY_ATTACHMENT"
@@ -24300,12 +25338,14 @@
// attachment.
LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"`
- // ManagementType: [Output Only] Type of how the resource/configuration
- // of the interface is managed. MANAGED_BY_USER is the default value;
- // MANAGED_BY_ATTACHMENT represents an interface that is automatically
- // created for PARTNER type interconnectAttachment, Google will
- // automatically create/update/delete this type of interface when the
- // PARTNER interconnectAttachment is created/provisioned/deleted.
+ // ManagementType: [Output Only] The resource that configures and
+ // manages this interface. MANAGED_BY_USER is the default value and can
+ // be managed by you or other users; MANAGED_BY_ATTACHMENT is an
+ // interface that is configured and managed by Cloud Interconnect,
+ // specifically by an InterconnectAttachment of type PARTNER. Google
+ // will automatically create, update, and delete this type of interface
+ // when the PARTNER InterconnectAttachment is created, updated, or
+ // deleted.
//
// Possible values:
// "MANAGED_BY_ATTACHMENT"
@@ -25285,7 +26325,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update metadata. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change metadata.
+ // change metadata, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make get() request to the security
// policy.
@@ -25566,7 +26607,8 @@
// Priority: An integer indicating the priority of a rule in the list.
// The priority must be a positive value between 0 and 2147483647. Rules
- // are evaluated in the increasing order of priority.
+ // are evaluated from highest to lowest priority where 0 is the highest
+ // priority and 2147483647 is the lowest prority.
Priority int64 `json:"priority,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -25791,12 +26833,15 @@
// ShieldedVmIdentity: A shielded VM identity entry.
type ShieldedVmIdentity struct {
+ // EncryptionKey: An Endorsement Key (EK) issued to the Shielded VM's
+ // vTPM.
EncryptionKey *ShieldedVmIdentityEntry `json:"encryptionKey,omitempty"`
// Kind: [Output Only] Type of the resource. Always
// compute#shieldedVmIdentity for shielded VM identity entry.
Kind string `json:"kind,omitempty"`
+ // SigningKey: An Attestation Key (AK) issued to the Shielded VM's vTPM.
SigningKey *ShieldedVmIdentityEntry `json:"signingKey,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -25828,8 +26873,10 @@
// ShieldedVmIdentityEntry: A Shielded VM Identity Entry.
type ShieldedVmIdentityEntry struct {
+ // EkCert: A PEM-encoded X.509 certificate. This field can be empty.
EkCert string `json:"ekCert,omitempty"`
+ // EkPub: A PEM-encoded public key.
EkPub string `json:"ekPub,omitempty"`
// ForceSendFields is a list of field names (e.g. "EkCert") to
@@ -25956,7 +27003,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// snapshot.
@@ -26802,7 +27850,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a SslPolicy. An up-to-date
- // fingerprint must be provided in order to update the SslPolicy.
+ // fingerprint must be provided in order to update the SslPolicy,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// SslPolicy.
@@ -27050,7 +28099,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a Subnetwork. An up-to-date
- // fingerprint must be provided in order to update the Subnetwork.
+ // fingerprint must be provided in order to update the Subnetwork,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// Subnetwork.
@@ -27103,7 +28153,8 @@
// SecondaryIpRanges: An array of configurations for secondary IP ranges
// for VM instances contained in this subnetwork. The primary IP of such
// VM must belong to the primary ipCidrRange of the subnetwork. The
- // alias IPs may belong to either primary or secondary ranges.
+ // alias IPs may belong to either primary or secondary ranges. This
+ // field can be updated with a patch request.
SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"`
// SelfLink: [Output Only] Server-defined URL for the resource.
@@ -30269,7 +31320,8 @@
// for optimistic locking. The fingerprint is initially generated by
// Compute Engine and changes after every request to modify or update
// labels. You must always provide an up-to-date fingerprint hash in
- // order to update or change labels.
+ // order to update or change labels, otherwise the request will fail
+ // with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// TargetVpnGateway.
@@ -30906,7 +31958,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a UrlMap. An up-to-date
- // fingerprint must be provided in order to update the UrlMap.
+ // fingerprint must be provided in order to update the UrlMap, otherwise
+ // the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// UrlMap.
@@ -31827,7 +32880,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// VpnTunnel.
@@ -34813,9 +35867,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -34998,6 +36052,1527 @@
}
+// method id "compute.allocations.aggregatedList":
+
+type AllocationsAggregatedListCall struct {
+ s *Service
+ project string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// AggregatedList: Retrieves an aggregated list of allocations.
+func (r *AllocationsService) AggregatedList(project string) *AllocationsAggregatedListCall {
+ c := &AllocationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ return c
+}
+
+// Filter sets the optional parameter "filter": A filter expression that
+// filters resources listed in the response. The expression must specify
+// the field name, a comparison operator, and the value that you want to
+// use for filtering. The value must be a string, a number, or a
+// boolean. The comparison operator must be either =, !=, >, or <.
+//
+// For example, if you are filtering Compute Engine instances, you can
+// exclude instances named example-instance by specifying name !=
+// example-instance.
+//
+// You can also filter nested fields. For example, you could specify
+// scheduling.automaticRestart = false to include instances only if they
+// are not scheduled for automatic restarts. You can use filtering on
+// nested fields to filter based on resource labels.
+//
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart = true)
+// (cpuPlatform = "Intel Skylake"). By default, each expression is an
+// AND expression. However, you can include AND and OR expressions
+// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
+// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
+// true).
+func (c *AllocationsAggregatedListCall) Filter(filter string) *AllocationsAggregatedListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of results per page that should be returned. If the number of
+// available results is larger than maxResults, Compute Engine returns a
+// nextPageToken that can be used to get the next page of results in
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
+func (c *AllocationsAggregatedListCall) MaxResults(maxResults int64) *AllocationsAggregatedListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *AllocationsAggregatedListCall) OrderBy(orderBy string) *AllocationsAggregatedListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": Specifies a page
+// token to use. Set pageToken to the nextPageToken returned by a
+// previous list request to get the next page of results.
+func (c *AllocationsAggregatedListCall) PageToken(pageToken string) *AllocationsAggregatedListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsAggregatedListCall) Fields(s ...googleapi.Field) *AllocationsAggregatedListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AllocationsAggregatedListCall) IfNoneMatch(entityTag string) *AllocationsAggregatedListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsAggregatedListCall) Context(ctx context.Context) *AllocationsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsAggregatedListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/allocations")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.aggregatedList" call.
+// Exactly one of *AllocationAggregatedList or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *AllocationAggregatedList.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AllocationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*AllocationAggregatedList, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AllocationAggregatedList{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves an aggregated list of allocations.",
+ // "httpMethod": "GET",
+ // "id": "compute.allocations.aggregatedList",
+ // "parameterOrder": [
+ // "project"
+ // ],
+ // "parameters": {
+ // "filter": {
+ // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "default": "500",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ // "format": "uint32",
+ // "location": "query",
+ // "minimum": "0",
+ // "type": "integer"
+ // },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/aggregated/allocations",
+ // "response": {
+ // "$ref": "AllocationAggregatedList"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *AllocationsAggregatedListCall) Pages(ctx context.Context, f func(*AllocationAggregatedList) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "compute.allocations.delete":
+
+type AllocationsDeleteCall struct {
+ s *Service
+ project string
+ zone string
+ allocation string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes the specified allocation.
+func (r *AllocationsService) Delete(project string, zone string, allocation string) *AllocationsDeleteCall {
+ c := &AllocationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.allocation = allocation
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *AllocationsDeleteCall) RequestId(requestId string) *AllocationsDeleteCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsDeleteCall) Fields(s ...googleapi.Field) *AllocationsDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsDeleteCall) Context(ctx context.Context) *AllocationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{allocation}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "allocation": c.allocation,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.delete" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *AllocationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Deletes the specified allocation.",
+ // "httpMethod": "DELETE",
+ // "id": "compute.allocations.delete",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "allocation"
+ // ],
+ // "parameters": {
+ // "allocation": {
+ // "description": "Name of the allocation to delete.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "Name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/allocations/{allocation}",
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.allocations.get":
+
+type AllocationsGetCall struct {
+ s *Service
+ project string
+ zone string
+ allocation string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves all information of the specified allocation.
+func (r *AllocationsService) Get(project string, zone string, allocation string) *AllocationsGetCall {
+ c := &AllocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.allocation = allocation
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsGetCall) Fields(s ...googleapi.Field) *AllocationsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AllocationsGetCall) IfNoneMatch(entityTag string) *AllocationsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsGetCall) Context(ctx context.Context) *AllocationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{allocation}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "allocation": c.allocation,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.get" call.
+// Exactly one of *Allocation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Allocation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *AllocationsGetCall) Do(opts ...googleapi.CallOption) (*Allocation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Allocation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves all information of the specified allocation.",
+ // "httpMethod": "GET",
+ // "id": "compute.allocations.get",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "allocation"
+ // ],
+ // "parameters": {
+ // "allocation": {
+ // "description": "Name of the allocation to retrieve.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "Name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/allocations/{allocation}",
+ // "response": {
+ // "$ref": "Allocation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// method id "compute.allocations.getIamPolicy":
+
+type AllocationsGetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *AllocationsService) GetIamPolicy(project string, zone string, resource string) *AllocationsGetIamPolicyCall {
+ c := &AllocationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsGetIamPolicyCall) Fields(s ...googleapi.Field) *AllocationsGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AllocationsGetIamPolicyCall) IfNoneMatch(entityTag string) *AllocationsGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsGetIamPolicyCall) Context(ctx context.Context) *AllocationsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *AllocationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.allocations.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/allocations/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// method id "compute.allocations.insert":
+
+type AllocationsInsertCall struct {
+ s *Service
+ project string
+ zone string
+ allocation *Allocation
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Creates a new allocation.
+func (r *AllocationsService) Insert(project string, zone string, allocation *Allocation) *AllocationsInsertCall {
+ c := &AllocationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.allocation = allocation
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *AllocationsInsertCall) RequestId(requestId string) *AllocationsInsertCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsInsertCall) Fields(s ...googleapi.Field) *AllocationsInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsInsertCall) Context(ctx context.Context) *AllocationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocation)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.insert" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *AllocationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a new allocation.",
+ // "httpMethod": "POST",
+ // "id": "compute.allocations.insert",
+ // "parameterOrder": [
+ // "project",
+ // "zone"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "Name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/allocations",
+ // "request": {
+ // "$ref": "Allocation"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.allocations.list":
+
+type AllocationsListCall struct {
+ s *Service
+ project string
+ zone string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: A list all the allocations that have been configured for the
+// specified project in specified zone.
+func (r *AllocationsService) List(project string, zone string) *AllocationsListCall {
+ c := &AllocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ return c
+}
+
+// Filter sets the optional parameter "filter": A filter expression that
+// filters resources listed in the response. The expression must specify
+// the field name, a comparison operator, and the value that you want to
+// use for filtering. The value must be a string, a number, or a
+// boolean. The comparison operator must be either =, !=, >, or <.
+//
+// For example, if you are filtering Compute Engine instances, you can
+// exclude instances named example-instance by specifying name !=
+// example-instance.
+//
+// You can also filter nested fields. For example, you could specify
+// scheduling.automaticRestart = false to include instances only if they
+// are not scheduled for automatic restarts. You can use filtering on
+// nested fields to filter based on resource labels.
+//
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart = true)
+// (cpuPlatform = "Intel Skylake"). By default, each expression is an
+// AND expression. However, you can include AND and OR expressions
+// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
+// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
+// true).
+func (c *AllocationsListCall) Filter(filter string) *AllocationsListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of results per page that should be returned. If the number of
+// available results is larger than maxResults, Compute Engine returns a
+// nextPageToken that can be used to get the next page of results in
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
+func (c *AllocationsListCall) MaxResults(maxResults int64) *AllocationsListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *AllocationsListCall) OrderBy(orderBy string) *AllocationsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": Specifies a page
+// token to use. Set pageToken to the nextPageToken returned by a
+// previous list request to get the next page of results.
+func (c *AllocationsListCall) PageToken(pageToken string) *AllocationsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsListCall) Fields(s ...googleapi.Field) *AllocationsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AllocationsListCall) IfNoneMatch(entityTag string) *AllocationsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsListCall) Context(ctx context.Context) *AllocationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.list" call.
+// Exactly one of *AllocationList or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *AllocationList.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AllocationsListCall) Do(opts ...googleapi.CallOption) (*AllocationList, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AllocationList{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "A list all the allocations that have been configured for the specified project in specified zone.",
+ // "httpMethod": "GET",
+ // "id": "compute.allocations.list",
+ // "parameterOrder": [
+ // "project",
+ // "zone"
+ // ],
+ // "parameters": {
+ // "filter": {
+ // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "default": "500",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ // "format": "uint32",
+ // "location": "query",
+ // "minimum": "0",
+ // "type": "integer"
+ // },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "Name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/allocations",
+ // "response": {
+ // "$ref": "AllocationList"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *AllocationsListCall) Pages(ctx context.Context, f func(*AllocationList) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "compute.allocations.setIamPolicy":
+
+type AllocationsSetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ zonesetpolicyrequest *ZoneSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *AllocationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *AllocationsSetIamPolicyCall {
+ c := &AllocationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.zonesetpolicyrequest = zonesetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsSetIamPolicyCall) Fields(s ...googleapi.Field) *AllocationsSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsSetIamPolicyCall) Context(ctx context.Context) *AllocationsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *AllocationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.allocations.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/allocations/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "ZoneSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.allocations.testIamPermissions":
+
+type AllocationsTestIamPermissionsCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *AllocationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AllocationsTestIamPermissionsCall {
+ c := &AllocationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AllocationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *AllocationsTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AllocationsTestIamPermissionsCall) Context(ctx context.Context) *AllocationsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AllocationsTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AllocationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/allocations/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.allocations.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AllocationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.allocations.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/allocations/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.autoscalers.aggregatedList":
type AutoscalersAggregatedListCall struct {
@@ -38778,7 +41353,7 @@
}
// Get: Returns the specified BackendService resource. Gets a list of
-// available backend services by making a list() request.
+// available backend services.
// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get
func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall {
c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -38886,7 +41461,7 @@
}
return ret, nil
// {
- // "description": "Returns the specified BackendService resource. Gets a list of available backend services by making a list() request.",
+ // "description": "Returns the specified BackendService resource. Gets a list of available backend services.",
// "httpMethod": "GET",
// "id": "compute.backendServices.get",
// "parameterOrder": [
@@ -41010,7 +43585,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -41454,7 +44029,7 @@
// "disk": {
// "description": "Name of the persistent disk to snapshot.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -42611,7 +45186,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -42797,7 +45372,7 @@
// "disk": {
// "description": "The name of the persistent disk.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -43155,9 +45730,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -45792,9 +48367,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -47032,9 +49607,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -48075,9 +50650,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -53059,7 +55634,7 @@
// "image": {
// "description": "Name of the image resource to delete.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -53234,7 +55809,7 @@
// "image": {
// "description": "Image name.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -53554,7 +56129,7 @@
// "family": {
// "description": "Name of the image family to search for.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -54453,9 +57028,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -57126,6 +59701,7 @@
}
// SetAutoHealingPolicies: Modifies the autohealing policies.
+// [Deprecated] This method is deprecated. Please use Patch instead.
func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall {
c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
@@ -57246,7 +59822,7 @@
}
return ret, nil
// {
- // "description": "Modifies the autohealing policies.",
+ // "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.",
// "httpMethod": "POST",
// "id": "compute.instanceGroupManagers.setAutoHealingPolicies",
// "parameterOrder": [
@@ -61388,7 +63964,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -61849,7 +64425,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -62216,7 +64792,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -62398,15 +64974,15 @@
// ],
// "parameters": {
// "deviceName": {
- // "description": "Disk device name to detach.",
+ // "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.",
// "location": "query",
// "required": true,
// "type": "string"
// },
// "instance": {
- // "description": "Instance name.",
+ // "description": "Instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -62758,7 +65334,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -63121,7 +65697,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -63303,7 +65879,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -63999,7 +66575,7 @@
// "instance": {
// "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.",
// "location": "path",
- // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -64211,7 +66787,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -64394,7 +66970,7 @@
// "instance": {
// "description": "Name of the instance resource to resume.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -64595,9 +67171,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -64770,16 +67346,16 @@
// "type": "boolean"
// },
// "deviceName": {
- // "description": "The device name of the disk to modify.",
+ // "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.",
// "location": "query",
// "pattern": "\\w[\\w.-]{0,254}",
// "required": true,
// "type": "string"
// },
// "instance": {
- // "description": "The instance name.",
+ // "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -65124,7 +67700,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -65310,7 +67886,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -65496,7 +68072,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -65683,7 +68259,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -65871,7 +68447,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -66055,9 +68631,9 @@
// ],
// "parameters": {
// "instance": {
- // "description": "Instance name.",
+ // "description": "Instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -66244,7 +68820,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -66432,7 +69008,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -66619,7 +69195,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -66779,7 +69355,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -66951,7 +69527,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -67135,7 +69711,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -67319,7 +69895,7 @@
// "instance": {
// "description": "Name of the instance resource to stop.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -67512,7 +70088,7 @@
// "instance": {
// "description": "Name of the instance resource to suspend.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -67862,7 +70438,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -67907,6 +70483,194 @@
}
+// method id "compute.instances.updateDisplayDevice":
+
+type InstancesUpdateDisplayDeviceCall struct {
+ s *Service
+ project string
+ zone string
+ instance string
+ displaydevice *DisplayDevice
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// UpdateDisplayDevice: Updates the Display config for a VM instance.
+// You can only use this method on a stopped VM instance. This method
+// supports PATCH semantics and uses the JSON merge patch format and
+// processing rules.
+func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall {
+ c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.instance = instance
+ c.displaydevice = displaydevice
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.displaydevice)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PATCH", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "instance": c.instance,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instances.updateDisplayDevice" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ // "httpMethod": "PATCH",
+ // "id": "compute.instances.updateDisplayDevice",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "instance"
+ // ],
+ // "parameters": {
+ // "instance": {
+ // "description": "Name of the instance scoping this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice",
+ // "request": {
+ // "$ref": "DisplayDevice"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.instances.updateNetworkInterface":
type InstancesUpdateNetworkInterfaceCall struct {
@@ -68056,7 +70820,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -68250,7 +71014,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -69672,9 +72436,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -71464,9 +74228,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -72536,6 +75300,157 @@
}
}
+// method id "compute.licenses.setIamPolicy":
+
+type LicensesSetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ globalsetpolicyrequest *GlobalSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall {
+ c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.globalsetpolicyrequest = globalsetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LicensesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LicensesSetIamPolicyCall) Context(ctx context.Context) *LicensesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LicensesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.licenses.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.licenses.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/licenses/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "GlobalSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.machineTypes.aggregatedList":
type MachineTypesAggregatedListCall struct {
@@ -75965,6 +78880,318 @@
}
}
+// method id "compute.networks.listPeeringRoutes":
+
+type NetworksListPeeringRoutesCall struct {
+ s *Service
+ project string
+ network string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// ListPeeringRoutes: Lists the peering routes exchanged over peering
+// connection.
+func (r *NetworksService) ListPeeringRoutes(project string, network string) *NetworksListPeeringRoutesCall {
+ c := &NetworksListPeeringRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.network = network
+ return c
+}
+
+// Direction sets the optional parameter "direction": The direction of
+// the exchanged routes.
+//
+// Possible values:
+// "INCOMING"
+// "OUTGOING"
+func (c *NetworksListPeeringRoutesCall) Direction(direction string) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("direction", direction)
+ return c
+}
+
+// Filter sets the optional parameter "filter": A filter expression that
+// filters resources listed in the response. The expression must specify
+// the field name, a comparison operator, and the value that you want to
+// use for filtering. The value must be a string, a number, or a
+// boolean. The comparison operator must be either =, !=, >, or <.
+//
+// For example, if you are filtering Compute Engine instances, you can
+// exclude instances named example-instance by specifying name !=
+// example-instance.
+//
+// You can also filter nested fields. For example, you could specify
+// scheduling.automaticRestart = false to include instances only if they
+// are not scheduled for automatic restarts. You can use filtering on
+// nested fields to filter based on resource labels.
+//
+// To filter on multiple expressions, provide each separate expression
+// within parentheses. For example, (scheduling.automaticRestart = true)
+// (cpuPlatform = "Intel Skylake"). By default, each expression is an
+// AND expression. However, you can include AND and OR expressions
+// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
+// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
+// true).
+func (c *NetworksListPeeringRoutesCall) Filter(filter string) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of results per page that should be returned. If the number of
+// available results is larger than maxResults, Compute Engine returns a
+// nextPageToken that can be used to get the next page of results in
+// subsequent list requests. Acceptable values are 0 to 500, inclusive.
+// (Default: 500)
+func (c *NetworksListPeeringRoutesCall) MaxResults(maxResults int64) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": Sorts list results by
+// a certain order. By default, results are returned in alphanumerical
+// order based on the resource name.
+//
+// You can also sort results in descending order based on the creation
+// timestamp using orderBy="creationTimestamp desc". This sorts results
+// based on the creationTimestamp field in reverse chronological order
+// (newest result first). Use this to sort resources like operations so
+// that the newest operation is returned first.
+//
+// Currently, only sorting by name or creationTimestamp desc is
+// supported.
+func (c *NetworksListPeeringRoutesCall) OrderBy(orderBy string) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": Specifies a page
+// token to use. Set pageToken to the nextPageToken returned by a
+// previous list request to get the next page of results.
+func (c *NetworksListPeeringRoutesCall) PageToken(pageToken string) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// PeeringName sets the optional parameter "peeringName": The response
+// will show routes exchanged over the given peering connection.
+func (c *NetworksListPeeringRoutesCall) PeeringName(peeringName string) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("peeringName", peeringName)
+ return c
+}
+
+// Region sets the optional parameter "region": The region of the
+// request. The response will include all subnet routes, static routes
+// and dynamic routes in the region.
+func (c *NetworksListPeeringRoutesCall) Region(region string) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("region", region)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NetworksListPeeringRoutesCall) Fields(s ...googleapi.Field) *NetworksListPeeringRoutesCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *NetworksListPeeringRoutesCall) IfNoneMatch(entityTag string) *NetworksListPeeringRoutesCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NetworksListPeeringRoutesCall) Context(ctx context.Context) *NetworksListPeeringRoutesCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NetworksListPeeringRoutesCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/listPeeringRoutes")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "network": c.network,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.networks.listPeeringRoutes" call.
+// Exactly one of *ExchangedPeeringRoutesList or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *ExchangedPeeringRoutesList.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*ExchangedPeeringRoutesList, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ExchangedPeeringRoutesList{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the peering routes exchanged over peering connection.",
+ // "httpMethod": "GET",
+ // "id": "compute.networks.listPeeringRoutes",
+ // "parameterOrder": [
+ // "project",
+ // "network"
+ // ],
+ // "parameters": {
+ // "direction": {
+ // "description": "The direction of the exchanged routes.",
+ // "enum": [
+ // "INCOMING",
+ // "OUTGOING"
+ // ],
+ // "enumDescriptions": [
+ // "",
+ // ""
+ // ],
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "filter": {
+ // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "default": "500",
+ // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
+ // "format": "uint32",
+ // "location": "query",
+ // "minimum": "0",
+ // "type": "integer"
+ // },
+ // "network": {
+ // "description": "Name of the network for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderBy": {
+ // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "peeringName": {
+ // "description": "The response will show routes exchanged over the given peering connection.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/networks/{network}/listPeeringRoutes",
+ // "response": {
+ // "$ref": "ExchangedPeeringRoutesList"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *NetworksListPeeringRoutesCall) Pages(ctx context.Context, f func(*ExchangedPeeringRoutesList) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
// method id "compute.networks.patch":
type NetworksPatchCall struct {
@@ -76632,6 +79859,183 @@
}
+// method id "compute.networks.updatePeering":
+
+type NetworksUpdatePeeringCall struct {
+ s *Service
+ project string
+ network string
+ networksupdatepeeringrequest *NetworksUpdatePeeringRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// UpdatePeering: Updates the specified network peering with the data
+// included in the request Only the following fields can be modified:
+// NetworkPeering.export_custom_routes, and
+// NetworkPeering.import_custom_routes
+func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall {
+ c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.network = network
+ c.networksupdatepeeringrequest = networksupdatepeeringrequest
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *NetworksUpdatePeeringCall) RequestId(requestId string) *NetworksUpdatePeeringCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NetworksUpdatePeeringCall) Fields(s ...googleapi.Field) *NetworksUpdatePeeringCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NetworksUpdatePeeringCall) Context(ctx context.Context) *NetworksUpdatePeeringCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NetworksUpdatePeeringCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksupdatepeeringrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/updatePeering")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PATCH", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "network": c.network,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.networks.updatePeering" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *NetworksUpdatePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes",
+ // "httpMethod": "PATCH",
+ // "id": "compute.networks.updatePeering",
+ // "parameterOrder": [
+ // "project",
+ // "network"
+ // ],
+ // "parameters": {
+ // "network": {
+ // "description": "Name of the network resource which the updated peering is belonging to.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/networks/{network}/updatePeering",
+ // "request": {
+ // "$ref": "NetworksUpdatePeeringRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.nodeGroups.addNodes":
type NodeGroupsAddNodesCall struct {
@@ -76776,7 +80180,7 @@
// ],
// "parameters": {
// "nodeGroup": {
- // "description": "Name of the NodeGroup resource to delete.",
+ // "description": "Name of the NodeGroup resource.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
@@ -87673,7 +91077,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -87858,7 +91262,7 @@
// "disk": {
// "description": "Name of the regional persistent disk to snapshot.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -88208,7 +91612,7 @@
// "disk": {
// "description": "Name of the regional persistent disk to return.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -88837,7 +92241,7 @@
// "disk": {
// "description": "The disk name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -89022,7 +92426,7 @@
// "disk": {
// "description": "Name of the regional persistent disk.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -89224,9 +92628,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -91446,7 +94850,8 @@
}
// SetAutoHealingPolicies: Modifies the autohealing policy for the
-// instances in this managed instance group.
+// instances in this managed instance group. [Deprecated] This method is
+// deprecated. Please use Patch instead.
func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall {
c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
@@ -91567,7 +94972,7 @@
}
return ret, nil
// {
- // "description": "Modifies the autohealing policy for the instances in this managed instance group.",
+ // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.",
// "httpMethod": "POST",
// "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies",
// "parameterOrder": [
@@ -100544,9 +103949,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -100735,7 +104140,7 @@
// deletion is needed for subsequent snapshots, the data will be moved
// to the next corresponding snapshot.
//
-// For more information, see Deleting snaphots.
+// For more information, see Deleting snapshots.
// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete
func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall {
c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -100849,7 +104254,7 @@
}
return ret, nil
// {
- // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.",
+ // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.",
// "httpMethod": "DELETE",
// "id": "compute.snapshots.delete",
// "parameterOrder": [
@@ -100872,7 +104277,7 @@
// "snapshot": {
// "description": "Name of the Snapshot resource to delete.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -101735,9 +105140,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -105741,11 +109146,9 @@
}
// Patch: Patches the specified subnetwork with the data included in the
-// request. Only the following fields within the subnetwork resource can
-// be specified in the request: secondary_ip_range,
-// allow_subnet_cidr_routes_overlap and role. It is also mandatory to
-// specify the current fingeprint of the subnetwork resource being
-// patched.
+// request. Only certain fields can up updated with a patch request as
+// indicated in the field descriptions. You must specify the current
+// fingeprint of the subnetwork resource being patched.
func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall {
c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
@@ -105866,7 +109269,7 @@
}
return ret, nil
// {
- // "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range, allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.",
+ // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.",
// "httpMethod": "PATCH",
// "id": "compute.subnetworks.patch",
// "parameterOrder": [
@@ -116452,9 +119855,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -119405,9 +122808,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json
index 3a3d118..1c1ba6e 100644
--- a/compute/v1/compute-api.json
+++ b/compute/v1/compute-api.json
@@ -29,7 +29,7 @@
"description": "Creates and runs virtual machines on Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/compute/docs/reference/latest/",
- "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/dXLxIHv_L2E0juK01nwvpqWBy0U\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/oSeLrTssSagpjQOSuYtwZ6BQtms\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/compute_engine-16.png",
"x32": "https://www.google.com/images/icons/product/compute_engine-32.png"
@@ -1308,7 +1308,7 @@
]
},
"get": {
- "description": "Returns the specified BackendService resource. Gets a list of available backend services by making a list() request.",
+ "description": "Returns the specified BackendService resource. Gets a list of available backend services.",
"httpMethod": "GET",
"id": "compute.backendServices.get",
"parameterOrder": [
@@ -1799,7 +1799,7 @@
"disk": {
"description": "Name of the persistent disk to snapshot.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -1926,6 +1926,48 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.disks.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/disks/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"insert": {
"description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.",
"httpMethod": "POST",
@@ -2042,7 +2084,7 @@
"disk": {
"description": "The name of the persistent disk.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2078,6 +2120,50 @@
"https://www.googleapis.com/auth/compute"
]
},
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.disks.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/disks/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "ZoneSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"setLabels": {
"description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.",
"httpMethod": "POST",
@@ -2101,9 +2187,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -2126,6 +2212,51 @@
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"
]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.disks.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
}
}
},
@@ -3914,7 +4045,7 @@
"image": {
"description": "Name of the image resource to delete.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -3952,7 +4083,7 @@
"image": {
"description": "Image name.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -4027,7 +4158,7 @@
"family": {
"description": "Name of the image family to search for.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -4049,6 +4180,40 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.images.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/images/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"insert": {
"description": "Creates an image in the specified project using the data included in the request.",
"httpMethod": "POST",
@@ -4139,6 +4304,42 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.images.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/images/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "GlobalSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"setLabels": {
"description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.",
"httpMethod": "POST",
@@ -4156,9 +4357,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -4174,6 +4375,43 @@
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"
]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.images.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/images/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
}
}
},
@@ -4565,6 +4803,53 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "patch": {
+ "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ "httpMethod": "PATCH",
+ "id": "compute.instanceGroupManagers.patch",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "instanceGroupManager"
+ ],
+ "parameters": {
+ "instanceGroupManager": {
+ "description": "The name of the instance group manager.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone where you want to create the managed instance group.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
+ "request": {
+ "$ref": "InstanceGroupManager"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"recreateInstances": {
"description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
"httpMethod": "POST",
@@ -5274,6 +5559,40 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.instanceTemplates.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/instanceTemplates/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"insert": {
"description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.",
"httpMethod": "POST",
@@ -5355,6 +5674,79 @@
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"
]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.instanceTemplates.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/instanceTemplates/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "GlobalSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.instanceTemplates.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
}
}
},
@@ -5374,7 +5766,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5483,7 +5875,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5586,7 +5978,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5637,15 +6029,15 @@
],
"parameters": {
"deviceName": {
- "description": "Disk device name to detach.",
+ "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.",
"location": "query",
"required": true,
"type": "string"
},
"instance": {
- "description": "Instance name.",
+ "description": "Instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5720,6 +6112,48 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.instances.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/instances/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"getSerialPortOutput": {
"description": "Returns the last 1 MB of serial port output from the specified instance.",
"httpMethod": "GET",
@@ -5733,7 +6167,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5898,7 +6332,7 @@
"instance": {
"description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.",
"location": "path",
- "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -5958,7 +6392,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6020,9 +6454,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6062,16 +6496,16 @@
"type": "boolean"
},
"deviceName": {
- "description": "The device name of the disk to modify.",
+ "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.",
"location": "query",
"pattern": "\\w[\\w.-]{0,254}",
"required": true,
"type": "string"
},
"instance": {
- "description": "The instance name.",
+ "description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6104,6 +6538,50 @@
"https://www.googleapis.com/auth/compute"
]
},
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.instances.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/instances/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "ZoneSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"setLabels": {
"description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.",
"httpMethod": "POST",
@@ -6117,7 +6595,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6166,7 +6644,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6215,7 +6693,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6264,7 +6742,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6313,7 +6791,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6360,9 +6838,9 @@
],
"parameters": {
"instance": {
- "description": "Instance name.",
+ "description": "Instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6411,7 +6889,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6460,7 +6938,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6509,7 +6987,7 @@
"instance": {
"description": "Name of the instance scoping this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6550,7 +7028,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6596,7 +7074,7 @@
"instance": {
"description": "Name of the instance resource to start.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6645,7 +7123,7 @@
"instance": {
"description": "Name of the instance resource to stop.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6678,6 +7156,51 @@
"https://www.googleapis.com/auth/compute"
]
},
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.instances.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"updateAccessConfig": {
"description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
"httpMethod": "POST",
@@ -6692,7 +7215,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -6748,7 +7271,7 @@
"instance": {
"description": "The instance name for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -7549,6 +8072,40 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.licenses.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/licenses/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"insert": {
"description": "Create a License resource in the specified project.",
"httpMethod": "POST",
@@ -7634,6 +8191,42 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.licenses.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/licenses/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "GlobalSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"testIamPermissions": {
"description": "Returns permissions that a caller has on the specified resource.",
"httpMethod": "POST",
@@ -8157,7 +8750,7 @@
],
"parameters": {
"nodeGroup": {
- "description": "Name of the NodeGroup resource to delete.",
+ "description": "Name of the NodeGroup resource.",
"location": "path",
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
"required": true,
@@ -8381,6 +8974,48 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.nodeGroups.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"insert": {
"description": "Creates a NodeGroup resource in the specified project using the data included in the request.",
"httpMethod": "POST",
@@ -8552,6 +9187,50 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.nodeGroups.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "ZoneSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"setNodeTemplate": {
"description": "Updates the node template of the node group.",
"httpMethod": "POST",
@@ -8600,6 +9279,51 @@
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"
]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.nodeGroups.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "zone",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ },
+ "zone": {
+ "description": "The name of the zone for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
}
}
},
@@ -8742,6 +9466,48 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.nodeTemplates.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "region",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "The name of the region for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"insert": {
"description": "Creates a NodeTemplate resource in the specified project using the data included in the request.",
"httpMethod": "POST",
@@ -8839,6 +9605,95 @@
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"
]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.nodeTemplates.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "region",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "The name of the region for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "RegionSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.nodeTemplates.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "region",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "The name of the region for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
}
}
},
@@ -10369,7 +11224,7 @@
"disk": {
"description": "Name of the regional persistent disk to snapshot.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -10463,7 +11318,7 @@
"disk": {
"description": "Name of the regional persistent disk to return.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -10608,7 +11463,7 @@
"disk": {
"description": "Name of the regional persistent disk.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
},
@@ -10674,9 +11529,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -11079,6 +11934,53 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "patch": {
+ "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ "httpMethod": "PATCH",
+ "id": "compute.regionInstanceGroupManagers.patch",
+ "parameterOrder": [
+ "project",
+ "region",
+ "instanceGroupManager"
+ ],
+ "parameters": {
+ "instanceGroupManager": {
+ "description": "The name of the instance group manager.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "Name of the region scoping this request.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "requestId": {
+ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}",
+ "request": {
+ "$ref": "InstanceGroupManager"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"recreateInstances": {
"description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
"httpMethod": "POST",
@@ -12722,7 +13624,7 @@
"snapshots": {
"methods": {
"delete": {
- "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.",
+ "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.",
"httpMethod": "DELETE",
"id": "compute.snapshots.delete",
"parameterOrder": [
@@ -12745,7 +13647,7 @@
"snapshot": {
"description": "Name of the Snapshot resource to delete.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -12793,6 +13695,40 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.snapshots.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/snapshots/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"list": {
"description": "Retrieves the list of Snapshot resources contained within the specified project.",
"httpMethod": "GET",
@@ -12842,6 +13778,42 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.snapshots.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/snapshots/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "GlobalSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"setLabels": {
"description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.",
"httpMethod": "POST",
@@ -12859,9 +13831,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -12877,6 +13849,43 @@
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"
]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.snapshots.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/global/snapshots/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
}
}
},
@@ -13471,6 +14480,48 @@
"https://www.googleapis.com/auth/compute.readonly"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ "httpMethod": "GET",
+ "id": "compute.subnetworks.getIamPolicy",
+ "parameterOrder": [
+ "project",
+ "region",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "The name of the region for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
+ },
"insert": {
"description": "Creates a subnetwork in the specified project using the data included in the request.",
"httpMethod": "POST",
@@ -13619,7 +14670,7 @@
]
},
"patch": {
- "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range, allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.",
+ "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.",
"httpMethod": "PATCH",
"id": "compute.subnetworks.patch",
"parameterOrder": [
@@ -13667,6 +14718,50 @@
"https://www.googleapis.com/auth/compute"
]
},
+ "setIamPolicy": {
+ "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ "httpMethod": "POST",
+ "id": "compute.subnetworks.setIamPolicy",
+ "parameterOrder": [
+ "project",
+ "region",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "The name of the region for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy",
+ "request": {
+ "$ref": "RegionSetPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute"
+ ]
+ },
"setPrivateIpGoogleAccess": {
"description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.",
"httpMethod": "POST",
@@ -13715,6 +14810,51 @@
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"
]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the specified resource.",
+ "httpMethod": "POST",
+ "id": "compute.subnetworks.testIamPermissions",
+ "parameterOrder": [
+ "project",
+ "region",
+ "resource"
+ ],
+ "parameters": {
+ "project": {
+ "description": "Project ID for this request.",
+ "location": "path",
+ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ "required": true,
+ "type": "string"
+ },
+ "region": {
+ "description": "The name of the region for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ "required": true,
+ "type": "string"
+ },
+ "resource": {
+ "description": "Name or id of the resource for this request.",
+ "location": "path",
+ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions",
+ "request": {
+ "$ref": "TestPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/compute",
+ "https://www.googleapis.com/auth/compute.readonly"
+ ]
}
}
},
@@ -16596,7 +17736,7 @@
}
}
},
- "revision": "20181022",
+ "revision": "20181128",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@@ -17095,8 +18235,12 @@
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
"type": "string"
},
+ "network": {
+ "description": "The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.",
+ "type": "string"
+ },
"networkTier": {
- "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM , STANDARD.\n\nIf this field is not specified, it is assumed to be PREMIUM.",
+ "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.",
"enum": [
"PREMIUM",
"STANDARD"
@@ -17107,6 +18251,25 @@
],
"type": "string"
},
+ "prefixLength": {
+ "description": "The prefix length if the resource reprensents an IP range.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "purpose": {
+ "description": "The purpose of resource, only used with INTERNAL type.",
+ "enum": [
+ "DNS_RESOLVER",
+ "GCE_ENDPOINT",
+ "VPC_PEERING"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
"region": {
"description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.",
"type": "string"
@@ -17606,6 +18769,86 @@
},
"type": "object"
},
+ "AuditConfig": {
+ "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.",
+ "id": "AuditConfig",
+ "properties": {
+ "auditLogConfigs": {
+ "description": "The configuration for logging of each type of permission.",
+ "items": {
+ "$ref": "AuditLogConfig"
+ },
+ "type": "array"
+ },
+ "exemptedMembers": {
+ "description": "",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "service": {
+ "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AuditLogConfig": {
+ "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.",
+ "id": "AuditLogConfig",
+ "properties": {
+ "exemptedMembers": {
+ "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "logType": {
+ "description": "The log type that this config enables.",
+ "enum": [
+ "ADMIN_READ",
+ "DATA_READ",
+ "DATA_WRITE",
+ "LOG_TYPE_UNSPECIFIED"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AuthorizationLoggingOptions": {
+ "description": "Authorization-related information used by Cloud Audit Logging.",
+ "id": "AuthorizationLoggingOptions",
+ "properties": {
+ "permissionType": {
+ "description": "The type of the permission that was checked.",
+ "enum": [
+ "ADMIN_READ",
+ "ADMIN_WRITE",
+ "DATA_READ",
+ "DATA_WRITE",
+ "PERMISSION_TYPE_UNSPECIFIED"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Autoscaler": {
"description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)",
"id": "Autoscaler",
@@ -18113,7 +19356,7 @@
"type": "number"
},
"utilizationTargetType": {
- "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.",
+ "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.",
"enum": [
"DELTA_PER_MINUTE",
"DELTA_PER_SECOND",
@@ -18251,7 +19494,7 @@
"id": "BackendBucketCdnPolicy",
"properties": {
"signedUrlCacheMaxAgeSec": {
- "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
+ "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
"format": "int64",
"type": "string"
},
@@ -18413,7 +19656,7 @@
"type": "boolean"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.",
"format": "byte",
"type": "string"
},
@@ -18643,7 +19886,7 @@
"description": "The CacheKeyPolicy for this CdnPolicy."
},
"signedUrlCacheMaxAgeSec": {
- "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
+ "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.",
"format": "int64",
"type": "string"
},
@@ -18901,6 +20144,28 @@
},
"type": "object"
},
+ "Binding": {
+ "description": "Associates `members` with a `role`.",
+ "id": "Binding",
+ "properties": {
+ "condition": {
+ "$ref": "Expr",
+ "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently."
+ },
+ "members": {
+ "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "role": {
+ "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"CacheInvalidationRule": {
"id": "CacheInvalidationRule",
"properties": {
@@ -19352,6 +20617,88 @@
},
"type": "object"
},
+ "Condition": {
+ "description": "A condition to be met.",
+ "id": "Condition",
+ "properties": {
+ "iam": {
+ "description": "Trusted attributes supplied by the IAM system.",
+ "enum": [
+ "APPROVER",
+ "ATTRIBUTION",
+ "AUTHORITY",
+ "CREDENTIALS_TYPE",
+ "JUSTIFICATION_TYPE",
+ "NO_ATTR",
+ "SECURITY_REALM"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "op": {
+ "description": "An operator to apply the subject with.",
+ "enum": [
+ "DISCHARGED",
+ "EQUALS",
+ "IN",
+ "NOT_EQUALS",
+ "NOT_IN",
+ "NO_OP"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "svc": {
+ "description": "Trusted attributes discharged by the service.",
+ "type": "string"
+ },
+ "sys": {
+ "description": "Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.",
+ "enum": [
+ "IP",
+ "NAME",
+ "NO_ATTR",
+ "REGION",
+ "SERVICE"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "value": {
+ "description": "DEPRECATED. Use 'values' instead.",
+ "type": "string"
+ },
+ "values": {
+ "description": "The objects of the condition. This is mutually exclusive with 'value'.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
"ConnectionDraining": {
"description": "Message containing connection draining configuration.",
"id": "ConnectionDraining",
@@ -19468,7 +20815,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.",
+ "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.",
"format": "byte",
"type": "string"
},
@@ -19516,6 +20863,11 @@
"description": "Internal use only.",
"type": "string"
},
+ "physicalBlockSizeBytes": {
+ "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.",
+ "format": "int64",
+ "type": "string"
+ },
"region": {
"description": "[Output Only] URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.",
"type": "string"
@@ -20379,6 +21731,29 @@
},
"type": "object"
},
+ "Expr": {
+ "description": "Represents an expression text. Example:\n\ntitle: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) \u003e 0\"",
+ "id": "Expr",
+ "properties": {
+ "description": {
+ "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.",
+ "type": "string"
+ },
+ "expression": {
+ "description": "Textual representation of an expression in Common Expression Language syntax.\n\nThe application context of the containing message determines which well-known feature set of CEL is supported.",
+ "type": "string"
+ },
+ "location": {
+ "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.",
+ "type": "string"
+ },
+ "title": {
+ "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Firewall": {
"description": "Represents a Firewall resource.",
"id": "Firewall",
@@ -20464,6 +21839,10 @@
"description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.",
"type": "string"
},
+ "logConfig": {
+ "$ref": "FirewallLogConfig",
+ "description": "This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver."
+ },
"name": {
"annotations": {
"required": [
@@ -20638,6 +22017,17 @@
},
"type": "object"
},
+ "FirewallLogConfig": {
+ "description": "The available logging options for a firewall rule.",
+ "id": "FirewallLogConfig",
+ "properties": {
+ "enable": {
+ "description": "This field denotes whether to enable logging for a particular firewall rule.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"ForwardingRule": {
"description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)",
"id": "ForwardingRule",
@@ -20742,7 +22132,7 @@
"type": "string"
},
"ports": {
- "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.",
+ "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.",
"items": {
"type": "string"
},
@@ -21089,7 +22479,7 @@
"id": "GlobalSetLabelsRequest",
"properties": {
"labelFingerprint": {
- "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a get() request to the resource to get the latest fingerprint.",
+ "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.",
"format": "byte",
"type": "string"
},
@@ -21103,6 +22493,28 @@
},
"type": "object"
},
+ "GlobalSetPolicyRequest": {
+ "id": "GlobalSetPolicyRequest",
+ "properties": {
+ "bindings": {
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "items": {
+ "$ref": "Binding"
+ },
+ "type": "array"
+ },
+ "etag": {
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.",
+ "format": "byte",
+ "type": "string"
+ },
+ "policy": {
+ "$ref": "Policy",
+ "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them."
+ }
+ },
+ "type": "object"
+ },
"GuestOsFeature": {
"description": "Guest OS features.",
"id": "GuestOsFeature",
@@ -21877,7 +23289,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.",
+ "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.",
"format": "byte",
"type": "string"
},
@@ -22714,7 +24126,7 @@
"description": "Policy specifying intended distribution of instances in regional managed instance group."
},
"fingerprint": {
- "description": "Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager.\n\nTo see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.",
+ "description": "Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.",
"format": "byte",
"type": "string"
},
@@ -23489,7 +24901,7 @@
"id": "InstanceGroupsSetNamedPortsRequest",
"properties": {
"fingerprint": {
- "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.",
+ "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. A request with an incorrect fingerprint will fail with error 412 conditionNotMet.",
"format": "byte",
"type": "string"
},
@@ -24359,7 +25771,7 @@
"type": "boolean"
},
"bandwidth": {
- "description": "Provisioned bandwidth capacity for the interconnectAttachment. Can be set by the partner to update the customer's provisioned bandwidth. Output only for for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED.",
+ "description": "Provisioned bandwidth capacity for the interconnectAttachment. Can be set by the partner to update the customer's provisioned bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED.",
"enum": [
"BPS_100M",
"BPS_10G",
@@ -24480,7 +25892,7 @@
"type": "string"
},
"router": {
- "description": "URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.",
+ "description": "URL of the Cloud Router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.",
"type": "string"
},
"selfLink": {
@@ -24523,7 +25935,7 @@
"type": "string"
},
"vlanTag8021q": {
- "description": "Available only for DEDICATED and PARTNER_PROVIDER. Desired VLAN tag for this attachment, in the range 2-4094. This field refers to 802.1q VLAN tag, also known as IEEE 802.1Q Only specified at creation time.",
+ "description": "The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. Only specified at creation time.",
"format": "int32",
"type": "integer"
}
@@ -24759,7 +26171,7 @@
"id": "InterconnectAttachmentPartnerMetadata",
"properties": {
"interconnectName": {
- "description": "Plain text name of the Interconnect this attachment is connected to, as displayed in the Partner?s portal. For instance ?Chicago 1?. This value may be validated to match approved Partner values.",
+ "description": "Plain text name of the Interconnect this attachment is connected to, as displayed in the Partner?s portal. For instance \"Chicago 1\". This value may be validated to match approved Partner values.",
"type": "string"
},
"partnerName": {
@@ -24984,7 +26396,7 @@
"type": "string"
},
"value": {
- "description": "Value of the current optical power, read in dBm.",
+ "description": "Value of the current optical power, read in dBm. Take a known good optical value, give it a 10% margin and trigger warnings relative to that value. In general, a -7dBm warning and a -11dBm alarm are good optical value estimates for most links.",
"format": "float",
"type": "number"
}
@@ -25713,6 +27125,84 @@
},
"type": "object"
},
+ "LogConfig": {
+ "description": "Specifies what kind of log the caller must write",
+ "id": "LogConfig",
+ "properties": {
+ "cloudAudit": {
+ "$ref": "LogConfigCloudAuditOptions",
+ "description": "Cloud audit options."
+ },
+ "counter": {
+ "$ref": "LogConfigCounterOptions",
+ "description": "Counter options."
+ },
+ "dataAccess": {
+ "$ref": "LogConfigDataAccessOptions",
+ "description": "Data access options."
+ }
+ },
+ "type": "object"
+ },
+ "LogConfigCloudAuditOptions": {
+ "description": "Write a Cloud Audit log",
+ "id": "LogConfigCloudAuditOptions",
+ "properties": {
+ "authorizationLoggingOptions": {
+ "$ref": "AuthorizationLoggingOptions",
+ "description": "Information used by the Cloud Audit Logging pipeline."
+ },
+ "logName": {
+ "description": "The log_name to populate in the Cloud Audit Record.",
+ "enum": [
+ "ADMIN_ACTIVITY",
+ "DATA_ACCESS",
+ "UNSPECIFIED_LOG_NAME"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LogConfigCounterOptions": {
+ "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).",
+ "id": "LogConfigCounterOptions",
+ "properties": {
+ "field": {
+ "description": "The field value to attribute.",
+ "type": "string"
+ },
+ "metric": {
+ "description": "The metric to update.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LogConfigDataAccessOptions": {
+ "description": "Write a Data Access (Gin) log",
+ "id": "LogConfigDataAccessOptions",
+ "properties": {
+ "logMode": {
+ "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.\n\nNOTE: Logging to Gin in a fail-closed manner is currently unsupported while work is being done to satisfy the requirements of go/345. Currently, setting LOG_FAIL_CLOSED mode will have no effect, but still exists because there is active work being done to support it (b/115874152).",
+ "enum": [
+ "LOG_FAIL_CLOSED",
+ "LOG_MODE_UNSPECIFIED"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"MachineType": {
"description": "A Machine Type resource. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)",
"id": "MachineType",
@@ -26224,7 +27714,7 @@
"id": "Metadata",
"properties": {
"fingerprint": {
- "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make a get() request to retrieve the resource.",
+ "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve the resource.",
"format": "byte",
"type": "string"
},
@@ -26372,7 +27862,7 @@
"type": "array"
},
"fingerprint": {
- "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface.",
+ "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.",
"format": "byte",
"type": "string"
},
@@ -26517,7 +28007,7 @@
"id": "NetworkPeering",
"properties": {
"autoCreateRoutes": {
- "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.",
+ "description": "Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.",
"type": "boolean"
},
"name": {
@@ -28523,6 +30013,48 @@
},
"type": "object"
},
+ "Policy": {
+ "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**JSON Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\n**YAML Example**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer\n\n\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).",
+ "id": "Policy",
+ "properties": {
+ "auditConfigs": {
+ "description": "Specifies cloud audit logging configuration for this policy.",
+ "items": {
+ "$ref": "AuditConfig"
+ },
+ "type": "array"
+ },
+ "bindings": {
+ "description": "Associates a list of `members` to a `role`. `bindings` with no members will result in an error.",
+ "items": {
+ "$ref": "Binding"
+ },
+ "type": "array"
+ },
+ "etag": {
+ "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.",
+ "format": "byte",
+ "type": "string"
+ },
+ "iamOwned": {
+ "description": "",
+ "type": "boolean"
+ },
+ "rules": {
+ "description": "If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.",
+ "items": {
+ "$ref": "Rule"
+ },
+ "type": "array"
+ },
+ "version": {
+ "description": "Deprecated.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
"Project": {
"description": "A Project resource. For an overview of projects, see Cloud Platform Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)",
"id": "Project",
@@ -29738,6 +31270,28 @@
},
"type": "object"
},
+ "RegionSetPolicyRequest": {
+ "id": "RegionSetPolicyRequest",
+ "properties": {
+ "bindings": {
+ "description": "Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "items": {
+ "$ref": "Binding"
+ },
+ "type": "array"
+ },
+ "etag": {
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.",
+ "format": "byte",
+ "type": "string"
+ },
+ "policy": {
+ "$ref": "Policy",
+ "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them."
+ }
+ },
+ "type": "object"
+ },
"ResourceCommitment": {
"description": "Commitment for a particular resource (a Commitment is composed of one or more of these).",
"id": "ResourceCommitment",
@@ -30370,7 +31924,7 @@
"type": "string"
},
"managementType": {
- "description": "[Output Only] Type of how the resource/configuration of the BGP peer is managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT represents an BGP peer that is automatically created for PARTNER interconnectAttachment, Google will automatically create/delete this type of BGP peer when the PARTNER interconnectAttachment is created/deleted.",
+ "description": "[Output Only] The resource that configures and manages this BGP peer. MANAGED_BY_USER is the default value and can be managed by you or other users; MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google will automatically create, update, and delete this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.",
"enum": [
"MANAGED_BY_ATTACHMENT",
"MANAGED_BY_USER"
@@ -30414,7 +31968,7 @@
"type": "string"
},
"managementType": {
- "description": "[Output Only] Type of how the resource/configuration of the interface is managed. MANAGED_BY_USER is the default value; MANAGED_BY_ATTACHMENT represents an interface that is automatically created for PARTNER type interconnectAttachment, Google will automatically create/update/delete this type of interface when the PARTNER interconnectAttachment is created/provisioned/deleted.",
+ "description": "[Output Only] The resource that configures and manages this interface. MANAGED_BY_USER is the default value and can be managed by you or other users; MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google will automatically create, update, and delete this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.",
"enum": [
"MANAGED_BY_ATTACHMENT",
"MANAGED_BY_USER"
@@ -30913,6 +32467,72 @@
},
"type": "object"
},
+ "Rule": {
+ "description": "A rule to be applied in a Policy.",
+ "id": "Rule",
+ "properties": {
+ "action": {
+ "description": "Required",
+ "enum": [
+ "ALLOW",
+ "ALLOW_WITH_LOG",
+ "DENY",
+ "DENY_WITH_LOG",
+ "LOG",
+ "NO_ACTION"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
+ "conditions": {
+ "description": "Additional restrictions that must be met. All conditions must pass for the rule to match.",
+ "items": {
+ "$ref": "Condition"
+ },
+ "type": "array"
+ },
+ "description": {
+ "description": "Human-readable description of the rule.",
+ "type": "string"
+ },
+ "ins": {
+ "description": "If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "logConfigs": {
+ "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.",
+ "items": {
+ "$ref": "LogConfig"
+ },
+ "type": "array"
+ },
+ "notIns": {
+ "description": "If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "permissions": {
+ "description": "A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
"SSLHealthCheck": {
"id": "SSLHealthCheck",
"properties": {
@@ -31027,7 +32647,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the security policy.",
+ "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make get() request to the security policy.",
"format": "byte",
"type": "string"
},
@@ -31202,7 +32822,7 @@
"type": "boolean"
},
"priority": {
- "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated in the increasing order of priority.",
+ "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.",
"format": "int32",
"type": "integer"
}
@@ -31335,7 +32955,7 @@
"type": "string"
},
"labelFingerprint": {
- "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.",
+ "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.",
"format": "byte",
"type": "string"
},
@@ -31854,7 +33474,7 @@
"type": "array"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy.\n\nTo see the latest fingerprint, make a get() request to retrieve an SslPolicy.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an SslPolicy.",
"format": "byte",
"type": "string"
},
@@ -32021,7 +33641,7 @@
"type": "boolean"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork.\n\nTo see the latest fingerprint, make a get() request to retrieve a Subnetwork.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a Subnetwork.",
"format": "byte",
"type": "string"
},
@@ -32061,7 +33681,7 @@
"type": "string"
},
"secondaryIpRanges": {
- "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.",
+ "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.",
"items": {
"$ref": "SubnetworkSecondaryRange"
},
@@ -34548,7 +36168,7 @@
"type": "string"
},
"fingerprint": {
- "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap.\n\nTo see the latest fingerprint, make a get() request to retrieve a UrlMap.",
+ "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a UrlMap.",
"format": "byte",
"type": "string"
},
@@ -35867,6 +37487,28 @@
}
},
"type": "object"
+ },
+ "ZoneSetPolicyRequest": {
+ "id": "ZoneSetPolicyRequest",
+ "properties": {
+ "bindings": {
+ "description": "Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "items": {
+ "$ref": "Binding"
+ },
+ "type": "array"
+ },
+ "etag": {
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.",
+ "format": "byte",
+ "type": "string"
+ },
+ "policy": {
+ "$ref": "Policy",
+ "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them."
+ }
+ },
+ "type": "object"
}
},
"servicePath": "compute/v1/projects/",
diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go
index 6a0cbc0..836e1db 100644
--- a/compute/v1/compute-gen.go
+++ b/compute/v1/compute-gen.go
@@ -1464,9 +1464,17 @@
// last character, which cannot be a dash.
Name string `json:"name,omitempty"`
+ // Network: The URL of the network in which to reserve the address. This
+ // field can only be used with INTERNAL type with VPC_PEERING purpose.
+ Network string `json:"network,omitempty"`
+
// NetworkTier: This signifies the networking tier used for configuring
- // this Address and can only take the following values: PREMIUM ,
- // STANDARD.
+ // this Address and can only take the following values: PREMIUM,
+ // STANDARD. Global forwarding rules can only be Premium Tier. Regional
+ // forwarding rules can be either Premium or Standard Tier. Standard
+ // Tier addresses applied to regional forwarding rules can be used with
+ // any external load balancer. Regional forwarding rules in Premium Tier
+ // can only be used with a Network load balancer.
//
// If this field is not specified, it is assumed to be PREMIUM.
//
@@ -1475,6 +1483,18 @@
// "STANDARD"
NetworkTier string `json:"networkTier,omitempty"`
+ // PrefixLength: The prefix length if the resource reprensents an IP
+ // range.
+ PrefixLength int64 `json:"prefixLength,omitempty"`
+
+ // Purpose: The purpose of resource, only used with INTERNAL type.
+ //
+ // Possible values:
+ // "DNS_RESOLVER"
+ // "GCE_ENDPOINT"
+ // "VPC_PEERING"
+ Purpose string `json:"purpose,omitempty"`
+
// Region: [Output Only] URL of the region where the regional address
// resides. This field is not applicable to global addresses. You must
// specify this field as part of the HTTP request URL. You cannot set
@@ -2262,6 +2282,150 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// AuditConfig: Specifies the audit configuration for a service. The
+// configuration determines which permission types are logged, and what
+// identities, if any, are exempted from logging. An AuditConfig must
+// have one or more AuditLogConfigs.
+//
+// If there are AuditConfigs for both `allServices` and a specific
+// service, the union of the two AuditConfigs is used for that service:
+// the log_types specified in each AuditConfig are enabled, and the
+// exempted_members in each AuditLogConfig are exempted.
+//
+// Example Policy with multiple AuditConfigs:
+//
+// { "audit_configs": [ { "service": "allServices" "audit_log_configs":
+// [ { "log_type": "DATA_READ", "exempted_members": [
+// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, {
+// "log_type": "ADMIN_READ", } ] }, { "service":
+// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type":
+// "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [
+// "user:bar@gmail.com" ] } ] } ] }
+//
+// For fooservice, this policy enables DATA_READ, DATA_WRITE and
+// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ
+// logging, and bar@gmail.com from DATA_WRITE logging.
+type AuditConfig struct {
+ // AuditLogConfigs: The configuration for logging of each type of
+ // permission.
+ AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
+
+ ExemptedMembers []string `json:"exemptedMembers,omitempty"`
+
+ // Service: Specifies a service that will be enabled for audit logging.
+ // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
+ // `allServices` is a special value that covers all services.
+ Service string `json:"service,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AuditLogConfigs") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AuditConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod AuditConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AuditLogConfig: Provides the configuration for logging a type of
+// permissions. Example:
+//
+// { "audit_log_configs": [ { "log_type": "DATA_READ",
+// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type":
+// "DATA_WRITE", } ] }
+//
+// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
+// foo@gmail.com from DATA_READ logging.
+type AuditLogConfig struct {
+ // ExemptedMembers: Specifies the identities that do not cause logging
+ // for this type of permission. Follows the same format of
+ // [Binding.members][].
+ ExemptedMembers []string `json:"exemptedMembers,omitempty"`
+
+ // LogType: The log type that this config enables.
+ //
+ // Possible values:
+ // "ADMIN_READ"
+ // "DATA_READ"
+ // "DATA_WRITE"
+ // "LOG_TYPE_UNSPECIFIED"
+ LogType string `json:"logType,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExemptedMembers") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod AuditLogConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AuthorizationLoggingOptions: Authorization-related information used
+// by Cloud Audit Logging.
+type AuthorizationLoggingOptions struct {
+ // PermissionType: The type of the permission that was checked.
+ //
+ // Possible values:
+ // "ADMIN_READ"
+ // "ADMIN_WRITE"
+ // "DATA_READ"
+ // "DATA_WRITE"
+ // "PERMISSION_TYPE_UNSPECIFIED"
+ PermissionType string `json:"permissionType,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "PermissionType") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "PermissionType") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) {
+ type NoMethod AuthorizationLoggingOptions
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you
// to automatically scale virtual machine instances in managed instance
// groups according to an autoscaling policy that you define. For more
@@ -2993,8 +3157,7 @@
// UtilizationTargetType: Defines how target utilization value is
// expressed for a Stackdriver Monitoring metric. Either GAUGE,
- // DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default
- // is GAUGE.
+ // DELTA_PER_SECOND, or DELTA_PER_MINUTE.
//
// Possible values:
// "DELTA_PER_MINUTE"
@@ -3295,7 +3458,7 @@
// the response will be revalidated before being served. Defaults to 1hr
// (3600s). When serving responses to signed URL requests, Cloud CDN
// will internally behave as though all responses from this backend had
- // a ?Cache-Control: public, max-age=[TTL]? header, regardless of any
+ // a "Cache-Control: public, max-age=[TTL]" header, regardless of any
// existing Cache-Control header. The actual headers served in responses
// will not be altered.
SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"`
@@ -3521,8 +3684,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a BackendService. An up-to-date
- // fingerprint must be provided in order to update the
- // BackendService.
+ // fingerprint must be provided in order to update the BackendService,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// BackendService.
@@ -3831,7 +3994,7 @@
// the response will be revalidated before being served. Defaults to 1hr
// (3600s). When serving responses to signed URL requests, Cloud CDN
// will internally behave as though all responses from this backend had
- // a ?Cache-Control: public, max-age=[TTL]? header, regardless of any
+ // a "Cache-Control: public, max-age=[TTL]" header, regardless of any
// existing Cache-Control header. The actual headers served in responses
// will not be altered.
SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"`
@@ -4226,6 +4389,69 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Binding: Associates `members` with a `role`.
+type Binding struct {
+ // Condition: Unimplemented. The condition that is associated with this
+ // binding. NOTE: an unsatisfied condition will not allow user access
+ // via current binding. Different bindings, including their conditions,
+ // are examined independently.
+ Condition *Expr `json:"condition,omitempty"`
+
+ // Members: Specifies the identities requesting access for a Cloud
+ // Platform resource. `members` can have the following values:
+ //
+ // * `allUsers`: A special identifier that represents anyone who is on
+ // the internet; with or without a Google account.
+ //
+ // * `allAuthenticatedUsers`: A special identifier that represents
+ // anyone who is authenticated with a Google account or a service
+ // account.
+ //
+ // * `user:{emailid}`: An email address that represents a specific
+ // Google account. For example, `alice@gmail.com` .
+ //
+ //
+ //
+ // * `serviceAccount:{emailid}`: An email address that represents a
+ // service account. For example,
+ // `my-other-app@appspot.gserviceaccount.com`.
+ //
+ // * `group:{emailid}`: An email address that represents a Google group.
+ // For example, `admins@example.com`.
+ //
+ //
+ //
+ // * `domain:{domain}`: A Google Apps domain name that represents all
+ // the users of that domain. For example, `google.com` or `example.com`.
+ Members []string `json:"members,omitempty"`
+
+ // Role: Role that is assigned to `members`. For example,
+ // `roles/viewer`, `roles/editor`, or `roles/owner`.
+ Role string `json:"role,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Condition") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Condition") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Binding) MarshalJSON() ([]byte, error) {
+ type NoMethod Binding
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
type CacheInvalidationRule struct {
// Host: If set, this invalidation rule will only apply to requests with
// a Host header matching host.
@@ -4862,6 +5088,75 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Condition: A condition to be met.
+type Condition struct {
+ // Iam: Trusted attributes supplied by the IAM system.
+ //
+ // Possible values:
+ // "APPROVER"
+ // "ATTRIBUTION"
+ // "AUTHORITY"
+ // "CREDENTIALS_TYPE"
+ // "JUSTIFICATION_TYPE"
+ // "NO_ATTR"
+ // "SECURITY_REALM"
+ Iam string `json:"iam,omitempty"`
+
+ // Op: An operator to apply the subject with.
+ //
+ // Possible values:
+ // "DISCHARGED"
+ // "EQUALS"
+ // "IN"
+ // "NOT_EQUALS"
+ // "NOT_IN"
+ // "NO_OP"
+ Op string `json:"op,omitempty"`
+
+ // Svc: Trusted attributes discharged by the service.
+ Svc string `json:"svc,omitempty"`
+
+ // Sys: Trusted attributes supplied by any service that owns resources
+ // and uses the IAM system for access control.
+ //
+ // Possible values:
+ // "IP"
+ // "NAME"
+ // "NO_ATTR"
+ // "REGION"
+ // "SERVICE"
+ Sys string `json:"sys,omitempty"`
+
+ // Value: DEPRECATED. Use 'values' instead.
+ Value string `json:"value,omitempty"`
+
+ // Values: The objects of the condition. This is mutually exclusive with
+ // 'value'.
+ Values []string `json:"values,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Iam") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Iam") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Condition) MarshalJSON() ([]byte, error) {
+ type NoMethod Condition
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ConnectionDraining: Message containing connection draining
// configuration.
type ConnectionDraining struct {
@@ -5070,7 +5365,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// disk.
@@ -5108,6 +5404,13 @@
// Options: Internal use only.
Options string `json:"options,omitempty"`
+ // PhysicalBlockSizeBytes: Physical block size of the persistent disk,
+ // in bytes. If not present in a request, a default value is used.
+ // Currently supported sizes are 4096 and 16384, other sizes may be
+ // added in the future. If an unsupported value is requested, the error
+ // message will list the supported values for the caller's project.
+ PhysicalBlockSizeBytes int64 `json:"physicalBlockSizeBytes,omitempty,string"`
+
// Region: [Output Only] URL of the region where the disk resides. Only
// applicable for regional resources. You must specify this field as
// part of the HTTP request URL. It is not settable as a field in the
@@ -6403,6 +6706,56 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Expr: Represents an expression text. Example:
+//
+// title: "User account presence" description: "Determines whether the
+// request has a user account" expression: "size(request.user) > 0"
+type Expr struct {
+ // Description: An optional description of the expression. This is a
+ // longer text which describes the expression, e.g. when hovered over it
+ // in a UI.
+ Description string `json:"description,omitempty"`
+
+ // Expression: Textual representation of an expression in Common
+ // Expression Language syntax.
+ //
+ // The application context of the containing message determines which
+ // well-known feature set of CEL is supported.
+ Expression string `json:"expression,omitempty"`
+
+ // Location: An optional string indicating the location of the
+ // expression for error reporting, e.g. a file name and a position in
+ // the file.
+ Location string `json:"location,omitempty"`
+
+ // Title: An optional title for the expression, i.e. a short string
+ // describing its purpose. This can be used e.g. in UIs which allow to
+ // enter the expression.
+ Title string `json:"title,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Description") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Description") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Expr) MarshalJSON() ([]byte, error) {
+ type NoMethod Expr
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Firewall: Represents a Firewall resource.
type Firewall struct {
// Allowed: The list of ALLOW rules specified by this firewall. Each
@@ -6453,6 +6806,11 @@
// firewall rules.
Kind string `json:"kind,omitempty"`
+ // LogConfig: This field denotes the logging options for a particular
+ // firewall rule. If logging is enabled, logs will be exported to
+ // Stackdriver.
+ LogConfig *FirewallLogConfig `json:"logConfig,omitempty"`
+
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
@@ -6797,6 +7155,35 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// FirewallLogConfig: The available logging options for a firewall rule.
+type FirewallLogConfig struct {
+ // Enable: This field denotes whether to enable logging for a particular
+ // firewall rule.
+ Enable bool `json:"enable,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Enable") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Enable") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *FirewallLogConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod FirewallLogConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource
// specifies which pool of target virtual machines to forward a packet
// to if it matches the given [IPAddress, IPProtocol, ports] tuple. (==
@@ -6964,10 +7351,10 @@
// Ports: This field is used along with the backend_service field for
// internal load balancing.
//
- // When the load balancing scheme is INTERNAL, a single port or a comma
- // separated list of ports can be configured. Only packets addressed to
- // these ports will be forwarded to the backends configured with this
- // forwarding rule.
+ // When the load balancing scheme is INTERNAL, a list of ports can be
+ // configured, for example, ['80'], ['8000','9000'] etc. Only packets
+ // addressed to these ports will be forwarded to the backends configured
+ // with this forwarding rule.
//
// You may specify a maximum of up to 5 ports.
Ports []string `json:"ports,omitempty"`
@@ -7477,7 +7864,8 @@
// this resource, used to detect conflicts. The fingerprint is initially
// generated by Compute Engine and changes after every request to modify
// or update labels. You must always provide an up-to-date fingerprint
- // hash when updating or changing labels. Make a get() request to the
+ // hash when updating or changing labels, otherwise the request will
+ // fail with error 412 conditionNotMet. Make a get() request to the
// resource to get the latest fingerprint.
LabelFingerprint string `json:"labelFingerprint,omitempty"`
@@ -7515,6 +7903,44 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+type GlobalSetPolicyRequest struct {
+ // Bindings: Flatten Policy to create a backward compatible wire-format.
+ // Deprecated. Use 'policy' to specify bindings.
+ Bindings []*Binding `json:"bindings,omitempty"`
+
+ // Etag: Flatten Policy to create a backward compatible wire-format.
+ // Deprecated. Use 'policy' to specify the etag.
+ Etag string `json:"etag,omitempty"`
+
+ // Policy: REQUIRED: The complete policy to be applied to the
+ // 'resource'. The size of the policy is limited to a few 10s of KB. An
+ // empty policy is in general a valid policy but certain services (like
+ // Projects) might reject them.
+ Policy *Policy `json:"policy,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Bindings") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Bindings") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod GlobalSetPolicyRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// GuestOsFeature: Guest OS features.
type GuestOsFeature struct {
// Type: The ID of a supported feature. Read Enabling guest operating
@@ -8579,7 +9005,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update labels. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change labels.
+ // change labels, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// image.
@@ -9686,7 +10113,8 @@
// Fingerprint: Fingerprint of this resource. This field may be used in
// optimistic locking. It will be ignored when inserting an
// InstanceGroupManager. An up-to-date fingerprint must be provided in
- // order to update the InstanceGroupManager.
+ // order to update the InstanceGroupManager, otherwise the request will
+ // fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// InstanceGroupManager.
@@ -10872,7 +11300,9 @@
// multiple users change the named ports settings concurrently. Obtain
// the fingerprint with the instanceGroups.get method. Then, include the
// fingerprint in your request to ensure that you do not overwrite
- // changes that were applied from another concurrent request.
+ // changes that were applied from another concurrent request. A request
+ // with an incorrect fingerprint will fail with error 412
+ // conditionNotMet.
Fingerprint string `json:"fingerprint,omitempty"`
// NamedPorts: The list of named ports to set for this instance group.
@@ -12123,8 +12553,8 @@
// Bandwidth: Provisioned bandwidth capacity for the
// interconnectAttachment. Can be set by the partner to update the
- // customer's provisioned bandwidth. Output only for for PARTNER type,
- // mutable for PARTNER_PROVIDER, not available for DEDICATED.
+ // customer's provisioned bandwidth. Output only for PARTNER type,
+ // mutable for PARTNER_PROVIDER and DEDICATED.
//
// Possible values:
// "BPS_100M"
@@ -12242,7 +12672,7 @@
// body.
Region string `json:"region,omitempty"`
- // Router: URL of the cloud router to be used for dynamic routing. This
+ // Router: URL of the Cloud Router to be used for dynamic routing. This
// router must be in the same region as this InterconnectAttachment. The
// InterconnectAttachment will automatically connect the Interconnect to
// the network & region within which the Cloud Router is configured.
@@ -12270,10 +12700,8 @@
// "PARTNER_PROVIDER"
Type string `json:"type,omitempty"`
- // VlanTag8021q: Available only for DEDICATED and PARTNER_PROVIDER.
- // Desired VLAN tag for this attachment, in the range 2-4094. This field
- // refers to 802.1q VLAN tag, also known as IEEE 802.1Q Only specified
- // at creation time.
+ // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the
+ // range 2-4094. Only specified at creation time.
VlanTag8021q int64 `json:"vlanTag8021q,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -12624,7 +13052,7 @@
type InterconnectAttachmentPartnerMetadata struct {
// InterconnectName: Plain text name of the Interconnect this attachment
// is connected to, as displayed in the Partner?s portal. For instance
- // ?Chicago 1?. This value may be validated to match approved Partner
+ // "Chicago 1". This value may be validated to match approved Partner
// values.
InterconnectName string `json:"interconnectName,omitempty"`
@@ -12988,7 +13416,10 @@
// "OK"
State string `json:"state,omitempty"`
- // Value: Value of the current optical power, read in dBm.
+ // Value: Value of the current optical power, read in dBm. Take a known
+ // good optical value, give it a 10% margin and trigger warnings
+ // relative to that value. In general, a -7dBm warning and a -11dBm
+ // alarm are good optical value estimates for most links.
Value float64 `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "State") to
@@ -13985,6 +14416,175 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// LogConfig: Specifies what kind of log the caller must write
+type LogConfig struct {
+ // CloudAudit: Cloud audit options.
+ CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"`
+
+ // Counter: Counter options.
+ Counter *LogConfigCounterOptions `json:"counter,omitempty"`
+
+ // DataAccess: Data access options.
+ DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CloudAudit") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CloudAudit") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LogConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod LogConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// LogConfigCloudAuditOptions: Write a Cloud Audit log
+type LogConfigCloudAuditOptions struct {
+ // AuthorizationLoggingOptions: Information used by the Cloud Audit
+ // Logging pipeline.
+ AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"`
+
+ // LogName: The log_name to populate in the Cloud Audit Record.
+ //
+ // Possible values:
+ // "ADMIN_ACTIVITY"
+ // "DATA_ACCESS"
+ // "UNSPECIFIED_LOG_NAME"
+ LogName string `json:"logName,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "AuthorizationLoggingOptions") to unconditionally include in API
+ // requests. By default, fields with empty values are omitted from API
+ // requests. However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g.
+ // "AuthorizationLoggingOptions") to include in API requests with the
+ // JSON null value. By default, fields with empty values are omitted
+ // from API requests. However, any field with an empty value appearing
+ // in NullFields will be sent to the server as null. It is an error if a
+ // field in this list has a non-empty value. This may be used to include
+ // null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) {
+ type NoMethod LogConfigCloudAuditOptions
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// LogConfigCounterOptions: Increment a streamz counter with the
+// specified metric and field names.
+//
+// Metric names should start with a '/', generally be lowercase-only,
+// and end in "_count". Field names should not contain an initial slash.
+// The actual exported metric names will have "/iam/policy"
+// prepended.
+//
+// Field names correspond to IAM request parameters and field values are
+// their respective values.
+//
+// Supported field names: - "authority", which is "[token]" if
+// IAMContext.token is present, otherwise the value of
+// IAMContext.authority_selector if present, and otherwise a
+// representation of IAMContext.principal; or - "iam_principal", a
+// representation of IAMContext.principal even if a token or authority
+// selector is present; or - "" (empty string), resulting in a counter
+// with no fields.
+//
+// Examples: counter { metric: "/debug_access_count" field:
+// "iam_principal" } ==> increment counter
+// /iam/policy/backend_debug_access_count {iam_principal=[value of
+// IAMContext.principal]}
+//
+// At this time we do not support multiple field names (though this may
+// be supported in the future).
+type LogConfigCounterOptions struct {
+ // Field: The field value to attribute.
+ Field string `json:"field,omitempty"`
+
+ // Metric: The metric to update.
+ Metric string `json:"metric,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Field") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Field") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) {
+ type NoMethod LogConfigCounterOptions
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// LogConfigDataAccessOptions: Write a Data Access (Gin) log
+type LogConfigDataAccessOptions struct {
+ // LogMode: Whether Gin logging should happen in a fail-closed manner at
+ // the caller. This is relevant only in the LocalIAM implementation, for
+ // now.
+ //
+ // NOTE: Logging to Gin in a fail-closed manner is currently unsupported
+ // while work is being done to satisfy the requirements of go/345.
+ // Currently, setting LOG_FAIL_CLOSED mode will have no effect, but
+ // still exists because there is active work being done to support it
+ // (b/115874152).
+ //
+ // Possible values:
+ // "LOG_FAIL_CLOSED"
+ // "LOG_MODE_UNSPECIFIED"
+ LogMode string `json:"logMode,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LogMode") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LogMode") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) {
+ type NoMethod LogConfigDataAccessOptions
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// MachineType: A Machine Type resource. (== resource_for
// v1.machineTypes ==) (== resource_for beta.machineTypes ==)
type MachineType struct {
@@ -14735,7 +15335,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update metadata. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change metadata.
+ // change metadata, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve the
// resource.
@@ -14947,7 +15548,8 @@
// Fingerprint: Fingerprint hash of contents stored in this network
// interface. This field will be ignored when inserting an Instance or
// adding a NetworkInterface. An up-to-date fingerprint must be provided
- // in order to update the NetworkInterface.
+ // in order to update the NetworkInterface, otherwise the request will
+ // fail with error 412 conditionNotMet.
Fingerprint string `json:"fingerprint,omitempty"`
// Kind: [Output Only] Type of the resource. Always
@@ -15176,11 +15778,11 @@
// flag indicating whether Google Compute Engine should automatically
// create routes for the peering.
type NetworkPeering struct {
- // AutoCreateRoutes: Whether full mesh connectivity is created and
- // managed automatically. When it is set to true, Google Compute Engine
- // will automatically create and manage the routes between two networks
- // when the state is ACTIVE. Otherwise, user needs to create routes
- // manually to route packets to peer network.
+ // AutoCreateRoutes: Indicates whether full mesh connectivity is created
+ // and managed automatically. When it is set to true, Google Compute
+ // Engine will automatically create and manage the routes between two
+ // networks when the state is ACTIVE. Otherwise, user needs to create
+ // routes manually to route packets to peer network.
AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`
// Name: Name of this peering. Provided by the client when the peering
@@ -18074,6 +18676,102 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Policy: Defines an Identity and Access Management (IAM) policy. It is
+// used to specify access control policies for Cloud Platform
+// resources.
+//
+//
+//
+// A `Policy` consists of a list of `bindings`. A `binding` binds a list
+// of `members` to a `role`, where the members can be user accounts,
+// Google groups, Google domains, and service accounts. A `role` is a
+// named list of permissions defined by IAM.
+//
+// **JSON Example**
+//
+// { "bindings": [ { "role": "roles/owner", "members": [
+// "user:mike@example.com", "group:admins@example.com",
+// "domain:google.com",
+// "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, {
+// "role": "roles/viewer", "members": ["user:sean@example.com"] } ]
+// }
+//
+// **YAML Example**
+//
+// bindings: - members: - user:mike@example.com -
+// group:admins@example.com - domain:google.com -
+// serviceAccount:my-other-app@appspot.gserviceaccount.com role:
+// roles/owner - members: - user:sean@example.com role:
+// roles/viewer
+//
+//
+//
+// For a description of IAM and its features, see the [IAM developer's
+// guide](https://cloud.google.com/iam/docs).
+type Policy struct {
+ // AuditConfigs: Specifies cloud audit logging configuration for this
+ // policy.
+ AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
+
+ // Bindings: Associates a list of `members` to a `role`. `bindings` with
+ // no members will result in an error.
+ Bindings []*Binding `json:"bindings,omitempty"`
+
+ // Etag: `etag` is used for optimistic concurrency control as a way to
+ // help prevent simultaneous updates of a policy from overwriting each
+ // other. It is strongly suggested that systems make use of the `etag`
+ // in the read-modify-write cycle to perform policy updates in order to
+ // avoid race conditions: An `etag` is returned in the response to
+ // `getIamPolicy`, and systems are expected to put that etag in the
+ // request to `setIamPolicy` to ensure that their change will be applied
+ // to the same version of the policy.
+ //
+ // If no `etag` is provided in the call to `setIamPolicy`, then the
+ // existing policy is overwritten blindly.
+ Etag string `json:"etag,omitempty"`
+
+ IamOwned bool `json:"iamOwned,omitempty"`
+
+ // Rules: If more than one rule is specified, the rules are applied in
+ // the following manner: - All matching LOG rules are always applied. -
+ // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging
+ // will be applied if one or more matching rule requires logging. -
+ // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
+ // granted. Logging will be applied if one or more matching rule
+ // requires logging. - Otherwise, if no rule applies, permission is
+ // denied.
+ Rules []*Rule `json:"rules,omitempty"`
+
+ // Version: Deprecated.
+ Version int64 `json:"version,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AuditConfigs") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Policy) MarshalJSON() ([]byte, error) {
+ type NoMethod Policy
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Project: A Project resource. For an overview of projects, see Cloud
// Platform Resource Hierarchy. (== resource_for v1.projects ==) (==
// resource_for beta.projects ==)
@@ -19804,6 +20502,44 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+type RegionSetPolicyRequest struct {
+ // Bindings: Flatten Policy to create a backwacd compatible wire-format.
+ // Deprecated. Use 'policy' to specify bindings.
+ Bindings []*Binding `json:"bindings,omitempty"`
+
+ // Etag: Flatten Policy to create a backward compatible wire-format.
+ // Deprecated. Use 'policy' to specify the etag.
+ Etag string `json:"etag,omitempty"`
+
+ // Policy: REQUIRED: The complete policy to be applied to the
+ // 'resource'. The size of the policy is limited to a few 10s of KB. An
+ // empty policy is in general a valid policy but certain services (like
+ // Projects) might reject them.
+ Policy *Policy `json:"policy,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Bindings") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Bindings") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RegionSetPolicyRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod RegionSetPolicyRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ResourceCommitment: Commitment for a particular resource (a
// Commitment is composed of one or more of these).
type ResourceCommitment struct {
@@ -20620,12 +21356,13 @@
// Only IPv4 is supported.
IpAddress string `json:"ipAddress,omitempty"`
- // ManagementType: [Output Only] Type of how the resource/configuration
- // of the BGP peer is managed. MANAGED_BY_USER is the default value;
- // MANAGED_BY_ATTACHMENT represents an BGP peer that is automatically
- // created for PARTNER interconnectAttachment, Google will automatically
- // create/delete this type of BGP peer when the PARTNER
- // interconnectAttachment is created/deleted.
+ // ManagementType: [Output Only] The resource that configures and
+ // manages this BGP peer. MANAGED_BY_USER is the default value and can
+ // be managed by you or other users; MANAGED_BY_ATTACHMENT is a BGP peer
+ // that is configured and managed by Cloud Interconnect, specifically by
+ // an InterconnectAttachment of type PARTNER. Google will automatically
+ // create, update, and delete this type of BGP peer when the PARTNER
+ // InterconnectAttachment is created, updated, or deleted.
//
// Possible values:
// "MANAGED_BY_ATTACHMENT"
@@ -20687,12 +21424,14 @@
// attachment.
LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"`
- // ManagementType: [Output Only] Type of how the resource/configuration
- // of the interface is managed. MANAGED_BY_USER is the default value;
- // MANAGED_BY_ATTACHMENT represents an interface that is automatically
- // created for PARTNER type interconnectAttachment, Google will
- // automatically create/update/delete this type of interface when the
- // PARTNER interconnectAttachment is created/provisioned/deleted.
+ // ManagementType: [Output Only] The resource that configures and
+ // manages this interface. MANAGED_BY_USER is the default value and can
+ // be managed by you or other users; MANAGED_BY_ATTACHMENT is an
+ // interface that is configured and managed by Cloud Interconnect,
+ // specifically by an InterconnectAttachment of type PARTNER. Google
+ // will automatically create, update, and delete this type of interface
+ // when the PARTNER InterconnectAttachment is created, updated, or
+ // deleted.
//
// Possible values:
// "MANAGED_BY_ATTACHMENT"
@@ -21361,6 +22100,67 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Rule: A rule to be applied in a Policy.
+type Rule struct {
+ // Action: Required
+ //
+ // Possible values:
+ // "ALLOW"
+ // "ALLOW_WITH_LOG"
+ // "DENY"
+ // "DENY_WITH_LOG"
+ // "LOG"
+ // "NO_ACTION"
+ Action string `json:"action,omitempty"`
+
+ // Conditions: Additional restrictions that must be met. All conditions
+ // must pass for the rule to match.
+ Conditions []*Condition `json:"conditions,omitempty"`
+
+ // Description: Human-readable description of the rule.
+ Description string `json:"description,omitempty"`
+
+ // Ins: If one or more 'in' clauses are specified, the rule matches if
+ // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
+ Ins []string `json:"ins,omitempty"`
+
+ // LogConfigs: The config returned to callers of
+ // tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
+ LogConfigs []*LogConfig `json:"logConfigs,omitempty"`
+
+ // NotIns: If one or more 'not_in' clauses are specified, the rule
+ // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the
+ // entries.
+ NotIns []string `json:"notIns,omitempty"`
+
+ // Permissions: A permission is a string of form '..' (e.g.,
+ // 'storage.buckets.list'). A value of '*' matches all permissions, and
+ // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
+ Permissions []string `json:"permissions,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Action") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Action") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Rule) MarshalJSON() ([]byte, error) {
+ type NoMethod Rule
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
type SSLHealthCheck struct {
// Port: The TCP port number for the health check request. The default
// value is 443. Valid values are 1 through 65535.
@@ -21526,7 +22326,8 @@
// locking. The fingerprint is initially generated by Compute Engine and
// changes after every request to modify or update metadata. You must
// always provide an up-to-date fingerprint hash in order to update or
- // change metadata.
+ // change metadata, otherwise the request will fail with error 412
+ // conditionNotMet.
//
// To see the latest fingerprint, make get() request to the security
// policy.
@@ -21791,7 +22592,8 @@
// Priority: An integer indicating the priority of a rule in the list.
// The priority must be a positive value between 0 and 2147483647. Rules
- // are evaluated in the increasing order of priority.
+ // are evaluated from highest to lowest priority where 0 is the highest
+ // priority and 2147483647 is the lowest prority.
Priority int64 `json:"priority,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -22036,7 +22838,8 @@
// optimistic locking. The fingerprint is initially generated by Compute
// Engine and changes after every request to modify or update labels.
// You must always provide an up-to-date fingerprint hash in order to
- // update or change labels.
+ // update or change labels, otherwise the request will fail with error
+ // 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// snapshot.
@@ -22775,7 +23578,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a SslPolicy. An up-to-date
- // fingerprint must be provided in order to update the SslPolicy.
+ // fingerprint must be provided in order to update the SslPolicy,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve an
// SslPolicy.
@@ -23006,7 +23810,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a Subnetwork. An up-to-date
- // fingerprint must be provided in order to update the Subnetwork.
+ // fingerprint must be provided in order to update the Subnetwork,
+ // otherwise the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// Subnetwork.
@@ -23059,7 +23864,8 @@
// SecondaryIpRanges: An array of configurations for secondary IP ranges
// for VM instances contained in this subnetwork. The primary IP of such
// VM must belong to the primary ipCidrRange of the subnetwork. The
- // alias IPs may belong to either primary or secondary ranges.
+ // alias IPs may belong to either primary or secondary ranges. This
+ // field can be updated with a patch request.
SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"`
// SelfLink: [Output Only] Server-defined URL for the resource.
@@ -26818,7 +27624,8 @@
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a UrlMap. An up-to-date
- // fingerprint must be provided in order to update the UrlMap.
+ // fingerprint must be provided in order to update the UrlMap, otherwise
+ // the request will fail with error 412 conditionNotMet.
//
// To see the latest fingerprint, make a get() request to retrieve a
// UrlMap.
@@ -28722,6 +29529,44 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+type ZoneSetPolicyRequest struct {
+ // Bindings: Flatten Policy to create a backwacd compatible wire-format.
+ // Deprecated. Use 'policy' to specify bindings.
+ Bindings []*Binding `json:"bindings,omitempty"`
+
+ // Etag: Flatten Policy to create a backward compatible wire-format.
+ // Deprecated. Use 'policy' to specify the etag.
+ Etag string `json:"etag,omitempty"`
+
+ // Policy: REQUIRED: The complete policy to be applied to the
+ // 'resource'. The size of the policy is limited to a few 10s of KB. An
+ // empty policy is in general a valid policy but certain services (like
+ // Projects) might reject them.
+ Policy *Policy `json:"policy,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Bindings") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Bindings") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ZoneSetPolicyRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod ZoneSetPolicyRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// method id "compute.acceleratorTypes.aggregatedList":
type AcceleratorTypesAggregatedListCall struct {
@@ -34054,7 +34899,7 @@
}
// Get: Returns the specified BackendService resource. Gets a list of
-// available backend services by making a list() request.
+// available backend services.
// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get
func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall {
c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -34162,7 +35007,7 @@
}
return ret, nil
// {
- // "description": "Returns the specified BackendService resource. Gets a list of available backend services by making a list() request.",
+ // "description": "Returns the specified BackendService resource. Gets a list of available backend services.",
// "httpMethod": "GET",
// "id": "compute.backendServices.get",
// "parameterOrder": [
@@ -36391,7 +37236,7 @@
// "disk": {
// "description": "Name of the persistent disk to snapshot.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -36780,6 +37625,173 @@
}
+// method id "compute.disks.getIamPolicy":
+
+type DisksGetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall {
+ c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DisksGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.disks.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.disks.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/disks/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.disks.insert":
type DisksInsertCall struct {
@@ -37382,7 +38394,7 @@
// "disk": {
// "description": "The name of the persistent disk.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -37421,6 +38433,168 @@
}
+// method id "compute.disks.setIamPolicy":
+
+type DisksSetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ zonesetpolicyrequest *ZoneSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall {
+ c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.zonesetpolicyrequest = zonesetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DisksSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.disks.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.disks.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/disks/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "ZoneSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.disks.setLabels":
type DisksSetLabelsCall struct {
@@ -37578,9 +38752,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -37607,6 +38781,169 @@
}
+// method id "compute.disks.testIamPermissions":
+
+type DisksTestIamPermissionsCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall {
+ c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DisksTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.disks.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.disks.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.firewalls.delete":
type FirewallsDeleteCall struct {
@@ -45756,7 +47093,7 @@
// "image": {
// "description": "Name of the image resource to delete.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -45931,7 +47268,7 @@
// "image": {
// "description": "Image name.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -46251,7 +47588,7 @@
// "family": {
// "description": "Name of the image family to search for.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -46276,6 +47613,162 @@
}
+// method id "compute.images.getIamPolicy":
+
+type ImagesGetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall {
+ c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *ImagesGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ImagesGetIamPolicyCall) Context(ctx context.Context) *ImagesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ImagesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.images.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.images.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/images/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.images.insert":
type ImagesInsertCall struct {
@@ -46714,6 +48207,157 @@
}
}
+// method id "compute.images.setIamPolicy":
+
+type ImagesSetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ globalsetpolicyrequest *GlobalSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall {
+ c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.globalsetpolicyrequest = globalsetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ImagesSetIamPolicyCall) Context(ctx context.Context) *ImagesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ImagesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.images.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.images.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/images/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "GlobalSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.images.setLabels":
type ImagesSetLabelsCall struct {
@@ -46843,9 +48487,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -46865,6 +48509,158 @@
}
+// method id "compute.images.testIamPermissions":
+
+type ImagesTestIamPermissionsCall struct {
+ s *Service
+ project string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall {
+ c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ImagesTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.images.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.images.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/images/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.instanceGroupManagers.abandonInstances":
type InstanceGroupManagersAbandonInstancesCall struct {
@@ -48544,6 +50340,195 @@
}
+// method id "compute.instanceGroupManagers.patch":
+
+type InstanceGroupManagersPatchCall struct {
+ s *Service
+ project string
+ zone string
+ instanceGroupManager string
+ instancegroupmanager *InstanceGroupManager
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Patch: Updates a managed instance group using the information that
+// you specify in the request. This operation is marked as DONE when the
+// group is patched even if the instances in the group are still in the
+// process of being patched. You must separately verify the status of
+// the individual instances with the listManagedInstances method. This
+// method supports PATCH semantics and uses the JSON merge patch format
+// and processing rules.
+func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall {
+ c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.instanceGroupManager = instanceGroupManager
+ c.instancegroupmanager = instancegroupmanager
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstanceGroupManagersPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PATCH", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "instanceGroupManager": c.instanceGroupManager,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instanceGroupManagers.patch" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ // "httpMethod": "PATCH",
+ // "id": "compute.instanceGroupManagers.patch",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "instanceGroupManager"
+ // ],
+ // "parameters": {
+ // "instanceGroupManager": {
+ // "description": "The name of the instance group manager.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone where you want to create the managed instance group.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
+ // "request": {
+ // "$ref": "InstanceGroupManager"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.instanceGroupManagers.recreateInstances":
type InstanceGroupManagersRecreateInstancesCall struct {
@@ -51493,6 +53478,162 @@
}
+// method id "compute.instanceTemplates.getIamPolicy":
+
+type InstanceTemplatesGetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall {
+ c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstanceTemplatesGetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instanceTemplates.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.instanceTemplates.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/instanceTemplates/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.instanceTemplates.insert":
type InstanceTemplatesInsertCall struct {
@@ -51914,6 +54055,309 @@
}
}
+// method id "compute.instanceTemplates.setIamPolicy":
+
+type InstanceTemplatesSetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ globalsetpolicyrequest *GlobalSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall {
+ c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.globalsetpolicyrequest = globalsetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstanceTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstanceTemplatesSetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instanceTemplates.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.instanceTemplates.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/instanceTemplates/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "GlobalSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.instanceTemplates.testIamPermissions":
+
+type InstanceTemplatesTestIamPermissionsCall struct {
+ s *Service
+ project string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall {
+ c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instanceTemplates.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.instanceTemplates.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.instances.addAccessConfig":
type InstancesAddAccessConfigCall struct {
@@ -52064,7 +54508,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -52525,7 +54969,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -52892,7 +55336,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -53074,15 +55518,15 @@
// ],
// "parameters": {
// "deviceName": {
- // "description": "Disk device name to detach.",
+ // "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.",
// "location": "query",
// "required": true,
// "type": "string"
// },
// "instance": {
- // "description": "Instance name.",
+ // "description": "Instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -53286,6 +55730,173 @@
}
+// method id "compute.instances.getIamPolicy":
+
+type InstancesGetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall {
+ c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstancesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instances.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.instances.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/instances/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.instances.getSerialPortOutput":
type InstancesGetSerialPortOutputCall struct {
@@ -53440,7 +56051,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -54151,7 +56762,7 @@
// "instance": {
// "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.",
// "location": "path",
- // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -54363,7 +56974,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -54561,9 +57172,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -54736,16 +57347,16 @@
// "type": "boolean"
// },
// "deviceName": {
- // "description": "The device name of the disk to modify.",
+ // "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.",
// "location": "query",
// "pattern": "\\w[\\w.-]{0,254}",
// "required": true,
// "type": "string"
// },
// "instance": {
- // "description": "The instance name.",
+ // "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -54781,6 +57392,168 @@
}
+// method id "compute.instances.setIamPolicy":
+
+type InstancesSetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ zonesetpolicyrequest *ZoneSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall {
+ c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.zonesetpolicyrequest = zonesetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstancesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instances.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.instances.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/instances/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "ZoneSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.instances.setLabels":
type InstancesSetLabelsCall struct {
@@ -54928,7 +57701,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -55114,7 +57887,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -55300,7 +58073,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -55487,7 +58260,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -55675,7 +58448,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -55859,9 +58632,9 @@
// ],
// "parameters": {
// "instance": {
- // "description": "Instance name.",
+ // "description": "Instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -56048,7 +58821,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -56235,7 +59008,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -56395,7 +59168,7 @@
// "instance": {
// "description": "Name of the instance scoping this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -56567,7 +59340,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -56751,7 +59524,7 @@
// "instance": {
// "description": "Name of the instance resource to start.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -56935,7 +59708,7 @@
// "instance": {
// "description": "Name of the instance resource to stop.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -56971,6 +59744,169 @@
}
+// method id "compute.instances.testIamPermissions":
+
+type InstancesTestIamPermissionsCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall {
+ c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *InstancesTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.instances.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.instances.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.instances.updateAccessConfig":
type InstancesUpdateAccessConfigCall struct {
@@ -57122,7 +60058,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -57316,7 +60252,7 @@
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -60686,6 +63622,162 @@
}
+// method id "compute.licenses.getIamPolicy":
+
+type LicensesGetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall {
+ c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *LicensesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicensesGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LicensesGetIamPolicyCall) Context(ctx context.Context) *LicensesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LicensesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.licenses.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.licenses.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/licenses/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.licenses.insert":
type LicensesInsertCall struct {
@@ -61108,6 +64200,157 @@
}
}
+// method id "compute.licenses.setIamPolicy":
+
+type LicensesSetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ globalsetpolicyrequest *GlobalSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall {
+ c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.globalsetpolicyrequest = globalsetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LicensesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LicensesSetIamPolicyCall) Context(ctx context.Context) *LicensesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LicensesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.licenses.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.licenses.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/licenses/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "GlobalSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.licenses.testIamPermissions":
type LicensesTestIamPermissionsCall struct {
@@ -63517,7 +66760,7 @@
// ],
// "parameters": {
// "nodeGroup": {
- // "description": "Name of the NodeGroup resource to delete.",
+ // "description": "Name of the NodeGroup resource.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
@@ -64338,6 +67581,173 @@
}
+// method id "compute.nodeGroups.getIamPolicy":
+
+type NodeGroupsGetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall {
+ c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NodeGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *NodeGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeGroupsGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NodeGroupsGetIamPolicyCall) Context(ctx context.Context) *NodeGroupsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NodeGroupsGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.nodeGroups.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.nodeGroups.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.nodeGroups.insert":
type NodeGroupsInsertCall struct {
@@ -65045,6 +68455,168 @@
}
}
+// method id "compute.nodeGroups.setIamPolicy":
+
+type NodeGroupsSetIamPolicyCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ zonesetpolicyrequest *ZoneSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall {
+ c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.zonesetpolicyrequest = zonesetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NodeGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NodeGroupsSetIamPolicyCall) Context(ctx context.Context) *NodeGroupsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NodeGroupsSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.nodeGroups.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.nodeGroups.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "ZoneSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.nodeGroups.setNodeTemplate":
type NodeGroupsSetNodeTemplateCall struct {
@@ -65230,6 +68802,169 @@
}
+// method id "compute.nodeGroups.testIamPermissions":
+
+type NodeGroupsTestIamPermissionsCall struct {
+ s *Service
+ project string
+ zone string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall {
+ c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.zone = zone
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NodeGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeGroupsTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NodeGroupsTestIamPermissionsCall) Context(ctx context.Context) *NodeGroupsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "zone": c.zone,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.nodeGroups.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.nodeGroups.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "zone",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "zone": {
+ // "description": "The name of the zone for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.nodeTemplates.aggregatedList":
type NodeTemplatesAggregatedListCall struct {
@@ -65823,6 +69558,173 @@
}
+// method id "compute.nodeTemplates.getIamPolicy":
+
+type NodeTemplatesGetIamPolicyCall struct {
+ s *Service
+ project string
+ region string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall {
+ c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.region = region
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NodeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *NodeTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeTemplatesGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NodeTemplatesGetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "region": c.region,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.nodeTemplates.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.nodeTemplates.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "region",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "The name of the region for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.nodeTemplates.insert":
type NodeTemplatesInsertCall struct {
@@ -66261,6 +70163,331 @@
}
}
+// method id "compute.nodeTemplates.setIamPolicy":
+
+type NodeTemplatesSetIamPolicyCall struct {
+ s *Service
+ project string
+ region string
+ resource string
+ regionsetpolicyrequest *RegionSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall {
+ c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.region = region
+ c.resource = resource
+ c.regionsetpolicyrequest = regionsetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NodeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NodeTemplatesSetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "region": c.region,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.nodeTemplates.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *NodeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.nodeTemplates.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "region",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "The name of the region for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "RegionSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
+// method id "compute.nodeTemplates.testIamPermissions":
+
+type NodeTemplatesTestIamPermissionsCall struct {
+ s *Service
+ project string
+ region string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall {
+ c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.region = region
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *NodeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeTemplatesTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *NodeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *NodeTemplatesTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "region": c.region,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.nodeTemplates.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.nodeTemplates.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "region",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "The name of the region for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.nodeTypes.aggregatedList":
type NodeTypesAggregatedListCall struct {
@@ -73102,7 +77329,7 @@
// "disk": {
// "description": "Name of the regional persistent disk to snapshot.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -73452,7 +77679,7 @@
// "disk": {
// "description": "Name of the regional persistent disk to return.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -74080,7 +78307,7 @@
// "disk": {
// "description": "Name of the regional persistent disk.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// },
@@ -74282,9 +78509,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -75888,6 +80115,195 @@
}
+// method id "compute.regionInstanceGroupManagers.patch":
+
+type RegionInstanceGroupManagersPatchCall struct {
+ s *Service
+ project string
+ region string
+ instanceGroupManager string
+ instancegroupmanager *InstanceGroupManager
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Patch: Updates a managed instance group using the information that
+// you specify in the request. This operation is marked as DONE when the
+// group is patched even if the instances in the group are still in the
+// process of being patched. You must separately verify the status of
+// the individual instances with the listmanagedinstances method. This
+// method supports PATCH semantics and uses the JSON merge patch format
+// and processing rules.
+func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall {
+ c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.region = region
+ c.instanceGroupManager = instanceGroupManager
+ c.instancegroupmanager = instancegroupmanager
+ return c
+}
+
+// RequestId sets the optional parameter "requestId": An optional
+// request ID to identify requests. Specify a unique request ID so that
+// if you must retry your request, the server will know to ignore the
+// request if it has already been completed.
+//
+// For example, consider a situation where you make an initial request
+// and the request times out. If you make the request again with the
+// same request ID, the server can check if original operation with the
+// same request ID was received, and if so, will ignore the second
+// request. This prevents clients from accidentally creating duplicate
+// commitments.
+//
+// The request ID must be a valid UUID with the exception that zero UUID
+// is not supported (00000000-0000-0000-0000-000000000000).
+func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall {
+ c.urlParams_.Set("requestId", requestId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PATCH", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "region": c.region,
+ "instanceGroupManager": c.instanceGroupManager,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.regionInstanceGroupManagers.patch" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
+ // "httpMethod": "PATCH",
+ // "id": "compute.regionInstanceGroupManagers.patch",
+ // "parameterOrder": [
+ // "project",
+ // "region",
+ // "instanceGroupManager"
+ // ],
+ // "parameters": {
+ // "instanceGroupManager": {
+ // "description": "The name of the instance group manager.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "Name of the region scoping this request.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "requestId": {
+ // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}",
+ // "request": {
+ // "$ref": "InstanceGroupManager"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.regionInstanceGroupManagers.recreateInstances":
type RegionInstanceGroupManagersRecreateInstancesCall struct {
@@ -82807,7 +87223,7 @@
// deletion is needed for subsequent snapshots, the data will be moved
// to the next corresponding snapshot.
//
-// For more information, see Deleting snaphots.
+// For more information, see Deleting snapshots.
// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete
func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall {
c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
@@ -82921,7 +87337,7 @@
}
return ret, nil
// {
- // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.",
+ // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.",
// "httpMethod": "DELETE",
// "id": "compute.snapshots.delete",
// "parameterOrder": [
@@ -82944,7 +87360,7 @@
// "snapshot": {
// "description": "Name of the Snapshot resource to delete.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -83118,6 +87534,162 @@
}
+// method id "compute.snapshots.getIamPolicy":
+
+type SnapshotsGetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *SnapshotsService) GetIamPolicy(project string, resource string) *SnapshotsGetIamPolicyCall {
+ c := &SnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *SnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *SnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *SnapshotsGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *SnapshotsGetIamPolicyCall) Context(ctx context.Context) *SnapshotsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *SnapshotsGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.snapshots.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.snapshots.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/snapshots/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.snapshots.list":
type SnapshotsListCall struct {
@@ -83371,6 +87943,157 @@
}
}
+// method id "compute.snapshots.setIamPolicy":
+
+type SnapshotsSetIamPolicyCall struct {
+ s *Service
+ project string
+ resource string
+ globalsetpolicyrequest *GlobalSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *SnapshotsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *SnapshotsSetIamPolicyCall {
+ c := &SnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.globalsetpolicyrequest = globalsetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *SnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *SnapshotsSetIamPolicyCall) Context(ctx context.Context) *SnapshotsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *SnapshotsSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.snapshots.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *SnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.snapshots.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/snapshots/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "GlobalSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.snapshots.setLabels":
type SnapshotsSetLabelsCall struct {
@@ -83500,9 +88223,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -83522,6 +88245,158 @@
}
+// method id "compute.snapshots.testIamPermissions":
+
+type SnapshotsTestIamPermissionsCall struct {
+ s *Service
+ project string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall {
+ c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *SnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotsTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *SnapshotsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *SnapshotsTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.snapshots.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.snapshots.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/global/snapshots/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.sslCertificates.delete":
type SslCertificatesDeleteCall struct {
@@ -86180,6 +91055,173 @@
}
+// method id "compute.subnetworks.getIamPolicy":
+
+type SubnetworksGetIamPolicyCall struct {
+ s *Service
+ project string
+ region string
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a resource. May be
+// empty if no such policy or resource exists.
+func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall {
+ c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.region = region
+ c.resource = resource
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *SubnetworksGetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *SubnetworksGetIamPolicyCall) IfNoneMatch(entityTag string) *SubnetworksGetIamPolicyCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *SubnetworksGetIamPolicyCall) Context(ctx context.Context) *SubnetworksGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *SubnetworksGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "region": c.region,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.subnetworks.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
+ // "httpMethod": "GET",
+ // "id": "compute.subnetworks.getIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "region",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "The name of the region for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.subnetworks.insert":
type SubnetworksInsertCall struct {
@@ -86883,11 +91925,9 @@
}
// Patch: Patches the specified subnetwork with the data included in the
-// request. Only the following fields within the subnetwork resource can
-// be specified in the request: secondary_ip_range,
-// allow_subnet_cidr_routes_overlap and role. It is also mandatory to
-// specify the current fingeprint of the subnetwork resource being
-// patched.
+// request. Only certain fields can up updated with a patch request as
+// indicated in the field descriptions. You must specify the current
+// fingeprint of the subnetwork resource being patched.
func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall {
c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
@@ -87008,7 +92048,7 @@
}
return ret, nil
// {
- // "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range, allow_subnet_cidr_routes_overlap and role. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.",
+ // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.",
// "httpMethod": "PATCH",
// "id": "compute.subnetworks.patch",
// "parameterOrder": [
@@ -87059,6 +92099,168 @@
}
+// method id "compute.subnetworks.setIamPolicy":
+
+type SubnetworksSetIamPolicyCall struct {
+ s *Service
+ project string
+ region string
+ resource string
+ regionsetpolicyrequest *RegionSetPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy on the specified
+// resource. Replaces any existing policy.
+func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *SubnetworksSetIamPolicyCall {
+ c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.region = region
+ c.resource = resource
+ c.regionsetpolicyrequest = regionsetpolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *SubnetworksSetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *SubnetworksSetIamPolicyCall) Context(ctx context.Context) *SubnetworksSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *SubnetworksSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "region": c.region,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.subnetworks.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *SubnetworksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
+ // "httpMethod": "POST",
+ // "id": "compute.subnetworks.setIamPolicy",
+ // "parameterOrder": [
+ // "project",
+ // "region",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "The name of the region for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy",
+ // "request": {
+ // "$ref": "RegionSetPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute"
+ // ]
+ // }
+
+}
+
// method id "compute.subnetworks.setPrivateIpGoogleAccess":
type SubnetworksSetPrivateIpGoogleAccessCall struct {
@@ -87246,6 +92448,169 @@
}
+// method id "compute.subnetworks.testIamPermissions":
+
+type SubnetworksTestIamPermissionsCall struct {
+ s *Service
+ project string
+ region string
+ resource string
+ testpermissionsrequest *TestPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// specified resource.
+func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall {
+ c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.project = project
+ c.region = region
+ c.resource = resource
+ c.testpermissionsrequest = testpermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *SubnetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *SubnetworksTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *SubnetworksTestIamPermissionsCall) Context(ctx context.Context) *SubnetworksTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *SubnetworksTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "project": c.project,
+ "region": c.region,
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "compute.subnetworks.testIamPermissions" call.
+// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *TestPermissionsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the specified resource.",
+ // "httpMethod": "POST",
+ // "id": "compute.subnetworks.testIamPermissions",
+ // "parameterOrder": [
+ // "project",
+ // "region",
+ // "resource"
+ // ],
+ // "parameters": {
+ // "project": {
+ // "description": "Project ID for this request.",
+ // "location": "path",
+ // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "region": {
+ // "description": "The name of the region for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "resource": {
+ // "description": "Name or id of the resource for this request.",
+ // "location": "path",
+ // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions",
+ // "request": {
+ // "$ref": "TestPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/compute",
+ // "https://www.googleapis.com/auth/compute.readonly"
+ // ]
+ // }
+
+}
+
// method id "compute.targetHttpProxies.delete":
type TargetHttpProxiesDeleteCall struct {
diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json
index 35484f2..94f13f9 100644
--- a/container/v1beta1/container-api.json
+++ b/container/v1beta1/container-api.json
@@ -193,7 +193,7 @@
]
},
"list": {
- "description": "",
+ "description": "Used to fetch locations that offer GKE.",
"flatPath": "v1beta1/projects/{projectsId}/locations",
"httpMethod": "GET",
"id": "container.projects.locations.list",
@@ -2435,7 +2435,7 @@
}
}
},
- "revision": "20181109",
+ "revision": "20181113",
"rootUrl": "https://container.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@@ -2458,6 +2458,10 @@
"description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.",
"id": "AddonsConfig",
"properties": {
+ "cloudRunConfig": {
+ "$ref": "CloudRunConfig",
+ "description": "Configuration for the Cloud Run addon. The `IstioConfig` addon must be\nenabled in order to enable Cloud Run addon. This option can only be enabled\nat cluster creation time."
+ },
"horizontalPodAutoscaling": {
"$ref": "HorizontalPodAutoscaling",
"description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods."
@@ -2466,6 +2470,10 @@
"$ref": "HttpLoadBalancing",
"description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster."
},
+ "istioConfig": {
+ "$ref": "IstioConfig",
+ "description": "Configuration for Istio, an open platform to connect, manage, and secure\nmicroservices."
+ },
"kubernetesDashboard": {
"$ref": "KubernetesDashboard",
"description": "Configuration for the Kubernetes Dashboard."
@@ -2492,6 +2500,17 @@
},
"type": "object"
},
+ "BigQueryDestination": {
+ "description": "Parameters for using BigQuery as the destination of resource usage export.",
+ "id": "BigQueryDestination",
+ "properties": {
+ "datasetId": {
+ "description": "The ID of a BigQuery Dataset.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"BinaryAuthorization": {
"description": "Configuration for Binary Authorization.",
"id": "BinaryAuthorization",
@@ -2552,6 +2571,17 @@
},
"type": "object"
},
+ "CloudRunConfig": {
+ "description": "Configuration options for the Cloud Run feature.",
+ "id": "CloudRunConfig",
+ "properties": {
+ "disabled": {
+ "description": "Whether Cloud Run addon is enabled for this cluster.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"Cluster": {
"description": "A Google Kubernetes Engine cluster.",
"id": "Cluster",
@@ -2734,6 +2764,10 @@
"description": "The resource labels for the cluster to use to annotate any related\nGoogle Compute Engine resources.",
"type": "object"
},
+ "resourceUsageExportConfig": {
+ "$ref": "ResourceUsageExportConfig",
+ "description": "Configuration for exporting resource usages. Resource usage export is\ndisabled when this config unspecified."
+ },
"selfLink": {
"description": "[Output only] Server-defined URL for the resource.",
"type": "string"
@@ -2864,6 +2898,10 @@
"$ref": "PodSecurityPolicyConfig",
"description": "The desired configuration options for the PodSecurityPolicy feature."
},
+ "desiredResourceUsageExportConfig": {
+ "$ref": "ResourceUsageExportConfig",
+ "description": "The desired configuration for exporting resource usage."
+ },
"desiredVerticalPodAutoscaling": {
"$ref": "VerticalPodAutoscaling",
"description": "Cluster-level Vertical Pod Autoscaling configuration."
@@ -3046,6 +3084,29 @@
},
"type": "object"
},
+ "IstioConfig": {
+ "description": "Configuration options for Istio addon.",
+ "id": "IstioConfig",
+ "properties": {
+ "auth": {
+ "description": "The specified Istio auth mode, either none, or mutual TLS.",
+ "enum": [
+ "AUTH_NONE",
+ "AUTH_MUTUAL_TLS"
+ ],
+ "enumDescriptions": [
+ "auth not enabled",
+ "auth mutual TLS enabled"
+ ],
+ "type": "string"
+ },
+ "disabled": {
+ "description": "Whether Istio is enabled for this cluster.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"KubernetesDashboard": {
"description": "Configuration for the Kubernetes Dashboard.",
"id": "KubernetesDashboard",
@@ -3169,7 +3230,7 @@
"type": "string"
},
"recommended": {
- "description": "Recommended is a bool combining the drain state of the location (ie- has\nthe region been drained manually?), and the stockout status of any zone\naccording to Zone Advisor. This will be internal only for use by pantheon.",
+ "description": "Whether the location is recomended for GKE cluster scheduling.",
"type": "boolean"
},
"type": {
@@ -3811,6 +3872,21 @@
},
"type": "object"
},
+ "ResourceUsageExportConfig": {
+ "description": "Configuration for exporting cluster resource usages.",
+ "id": "ResourceUsageExportConfig",
+ "properties": {
+ "bigqueryDestination": {
+ "$ref": "BigQueryDestination",
+ "description": "Configuration to use BigQuery as usage export destination."
+ },
+ "enableNetworkEgressMetering": {
+ "description": "Whether to enable network egress metering for this cluster. If enabled, a\ndaemonset will be created in the cluster to meter network egress traffic.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
"RollbackNodePoolUpgradeRequest": {
"description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.",
"id": "RollbackNodePoolUpgradeRequest",
diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go
index f62e33e..44cc85a 100644
--- a/container/v1beta1/container-gen.go
+++ b/container/v1beta1/container-gen.go
@@ -249,6 +249,13 @@
// spun up in the
// cluster, enabling additional functionality.
type AddonsConfig struct {
+ // CloudRunConfig: Configuration for the Cloud Run addon. The
+ // `IstioConfig` addon must be
+ // enabled in order to enable Cloud Run addon. This option can only be
+ // enabled
+ // at cluster creation time.
+ CloudRunConfig *CloudRunConfig `json:"cloudRunConfig,omitempty"`
+
// HorizontalPodAutoscaling: Configuration for the horizontal pod
// autoscaling feature, which
// increases or decreases the number of replica pods a replication
@@ -262,6 +269,11 @@
// cluster.
HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"`
+ // IstioConfig: Configuration for Istio, an open platform to connect,
+ // manage, and secure
+ // microservices.
+ IstioConfig *IstioConfig `json:"istioConfig,omitempty"`
+
// KubernetesDashboard: Configuration for the Kubernetes Dashboard.
KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"`
@@ -272,19 +284,18 @@
// is enabled for the nodes.
NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"`
- // ForceSendFields is a list of field names (e.g.
- // "HorizontalPodAutoscaling") to unconditionally include in API
- // requests. By default, fields with empty values are omitted from API
- // requests. However, any non-pointer, non-interface field appearing in
- // ForceSendFields will be sent to the server regardless of whether the
- // field is empty or not. This may be used to include empty fields in
- // Patch requests.
+ // ForceSendFields is a list of field names (e.g. "CloudRunConfig") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "HorizontalPodAutoscaling")
- // to include in API requests with the JSON null value. By default,
- // fields with empty values are omitted from API requests. However, any
- // field with an empty value appearing in NullFields will be sent to the
+ // NullFields is a list of field names (e.g. "CloudRunConfig") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
@@ -338,6 +349,35 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// BigQueryDestination: Parameters for using BigQuery as the destination
+// of resource usage export.
+type BigQueryDestination struct {
+ // DatasetId: The ID of a BigQuery Dataset.
+ DatasetId string `json:"datasetId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DatasetId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DatasetId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BigQueryDestination) MarshalJSON() ([]byte, error) {
+ type NoMethod BigQueryDestination
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// BinaryAuthorization: Configuration for Binary Authorization.
type BinaryAuthorization struct {
// Enabled: Enable Binary Authorization for this cluster. If enabled,
@@ -481,6 +521,34 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// CloudRunConfig: Configuration options for the Cloud Run feature.
+type CloudRunConfig struct {
+ // Disabled: Whether Cloud Run addon is enabled for this cluster.
+ Disabled bool `json:"disabled,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Disabled") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Disabled") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CloudRunConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod CloudRunConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Cluster: A Google Kubernetes Engine cluster.
type Cluster struct {
// AddonsConfig: Configurations for the various addons available to run
@@ -759,6 +827,11 @@
// Google Compute Engine resources.
ResourceLabels map[string]string `json:"resourceLabels,omitempty"`
+ // ResourceUsageExportConfig: Configuration for exporting resource
+ // usages. Resource usage export is
+ // disabled when this config unspecified.
+ ResourceUsageExportConfig *ResourceUsageExportConfig `json:"resourceUsageExportConfig,omitempty"`
+
// SelfLink: [Output only] Server-defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
@@ -1009,6 +1082,10 @@
// the PodSecurityPolicy feature.
DesiredPodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"desiredPodSecurityPolicyConfig,omitempty"`
+ // DesiredResourceUsageExportConfig: The desired configuration for
+ // exporting resource usage.
+ DesiredResourceUsageExportConfig *ResourceUsageExportConfig `json:"desiredResourceUsageExportConfig,omitempty"`
+
// DesiredVerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling
// configuration.
DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `json:"desiredVerticalPodAutoscaling,omitempty"`
@@ -1507,6 +1584,41 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// IstioConfig: Configuration options for Istio addon.
+type IstioConfig struct {
+ // Auth: The specified Istio auth mode, either none, or mutual TLS.
+ //
+ // Possible values:
+ // "AUTH_NONE" - auth not enabled
+ // "AUTH_MUTUAL_TLS" - auth mutual TLS enabled
+ Auth string `json:"auth,omitempty"`
+
+ // Disabled: Whether Istio is enabled for this cluster.
+ Disabled bool `json:"disabled,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Auth") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Auth") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *IstioConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod IstioConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// KubernetesDashboard: Configuration for the Kubernetes Dashboard.
type KubernetesDashboard struct {
// Disabled: Whether the Kubernetes Dashboard is enabled for this
@@ -1780,12 +1892,8 @@
// Specified in the format 'projects/*/locations/*'.
Name string `json:"name,omitempty"`
- // Recommended: Recommended is a bool combining the drain state of the
- // location (ie- has
- // the region been drained manually?), and the stockout status of any
- // zone
- // according to Zone Advisor. This will be internal only for use by
- // pantheon.
+ // Recommended: Whether the location is recomended for GKE cluster
+ // scheduling.
Recommended bool `json:"recommended,omitempty"`
// Type: Contains the type of location this Location is for.
@@ -2905,6 +3013,43 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// ResourceUsageExportConfig: Configuration for exporting cluster
+// resource usages.
+type ResourceUsageExportConfig struct {
+ // BigqueryDestination: Configuration to use BigQuery as usage export
+ // destination.
+ BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"`
+
+ // EnableNetworkEgressMetering: Whether to enable network egress
+ // metering for this cluster. If enabled, a
+ // daemonset will be created in the cluster to meter network egress
+ // traffic.
+ EnableNetworkEgressMetering bool `json:"enableNetworkEgressMetering,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BigqueryDestination")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BigqueryDestination") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ResourceUsageExportConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod ResourceUsageExportConfig
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest
// rollbacks the previously Aborted or Failed
// NodePool upgrade. This will be an no-op if the last upgrade
@@ -4597,7 +4742,7 @@
header_ http.Header
}
-// List:
+// List: Used to fetch locations that offer GKE.
func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall {
c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
@@ -4702,7 +4847,7 @@
}
return ret, nil
// {
- // "description": "",
+ // "description": "Used to fetch locations that offer GKE.",
// "flatPath": "v1beta1/projects/{projectsId}/locations",
// "httpMethod": "GET",
// "id": "container.projects.locations.list",
diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json
new file mode 100644
index 0000000..14f520d
--- /dev/null
+++ b/content/v2.1/content-api.json
@@ -0,0 +1,9180 @@
+{
+ "auth": {
+ "oauth2": {
+ "scopes": {
+ "https://www.googleapis.com/auth/content": {
+ "description": "Manage your product listings and accounts for Google Shopping"
+ }
+ }
+ }
+ },
+ "basePath": "/content/v2.1/",
+ "baseUrl": "https://www.googleapis.com/content/v2.1/",
+ "batchPath": "batch/content/v2.1",
+ "canonicalName": "Shopping Content",
+ "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.",
+ "discoveryVersion": "v1",
+ "documentationLink": "https://developers.google.com/shopping-content",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/ID5kMVZMoLWuQq9JVwNj3SKnikc\"",
+ "icons": {
+ "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
+ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
+ },
+ "id": "content:v2.1",
+ "kind": "discovery#restDescription",
+ "name": "content",
+ "ownerDomain": "google.com",
+ "ownerName": "Google",
+ "parameters": {
+ "alt": {
+ "default": "json",
+ "description": "Data format for the response.",
+ "enum": [
+ "json"
+ ],
+ "enumDescriptions": [
+ "Responses with Content-Type of application/json"
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "fields": {
+ "description": "Selector specifying which fields to include in a partial response.",
+ "location": "query",
+ "type": "string"
+ },
+ "key": {
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
+ "location": "query",
+ "type": "string"
+ },
+ "oauth_token": {
+ "description": "OAuth 2.0 token for the current user.",
+ "location": "query",
+ "type": "string"
+ },
+ "prettyPrint": {
+ "default": "true",
+ "description": "Returns response with indentations and line breaks.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "quotaUser": {
+ "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
+ "location": "query",
+ "type": "string"
+ },
+ "userIp": {
+ "description": "Deprecated. Please use quotaUser instead.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "protocol": "rest",
+ "resources": {
+ "accounts": {
+ "methods": {
+ "authinfo": {
+ "description": "Returns information about the authenticated user.",
+ "httpMethod": "GET",
+ "id": "content.accounts.authinfo",
+ "path": "accounts/authinfo",
+ "response": {
+ "$ref": "AccountsAuthInfoResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "claimwebsite": {
+ "description": "Claims the website of a Merchant Center sub-account.",
+ "httpMethod": "POST",
+ "id": "content.accounts.claimwebsite",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account whose website is claimed.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "overwrite": {
+ "description": "Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.",
+ "location": "query",
+ "type": "boolean"
+ }
+ },
+ "path": "{merchantId}/accounts/{accountId}/claimwebsite",
+ "response": {
+ "$ref": "AccountsClaimWebsiteResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "custombatch": {
+ "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.",
+ "httpMethod": "POST",
+ "id": "content.accounts.custombatch",
+ "path": "accounts/batch",
+ "request": {
+ "$ref": "AccountsCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "AccountsCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "delete": {
+ "description": "Deletes a Merchant Center sub-account.",
+ "httpMethod": "DELETE",
+ "id": "content.accounts.delete",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "force": {
+ "default": "false",
+ "description": "Flag to delete sub-accounts with products. The default value is false.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounts/{accountId}",
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves a Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.accounts.get",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounts/{accountId}",
+ "response": {
+ "$ref": "Account"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "insert": {
+ "description": "Creates a Merchant Center sub-account.",
+ "httpMethod": "POST",
+ "id": "content.accounts.insert",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the managing account. This must be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounts",
+ "request": {
+ "$ref": "Account"
+ },
+ "response": {
+ "$ref": "Account"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "link": {
+ "description": "Performs an action on a link between a Merchant Center account and another account.",
+ "httpMethod": "POST",
+ "id": "content.accounts.link",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account that should be linked.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounts/{accountId}/link",
+ "request": {
+ "$ref": "AccountsLinkRequest"
+ },
+ "response": {
+ "$ref": "AccountsLinkResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the sub-accounts in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.accounts.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "maxResults": {
+ "description": "The maximum number of accounts to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. This must be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounts",
+ "response": {
+ "$ref": "AccountsListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "update": {
+ "description": "Updates a Merchant Center account.",
+ "httpMethod": "PUT",
+ "id": "content.accounts.update",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounts/{accountId}",
+ "request": {
+ "$ref": "Account"
+ },
+ "response": {
+ "$ref": "Account"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "accountstatuses": {
+ "methods": {
+ "custombatch": {
+ "httpMethod": "POST",
+ "id": "content.accountstatuses.custombatch",
+ "path": "accountstatuses/batch",
+ "request": {
+ "$ref": "AccountstatusesCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "AccountstatusesCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves the status of a Merchant Center account. Multi-client accounts can only call this method for sub-accounts.",
+ "httpMethod": "GET",
+ "id": "content.accountstatuses.get",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "destinations": {
+ "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accountstatuses/{accountId}",
+ "response": {
+ "$ref": "AccountStatus"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the statuses of the sub-accounts in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.accountstatuses.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "destinations": {
+ "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "maxResults": {
+ "description": "The maximum number of account statuses to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. This must be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accountstatuses",
+ "response": {
+ "$ref": "AccountstatusesListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "accounttax": {
+ "methods": {
+ "custombatch": {
+ "description": "Retrieves and updates tax settings of multiple accounts in a single request.",
+ "httpMethod": "POST",
+ "id": "content.accounttax.custombatch",
+ "path": "accounttax/batch",
+ "request": {
+ "$ref": "AccounttaxCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "AccounttaxCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves the tax settings of the account.",
+ "httpMethod": "GET",
+ "id": "content.accounttax.get",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to get/update account tax settings.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounttax/{accountId}",
+ "response": {
+ "$ref": "AccountTax"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.accounttax.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "maxResults": {
+ "description": "The maximum number of tax settings to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. This must be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounttax",
+ "response": {
+ "$ref": "AccounttaxListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "update": {
+ "description": "Updates the tax settings of the account.",
+ "httpMethod": "PUT",
+ "id": "content.accounttax.update",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to get/update account tax settings.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/accounttax/{accountId}",
+ "request": {
+ "$ref": "AccountTax"
+ },
+ "response": {
+ "$ref": "AccountTax"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "datafeeds": {
+ "methods": {
+ "custombatch": {
+ "httpMethod": "POST",
+ "id": "content.datafeeds.custombatch",
+ "path": "datafeeds/batch",
+ "request": {
+ "$ref": "DatafeedsCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "DatafeedsCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "delete": {
+ "description": "Deletes a datafeed configuration from your Merchant Center account.",
+ "httpMethod": "DELETE",
+ "id": "content.datafeeds.delete",
+ "parameterOrder": [
+ "merchantId",
+ "datafeedId"
+ ],
+ "parameters": {
+ "datafeedId": {
+ "description": "The ID of the datafeed.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeeds/{datafeedId}",
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "fetchnow": {
+ "description": "Invokes a fetch for the datafeed in your Merchant Center account.",
+ "httpMethod": "POST",
+ "id": "content.datafeeds.fetchnow",
+ "parameterOrder": [
+ "merchantId",
+ "datafeedId"
+ ],
+ "parameters": {
+ "datafeedId": {
+ "description": "The ID of the datafeed to be fetched.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow",
+ "response": {
+ "$ref": "DatafeedsFetchNowResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves a datafeed configuration from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.datafeeds.get",
+ "parameterOrder": [
+ "merchantId",
+ "datafeedId"
+ ],
+ "parameters": {
+ "datafeedId": {
+ "description": "The ID of the datafeed.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeeds/{datafeedId}",
+ "response": {
+ "$ref": "Datafeed"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "insert": {
+ "description": "Registers a datafeed configuration with your Merchant Center account.",
+ "httpMethod": "POST",
+ "id": "content.datafeeds.insert",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeeds",
+ "request": {
+ "$ref": "Datafeed"
+ },
+ "response": {
+ "$ref": "Datafeed"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the configurations for datafeeds in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.datafeeds.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "maxResults": {
+ "description": "The maximum number of products to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeeds",
+ "response": {
+ "$ref": "DatafeedsListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "update": {
+ "description": "Updates a datafeed configuration of your Merchant Center account.",
+ "httpMethod": "PUT",
+ "id": "content.datafeeds.update",
+ "parameterOrder": [
+ "merchantId",
+ "datafeedId"
+ ],
+ "parameters": {
+ "datafeedId": {
+ "description": "The ID of the datafeed.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeeds/{datafeedId}",
+ "request": {
+ "$ref": "Datafeed"
+ },
+ "response": {
+ "$ref": "Datafeed"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "datafeedstatuses": {
+ "methods": {
+ "custombatch": {
+ "httpMethod": "POST",
+ "id": "content.datafeedstatuses.custombatch",
+ "path": "datafeedstatuses/batch",
+ "request": {
+ "$ref": "DatafeedstatusesCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "DatafeedstatusesCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves the status of a datafeed from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.datafeedstatuses.get",
+ "parameterOrder": [
+ "merchantId",
+ "datafeedId"
+ ],
+ "parameters": {
+ "country": {
+ "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.",
+ "location": "query",
+ "type": "string"
+ },
+ "datafeedId": {
+ "description": "The ID of the datafeed.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "language": {
+ "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.",
+ "location": "query",
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeedstatuses/{datafeedId}",
+ "response": {
+ "$ref": "DatafeedStatus"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the statuses of the datafeeds in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.datafeedstatuses.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "maxResults": {
+ "description": "The maximum number of products to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/datafeedstatuses",
+ "response": {
+ "$ref": "DatafeedstatusesListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "liasettings": {
+ "methods": {
+ "custombatch": {
+ "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.",
+ "httpMethod": "POST",
+ "id": "content.liasettings.custombatch",
+ "path": "liasettings/batch",
+ "request": {
+ "$ref": "LiasettingsCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "LiasettingsCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves the LIA settings of the account.",
+ "httpMethod": "GET",
+ "id": "content.liasettings.get",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to get or update LIA settings.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings/{accountId}",
+ "response": {
+ "$ref": "LiaSettings"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "getaccessiblegmbaccounts": {
+ "description": "Retrieves the list of accessible Google My Business accounts.",
+ "httpMethod": "GET",
+ "id": "content.liasettings.getaccessiblegmbaccounts",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to retrieve accessible Google My Business accounts.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts",
+ "response": {
+ "$ref": "LiasettingsGetAccessibleGmbAccountsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.liasettings.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "maxResults": {
+ "description": "The maximum number of LIA settings to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. This must be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings",
+ "response": {
+ "$ref": "LiasettingsListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "listposdataproviders": {
+ "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.",
+ "httpMethod": "GET",
+ "id": "content.liasettings.listposdataproviders",
+ "path": "liasettings/posdataproviders",
+ "response": {
+ "$ref": "LiasettingsListPosDataProvidersResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "requestgmbaccess": {
+ "description": "Requests access to a specified Google My Business account.",
+ "httpMethod": "POST",
+ "id": "content.liasettings.requestgmbaccess",
+ "parameterOrder": [
+ "merchantId",
+ "accountId",
+ "gmbEmail"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which GMB access is requested.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "gmbEmail": {
+ "description": "The email of the Google My Business account.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess",
+ "response": {
+ "$ref": "LiasettingsRequestGmbAccessResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "requestinventoryverification": {
+ "description": "Requests inventory validation for the specified country.",
+ "httpMethod": "POST",
+ "id": "content.liasettings.requestinventoryverification",
+ "parameterOrder": [
+ "merchantId",
+ "accountId",
+ "country"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "country": {
+ "description": "The country for which inventory validation is requested.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}",
+ "response": {
+ "$ref": "LiasettingsRequestInventoryVerificationResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "setinventoryverificationcontact": {
+ "description": "Sets the inventory verification contract for the specified country.",
+ "httpMethod": "POST",
+ "id": "content.liasettings.setinventoryverificationcontact",
+ "parameterOrder": [
+ "merchantId",
+ "accountId",
+ "contactEmail",
+ "contactName",
+ "country",
+ "language"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "contactEmail": {
+ "description": "The email of the inventory verification contact.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ },
+ "contactName": {
+ "description": "The name of the inventory verification contact.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ },
+ "country": {
+ "description": "The country for which inventory verification is requested.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ },
+ "language": {
+ "description": "The language for which inventory verification is requested.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact",
+ "response": {
+ "$ref": "LiasettingsSetInventoryVerificationContactResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "setposdataprovider": {
+ "description": "Sets the POS data provider for the specified country.",
+ "httpMethod": "POST",
+ "id": "content.liasettings.setposdataprovider",
+ "parameterOrder": [
+ "merchantId",
+ "accountId",
+ "country"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to retrieve accessible Google My Business accounts.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "country": {
+ "description": "The country for which the POS data provider is selected.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "posDataProviderId": {
+ "description": "The ID of POS data provider.",
+ "format": "uint64",
+ "location": "query",
+ "type": "string"
+ },
+ "posExternalAccountId": {
+ "description": "The account ID by which this merchant is known to the POS data provider.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings/{accountId}/setposdataprovider",
+ "response": {
+ "$ref": "LiasettingsSetPosDataProviderResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "update": {
+ "description": "Updates the LIA settings of the account.",
+ "httpMethod": "PUT",
+ "id": "content.liasettings.update",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to get or update LIA settings.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/liasettings/{accountId}",
+ "request": {
+ "$ref": "LiaSettings"
+ },
+ "response": {
+ "$ref": "LiaSettings"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "orderinvoices": {
+ "methods": {
+ "createchargeinvoice": {
+ "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for non-facilitated payment orders.",
+ "httpMethod": "POST",
+ "id": "content.orderinvoices.createchargeinvoice",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice",
+ "request": {
+ "$ref": "OrderinvoicesCreateChargeInvoiceRequest"
+ },
+ "response": {
+ "$ref": "OrderinvoicesCreateChargeInvoiceResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "createrefundinvoice": {
+ "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for non-facilitated payment orders. This can only be used for line items that have previously been charged using createChargeInvoice. All amounts (except for the summary) are incremental with respect to the previous invoice.",
+ "httpMethod": "POST",
+ "id": "content.orderinvoices.createrefundinvoice",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice",
+ "request": {
+ "$ref": "OrderinvoicesCreateRefundInvoiceRequest"
+ },
+ "response": {
+ "$ref": "OrderinvoicesCreateRefundInvoiceResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "orderpayments": {
+ "methods": {
+ "notifyauthapproved": {
+ "description": "Notify about successfully authorizing user's payment method for a given amount.",
+ "httpMethod": "POST",
+ "id": "content.orderpayments.notifyauthapproved",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order for for which payment authorization is happening.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderpayments/{orderId}/notifyAuthApproved",
+ "request": {
+ "$ref": "OrderpaymentsNotifyAuthApprovedRequest"
+ },
+ "response": {
+ "$ref": "OrderpaymentsNotifyAuthApprovedResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "notifyauthdeclined": {
+ "description": "Notify about failure to authorize user's payment method.",
+ "httpMethod": "POST",
+ "id": "content.orderpayments.notifyauthdeclined",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order for which payment authorization was declined.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderpayments/{orderId}/notifyAuthDeclined",
+ "request": {
+ "$ref": "OrderpaymentsNotifyAuthDeclinedRequest"
+ },
+ "response": {
+ "$ref": "OrderpaymentsNotifyAuthDeclinedResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "notifycharge": {
+ "description": "Notify about charge on user's selected payments method.",
+ "httpMethod": "POST",
+ "id": "content.orderpayments.notifycharge",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order for which charge is happening.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderpayments/{orderId}/notifyCharge",
+ "request": {
+ "$ref": "OrderpaymentsNotifyChargeRequest"
+ },
+ "response": {
+ "$ref": "OrderpaymentsNotifyChargeResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "notifyrefund": {
+ "description": "Notify about refund on user's selected payments method.",
+ "httpMethod": "POST",
+ "id": "content.orderpayments.notifyrefund",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order for which charge is happening.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderpayments/{orderId}/notifyRefund",
+ "request": {
+ "$ref": "OrderpaymentsNotifyRefundRequest"
+ },
+ "response": {
+ "$ref": "OrderpaymentsNotifyRefundResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "orderreports": {
+ "methods": {
+ "listdisbursements": {
+ "description": "Retrieves a report for disbursements from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.orderreports.listdisbursements",
+ "parameterOrder": [
+ "merchantId",
+ "disbursementStartDate"
+ ],
+ "parameters": {
+ "disbursementEndDate": {
+ "description": "The last date which disbursements occurred. In ISO 8601 format. Default: current date.",
+ "location": "query",
+ "type": "string"
+ },
+ "disbursementStartDate": {
+ "description": "The first date which disbursements occurred. In ISO 8601 format.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ },
+ "maxResults": {
+ "description": "The maximum number of disbursements to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderreports/disbursements",
+ "response": {
+ "$ref": "OrderreportsListDisbursementsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "listtransactions": {
+ "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.orderreports.listtransactions",
+ "parameterOrder": [
+ "merchantId",
+ "disbursementId",
+ "transactionStartDate"
+ ],
+ "parameters": {
+ "disbursementId": {
+ "description": "The Google-provided ID of the disbursement (found in Wallet).",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "maxResults": {
+ "description": "The maximum number of disbursements to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ },
+ "transactionEndDate": {
+ "description": "The last date in which transaction occurred. In ISO 8601 format. Default: current date.",
+ "location": "query",
+ "type": "string"
+ },
+ "transactionStartDate": {
+ "description": "The first date in which transaction occurred. In ISO 8601 format.",
+ "location": "query",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions",
+ "response": {
+ "$ref": "OrderreportsListTransactionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "orderreturns": {
+ "methods": {
+ "get": {
+ "description": "Retrieves an order return from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.orderreturns.get",
+ "parameterOrder": [
+ "merchantId",
+ "returnId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "returnId": {
+ "description": "Merchant order return ID generated by Google.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderreturns/{returnId}",
+ "response": {
+ "$ref": "MerchantOrderReturn"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists order returns in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.orderreturns.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "createdEndDate": {
+ "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.",
+ "location": "query",
+ "type": "string"
+ },
+ "createdStartDate": {
+ "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.",
+ "location": "query",
+ "type": "string"
+ },
+ "maxResults": {
+ "description": "The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderBy": {
+ "description": "Return the results in the specified order.",
+ "enum": [
+ "returnCreationTimeAsc",
+ "returnCreationTimeDesc"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orderreturns",
+ "response": {
+ "$ref": "OrderreturnsListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "orders": {
+ "methods": {
+ "acknowledge": {
+ "description": "Marks an order as acknowledged.",
+ "httpMethod": "POST",
+ "id": "content.orders.acknowledge",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/acknowledge",
+ "request": {
+ "$ref": "OrdersAcknowledgeRequest"
+ },
+ "response": {
+ "$ref": "OrdersAcknowledgeResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "advancetestorder": {
+ "description": "Sandbox only. Moves a test order from state \"inProgress\" to state \"pendingShipment\".",
+ "httpMethod": "POST",
+ "id": "content.orders.advancetestorder",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the test order to modify.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/testorders/{orderId}/advance",
+ "response": {
+ "$ref": "OrdersAdvanceTestOrderResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "cancel": {
+ "description": "Cancels all line items in an order, making a full refund.",
+ "httpMethod": "POST",
+ "id": "content.orders.cancel",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order to cancel.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/cancel",
+ "request": {
+ "$ref": "OrdersCancelRequest"
+ },
+ "response": {
+ "$ref": "OrdersCancelResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "cancellineitem": {
+ "description": "Cancels a line item, making a full refund.",
+ "httpMethod": "POST",
+ "id": "content.orders.cancellineitem",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/cancelLineItem",
+ "request": {
+ "$ref": "OrdersCancelLineItemRequest"
+ },
+ "response": {
+ "$ref": "OrdersCancelLineItemResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "canceltestorderbycustomer": {
+ "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.",
+ "httpMethod": "POST",
+ "id": "content.orders.canceltestorderbycustomer",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the test order to cancel.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/testorders/{orderId}/cancelByCustomer",
+ "request": {
+ "$ref": "OrdersCancelTestOrderByCustomerRequest"
+ },
+ "response": {
+ "$ref": "OrdersCancelTestOrderByCustomerResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "createtestorder": {
+ "description": "Sandbox only. Creates a test order.",
+ "httpMethod": "POST",
+ "id": "content.orders.createtestorder",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/testorders",
+ "request": {
+ "$ref": "OrdersCreateTestOrderRequest"
+ },
+ "response": {
+ "$ref": "OrdersCreateTestOrderResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "createtestreturn": {
+ "description": "Sandbox only. Creates a test return.",
+ "httpMethod": "POST",
+ "id": "content.orders.createtestreturn",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/testreturn",
+ "request": {
+ "$ref": "OrdersCreateTestReturnRequest"
+ },
+ "response": {
+ "$ref": "OrdersCreateTestReturnResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves an order from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.orders.get",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}",
+ "response": {
+ "$ref": "Order"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "getbymerchantorderid": {
+ "description": "Retrieves an order using merchant order id.",
+ "httpMethod": "GET",
+ "id": "content.orders.getbymerchantorderid",
+ "parameterOrder": [
+ "merchantId",
+ "merchantOrderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantOrderId": {
+ "description": "The merchant order id to be looked for.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}",
+ "response": {
+ "$ref": "OrdersGetByMerchantOrderIdResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "gettestordertemplate": {
+ "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.",
+ "httpMethod": "GET",
+ "id": "content.orders.gettestordertemplate",
+ "parameterOrder": [
+ "merchantId",
+ "templateName"
+ ],
+ "parameters": {
+ "country": {
+ "description": "The country of the template to retrieve. Defaults to US.",
+ "location": "query",
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "templateName": {
+ "description": "The name of the template to retrieve.",
+ "enum": [
+ "template1",
+ "template1a",
+ "template1b",
+ "template2"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ ""
+ ],
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/testordertemplates/{templateName}",
+ "response": {
+ "$ref": "OrdersGetTestOrderTemplateResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "instorerefundlineitem": {
+ "description": "Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store).",
+ "httpMethod": "POST",
+ "id": "content.orders.instorerefundlineitem",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem",
+ "request": {
+ "$ref": "OrdersInStoreRefundLineItemRequest"
+ },
+ "response": {
+ "$ref": "OrdersInStoreRefundLineItemResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the orders in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.orders.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "acknowledged": {
+ "description": "Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged.\nWe recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "maxResults": {
+ "description": "The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.\nKnown issue: All List calls will return all Orders without limit regardless of the value of this field.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderBy": {
+ "description": "The ordering of the returned list. The only supported value are placedDate desc and placedDate asc for now, which returns orders sorted by placement date. \"placedDate desc\" stands for listing orders by placement date, from oldest to most recent. \"placedDate asc\" stands for listing orders by placement date, from most recent to oldest. In future releases we'll support other sorting criteria.",
+ "enum": [
+ "placedDate asc",
+ "placedDate desc"
+ ],
+ "enumDescriptions": [
+ "",
+ ""
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ },
+ "placedDateEnd": {
+ "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.",
+ "location": "query",
+ "type": "string"
+ },
+ "placedDateStart": {
+ "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.",
+ "location": "query",
+ "type": "string"
+ },
+ "statuses": {
+ "description": "Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, please note that active is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered, partiallyReturned, returned, and canceled.",
+ "enum": [
+ "active",
+ "canceled",
+ "completed",
+ "delivered",
+ "inProgress",
+ "partiallyDelivered",
+ "partiallyReturned",
+ "partiallyShipped",
+ "pendingShipment",
+ "returned",
+ "shipped"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders",
+ "response": {
+ "$ref": "OrdersListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "rejectreturnlineitem": {
+ "description": "Rejects return on an line item.",
+ "httpMethod": "POST",
+ "id": "content.orders.rejectreturnlineitem",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem",
+ "request": {
+ "$ref": "OrdersRejectReturnLineItemRequest"
+ },
+ "response": {
+ "$ref": "OrdersRejectReturnLineItemResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "returnrefundlineitem": {
+ "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.",
+ "httpMethod": "POST",
+ "id": "content.orders.returnrefundlineitem",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/returnRefundLineItem",
+ "request": {
+ "$ref": "OrdersReturnRefundLineItemRequest"
+ },
+ "response": {
+ "$ref": "OrdersReturnRefundLineItemResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "setlineitemmetadata": {
+ "description": "Sets (overrides) merchant provided annotations on the line item.",
+ "httpMethod": "POST",
+ "id": "content.orders.setlineitemmetadata",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/setLineItemMetadata",
+ "request": {
+ "$ref": "OrdersSetLineItemMetadataRequest"
+ },
+ "response": {
+ "$ref": "OrdersSetLineItemMetadataResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "shiplineitems": {
+ "description": "Marks line item(s) as shipped.",
+ "httpMethod": "POST",
+ "id": "content.orders.shiplineitems",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/shipLineItems",
+ "request": {
+ "$ref": "OrdersShipLineItemsRequest"
+ },
+ "response": {
+ "$ref": "OrdersShipLineItemsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "updatelineitemshippingdetails": {
+ "description": "Updates ship by and delivery by dates for a line item.",
+ "httpMethod": "POST",
+ "id": "content.orders.updatelineitemshippingdetails",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails",
+ "request": {
+ "$ref": "OrdersUpdateLineItemShippingDetailsRequest"
+ },
+ "response": {
+ "$ref": "OrdersUpdateLineItemShippingDetailsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "updatemerchantorderid": {
+ "description": "Updates the merchant order ID for a given order.",
+ "httpMethod": "POST",
+ "id": "content.orders.updatemerchantorderid",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId",
+ "request": {
+ "$ref": "OrdersUpdateMerchantOrderIdRequest"
+ },
+ "response": {
+ "$ref": "OrdersUpdateMerchantOrderIdResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "updateshipment": {
+ "description": "Updates a shipment's status, carrier, and/or tracking ID.",
+ "httpMethod": "POST",
+ "id": "content.orders.updateshipment",
+ "parameterOrder": [
+ "merchantId",
+ "orderId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the order.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/orders/{orderId}/updateShipment",
+ "request": {
+ "$ref": "OrdersUpdateShipmentRequest"
+ },
+ "response": {
+ "$ref": "OrdersUpdateShipmentResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "pos": {
+ "methods": {
+ "custombatch": {
+ "description": "Batches multiple POS-related calls in a single request.",
+ "httpMethod": "POST",
+ "id": "content.pos.custombatch",
+ "path": "pos/batch",
+ "request": {
+ "$ref": "PosCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "PosCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "delete": {
+ "description": "Deletes a store for the given merchant.",
+ "httpMethod": "DELETE",
+ "id": "content.pos.delete",
+ "parameterOrder": [
+ "merchantId",
+ "targetMerchantId",
+ "storeCode"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the POS or inventory data provider.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "storeCode": {
+ "description": "A store code that is unique per merchant.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "targetMerchantId": {
+ "description": "The ID of the target merchant.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}",
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves information about the given store.",
+ "httpMethod": "GET",
+ "id": "content.pos.get",
+ "parameterOrder": [
+ "merchantId",
+ "targetMerchantId",
+ "storeCode"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the POS or inventory data provider.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "storeCode": {
+ "description": "A store code that is unique per merchant.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "targetMerchantId": {
+ "description": "The ID of the target merchant.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}",
+ "response": {
+ "$ref": "PosStore"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "insert": {
+ "description": "Creates a store for the given merchant.",
+ "httpMethod": "POST",
+ "id": "content.pos.insert",
+ "parameterOrder": [
+ "merchantId",
+ "targetMerchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the POS or inventory data provider.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "targetMerchantId": {
+ "description": "The ID of the target merchant.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/pos/{targetMerchantId}/store",
+ "request": {
+ "$ref": "PosStore"
+ },
+ "response": {
+ "$ref": "PosStore"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "inventory": {
+ "description": "Submit inventory for the given merchant.",
+ "httpMethod": "POST",
+ "id": "content.pos.inventory",
+ "parameterOrder": [
+ "merchantId",
+ "targetMerchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the POS or inventory data provider.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "targetMerchantId": {
+ "description": "The ID of the target merchant.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/pos/{targetMerchantId}/inventory",
+ "request": {
+ "$ref": "PosInventoryRequest"
+ },
+ "response": {
+ "$ref": "PosInventoryResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the stores of the target merchant.",
+ "httpMethod": "GET",
+ "id": "content.pos.list",
+ "parameterOrder": [
+ "merchantId",
+ "targetMerchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the POS or inventory data provider.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "targetMerchantId": {
+ "description": "The ID of the target merchant.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/pos/{targetMerchantId}/store",
+ "response": {
+ "$ref": "PosListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "sale": {
+ "description": "Submit a sale event for the given merchant.",
+ "httpMethod": "POST",
+ "id": "content.pos.sale",
+ "parameterOrder": [
+ "merchantId",
+ "targetMerchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the POS or inventory data provider.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "targetMerchantId": {
+ "description": "The ID of the target merchant.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/pos/{targetMerchantId}/sale",
+ "request": {
+ "$ref": "PosSaleRequest"
+ },
+ "response": {
+ "$ref": "PosSaleResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "products": {
+ "methods": {
+ "custombatch": {
+ "description": "Retrieves, inserts, and deletes multiple products in a single request.",
+ "httpMethod": "POST",
+ "id": "content.products.custombatch",
+ "path": "products/batch",
+ "request": {
+ "$ref": "ProductsCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "ProductsCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "delete": {
+ "description": "Deletes a product from your Merchant Center account.",
+ "httpMethod": "DELETE",
+ "id": "content.products.delete",
+ "parameterOrder": [
+ "merchantId",
+ "productId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "productId": {
+ "description": "The REST id of the product.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/products/{productId}",
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves a product from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.products.get",
+ "parameterOrder": [
+ "merchantId",
+ "productId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "productId": {
+ "description": "The REST id of the product.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/products/{productId}",
+ "response": {
+ "$ref": "Product"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "insert": {
+ "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.",
+ "httpMethod": "POST",
+ "id": "content.products.insert",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/products",
+ "request": {
+ "$ref": "Product"
+ },
+ "response": {
+ "$ref": "Product"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the products in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.products.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "maxResults": {
+ "description": "The maximum number of products to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that contains the products. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/products",
+ "response": {
+ "$ref": "ProductsListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "productstatuses": {
+ "methods": {
+ "custombatch": {
+ "description": "Gets the statuses of multiple products in a single request.",
+ "httpMethod": "POST",
+ "id": "content.productstatuses.custombatch",
+ "path": "productstatuses/batch",
+ "request": {
+ "$ref": "ProductstatusesCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "ProductstatusesCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Gets the status of a product from your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.productstatuses.get",
+ "parameterOrder": [
+ "merchantId",
+ "productId"
+ ],
+ "parameters": {
+ "destinations": {
+ "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "productId": {
+ "description": "The REST id of the product.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/productstatuses/{productId}",
+ "response": {
+ "$ref": "ProductStatus"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the statuses of the products in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.productstatuses.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "destinations": {
+ "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "maxResults": {
+ "description": "The maximum number of product statuses to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the account that contains the products. This account cannot be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/productstatuses",
+ "response": {
+ "$ref": "ProductstatusesListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ },
+ "shippingsettings": {
+ "methods": {
+ "custombatch": {
+ "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.",
+ "httpMethod": "POST",
+ "id": "content.shippingsettings.custombatch",
+ "path": "shippingsettings/batch",
+ "request": {
+ "$ref": "ShippingsettingsCustomBatchRequest"
+ },
+ "response": {
+ "$ref": "ShippingsettingsCustomBatchResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "get": {
+ "description": "Retrieves the shipping settings of the account.",
+ "httpMethod": "GET",
+ "id": "content.shippingsettings.get",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to get/update shipping settings.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/shippingsettings/{accountId}",
+ "response": {
+ "$ref": "ShippingSettings"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "getsupportedcarriers": {
+ "description": "Retrieves supported carriers and carrier services for an account.",
+ "httpMethod": "GET",
+ "id": "content.shippingsettings.getsupportedcarriers",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account for which to retrieve the supported carriers.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/supportedCarriers",
+ "response": {
+ "$ref": "ShippingsettingsGetSupportedCarriersResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "getsupportedholidays": {
+ "description": "Retrieves supported holidays for an account.",
+ "httpMethod": "GET",
+ "id": "content.shippingsettings.getsupportedholidays",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "merchantId": {
+ "description": "The ID of the account for which to retrieve the supported holidays.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/supportedHolidays",
+ "response": {
+ "$ref": "ShippingsettingsGetSupportedHolidaysResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "list": {
+ "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.",
+ "httpMethod": "GET",
+ "id": "content.shippingsettings.list",
+ "parameterOrder": [
+ "merchantId"
+ ],
+ "parameters": {
+ "maxResults": {
+ "description": "The maximum number of shipping settings to return in the response, used for paging.",
+ "format": "uint32",
+ "location": "query",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. This must be a multi-client account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageToken": {
+ "description": "The token returned by the previous request.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/shippingsettings",
+ "response": {
+ "$ref": "ShippingsettingsListResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ },
+ "update": {
+ "description": "Updates the shipping settings of the account.",
+ "httpMethod": "PUT",
+ "id": "content.shippingsettings.update",
+ "parameterOrder": [
+ "merchantId",
+ "accountId"
+ ],
+ "parameters": {
+ "accountId": {
+ "description": "The ID of the account for which to get/update shipping settings.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ "format": "uint64",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "{merchantId}/shippingsettings/{accountId}",
+ "request": {
+ "$ref": "ShippingSettings"
+ },
+ "response": {
+ "$ref": "ShippingSettings"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/content"
+ ]
+ }
+ }
+ }
+ },
+ "revision": "20181203",
+ "rootUrl": "https://www.googleapis.com/",
+ "schemas": {
+ "Account": {
+ "description": "Account data. After the creation of a new account it may take a few minutes before it is fully operational. The methods delete, insert, patch, and update require the admin role.",
+ "id": "Account",
+ "properties": {
+ "adsLinks": {
+ "description": "List of linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected either in the Ads interface or through the AdWords API. To delete an active link, or to cancel a link request, remove it from the list.",
+ "items": {
+ "$ref": "AccountAdsLink"
+ },
+ "type": "array"
+ },
+ "adultContent": {
+ "description": "Indicates whether the merchant sells adult content.",
+ "type": "boolean"
+ },
+ "businessInformation": {
+ "$ref": "AccountBusinessInformation",
+ "description": "The business information of the account."
+ },
+ "googleMyBusinessLink": {
+ "$ref": "AccountGoogleMyBusinessLink",
+ "description": "The GMB account which is linked or in the process of being linked with the Merchant Center account."
+ },
+ "id": {
+ "annotations": {
+ "required": [
+ "content.accounts.update"
+ ]
+ },
+ "description": "Merchant Center account ID.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#account",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#account\".",
+ "type": "string"
+ },
+ "name": {
+ "annotations": {
+ "required": [
+ "content.accounts.insert",
+ "content.accounts.update"
+ ]
+ },
+ "description": "Display name for the account.",
+ "type": "string"
+ },
+ "sellerId": {
+ "description": "Client-specific, locally-unique, internal ID for the child account.",
+ "type": "string"
+ },
+ "users": {
+ "description": "Users with access to the account. Every account (except for subaccounts) must have at least one admin user.",
+ "items": {
+ "$ref": "AccountUser"
+ },
+ "type": "array"
+ },
+ "websiteUrl": {
+ "description": "The merchant's website.",
+ "type": "string"
+ },
+ "youtubeChannelLinks": {
+ "description": "List of linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.",
+ "items": {
+ "$ref": "AccountYouTubeChannelLink"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AccountAddress": {
+ "id": "AccountAddress",
+ "properties": {
+ "country": {
+ "description": "CLDR country code (e.g. \"US\").",
+ "type": "string"
+ },
+ "locality": {
+ "description": "City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs).",
+ "type": "string"
+ },
+ "postalCode": {
+ "description": "Postal code or ZIP (e.g. \"94043\").",
+ "type": "string"
+ },
+ "region": {
+ "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").",
+ "type": "string"
+ },
+ "streetAddress": {
+ "description": "Street-level part of the address.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountAdsLink": {
+ "id": "AccountAdsLink",
+ "properties": {
+ "adsId": {
+ "description": "Customer ID of the Ads account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "status": {
+ "description": "Status of the link between this Merchant Center account and the Ads account. Upon retrieval, it represents the actual status of the link and can be either active if it was approved in Google Ads or pending if it's pending approval. Upon insertion, it represents the intended status of the link. Re-uploading a link with status active when it's still pending or with status pending when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status inactive is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountBusinessInformation": {
+ "id": "AccountBusinessInformation",
+ "properties": {
+ "address": {
+ "$ref": "AccountAddress",
+ "description": "The address of the business."
+ },
+ "customerService": {
+ "$ref": "AccountCustomerService",
+ "description": "The customer service information of the business."
+ },
+ "phoneNumber": {
+ "description": "The phone number of the business.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountCustomerService": {
+ "id": "AccountCustomerService",
+ "properties": {
+ "email": {
+ "description": "Customer service email.",
+ "type": "string"
+ },
+ "phoneNumber": {
+ "description": "Customer service phone number.",
+ "type": "string"
+ },
+ "url": {
+ "description": "Customer service URL.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountGoogleMyBusinessLink": {
+ "id": "AccountGoogleMyBusinessLink",
+ "properties": {
+ "gmbEmail": {
+ "description": "The GMB email address of which a specific account within a GMB account. A sample account within a GMB account could be a business account with set of locations, managed under the GMB account.",
+ "type": "string"
+ },
+ "status": {
+ "description": "Status of the link between this Merchant Center account and the GMB account.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountIdentifier": {
+ "id": "AccountIdentifier",
+ "properties": {
+ "aggregatorId": {
+ "description": "The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).",
+ "format": "uint64",
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The merchant account ID, set for individual accounts and subaccounts.",
+ "format": "uint64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountStatus": {
+ "description": "The status of an account, i.e., information about its products, which is computed offline and not returned immediately at insertion time.",
+ "id": "AccountStatus",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account for which the status is reported.",
+ "type": "string"
+ },
+ "accountLevelIssues": {
+ "description": "A list of account level issues.",
+ "items": {
+ "$ref": "AccountStatusAccountLevelIssue"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#accountStatus",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountStatus\".",
+ "type": "string"
+ },
+ "products": {
+ "description": "List of product-related data by channel, destination, and country. Data in this field may be delayed by up to 30 minutes.",
+ "items": {
+ "$ref": "AccountStatusProducts"
+ },
+ "type": "array"
+ },
+ "websiteClaimed": {
+ "description": "Whether the account's website is claimed or not.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "AccountStatusAccountLevelIssue": {
+ "id": "AccountStatusAccountLevelIssue",
+ "properties": {
+ "country": {
+ "description": "Country for which this issue is reported.",
+ "type": "string"
+ },
+ "destination": {
+ "description": "The destination the issue applies to.",
+ "type": "string"
+ },
+ "detail": {
+ "description": "Additional details about the issue.",
+ "type": "string"
+ },
+ "documentation": {
+ "description": "The URL of a web page to help resolving this issue.",
+ "type": "string"
+ },
+ "id": {
+ "description": "Issue identifier.",
+ "type": "string"
+ },
+ "severity": {
+ "description": "Severity of the issue.",
+ "type": "string"
+ },
+ "title": {
+ "description": "Short description of the issue.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountStatusItemLevelIssue": {
+ "id": "AccountStatusItemLevelIssue",
+ "properties": {
+ "attributeName": {
+ "description": "The attribute's name, if the issue is caused by a single attribute.",
+ "type": "string"
+ },
+ "code": {
+ "description": "The error code of the issue.",
+ "type": "string"
+ },
+ "description": {
+ "description": "A short issue description in English.",
+ "type": "string"
+ },
+ "detail": {
+ "description": "A detailed issue description in English.",
+ "type": "string"
+ },
+ "documentation": {
+ "description": "The URL of a web page to help with resolving this issue.",
+ "type": "string"
+ },
+ "numItems": {
+ "description": "Number of items with this issue.",
+ "format": "int64",
+ "type": "string"
+ },
+ "resolution": {
+ "description": "Whether the issue can be resolved by the merchant.",
+ "type": "string"
+ },
+ "servability": {
+ "description": "How this issue affects serving of the offer.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountStatusProducts": {
+ "id": "AccountStatusProducts",
+ "properties": {
+ "channel": {
+ "description": "The channel the data applies to.",
+ "type": "string"
+ },
+ "country": {
+ "description": "The country the data applies to.",
+ "type": "string"
+ },
+ "destination": {
+ "description": "The destination the data applies to.",
+ "type": "string"
+ },
+ "itemLevelIssues": {
+ "description": "List of item-level issues.",
+ "items": {
+ "$ref": "AccountStatusItemLevelIssue"
+ },
+ "type": "array"
+ },
+ "statistics": {
+ "$ref": "AccountStatusStatistics",
+ "description": "Aggregated product statistics."
+ }
+ },
+ "type": "object"
+ },
+ "AccountStatusStatistics": {
+ "id": "AccountStatusStatistics",
+ "properties": {
+ "active": {
+ "description": "Number of active offers.",
+ "format": "int64",
+ "type": "string"
+ },
+ "disapproved": {
+ "description": "Number of disapproved offers.",
+ "format": "int64",
+ "type": "string"
+ },
+ "expiring": {
+ "description": "Number of expiring offers.",
+ "format": "int64",
+ "type": "string"
+ },
+ "pending": {
+ "description": "Number of pending offers.",
+ "format": "int64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountTax": {
+ "description": "The tax settings of a merchant account. All methods require the admin role.",
+ "id": "AccountTax",
+ "properties": {
+ "accountId": {
+ "annotations": {
+ "required": [
+ "content.accounttax.update"
+ ]
+ },
+ "description": "The ID of the account to which these account tax settings belong.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#accountTax",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountTax\".",
+ "type": "string"
+ },
+ "rules": {
+ "description": "Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.",
+ "items": {
+ "$ref": "AccountTaxTaxRule"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AccountTaxTaxRule": {
+ "description": "Tax calculation rule to apply in a state or province (USA only).",
+ "id": "AccountTaxTaxRule",
+ "properties": {
+ "country": {
+ "description": "Country code in which tax is applicable.",
+ "type": "string"
+ },
+ "locationId": {
+ "annotations": {
+ "required": [
+ "content.accounttax.update"
+ ]
+ },
+ "description": "State (or province) is which the tax is applicable, described by its location id (also called criteria id).",
+ "format": "uint64",
+ "type": "string"
+ },
+ "ratePercent": {
+ "description": "Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.",
+ "type": "string"
+ },
+ "shippingTaxed": {
+ "description": "If true, shipping charges are also taxed.",
+ "type": "boolean"
+ },
+ "useGlobalRate": {
+ "description": "Whether the tax rate is taken from a global tax table or specified explicitly.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "AccountUser": {
+ "id": "AccountUser",
+ "properties": {
+ "admin": {
+ "description": "Whether user is an admin.",
+ "type": "boolean"
+ },
+ "emailAddress": {
+ "description": "User's email address.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountYouTubeChannelLink": {
+ "id": "AccountYouTubeChannelLink",
+ "properties": {
+ "channelId": {
+ "description": "Channel ID.",
+ "type": "string"
+ },
+ "status": {
+ "description": "Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either active if it was approved in YT Creator Studio or pending if it's pending approval. Upon insertion, it represents the intended status of the link. Re-uploading a link with status active when it's still pending or with status pending when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status inactive is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsAuthInfoResponse": {
+ "id": "AccountsAuthInfoResponse",
+ "properties": {
+ "accountIdentifiers": {
+ "description": "The account identifiers corresponding to the authenticated user.\n- For an individual account: only the merchant ID is defined\n- For an aggregator: only the aggregator ID is defined\n- For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined.",
+ "items": {
+ "$ref": "AccountIdentifier"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#accountsAuthInfoResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountsAuthInfoResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsClaimWebsiteResponse": {
+ "id": "AccountsClaimWebsiteResponse",
+ "properties": {
+ "kind": {
+ "default": "content#accountsClaimWebsiteResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountsClaimWebsiteResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsCustomBatchRequest": {
+ "id": "AccountsCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "AccountsCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch accounts request.",
+ "id": "AccountsCustomBatchRequestEntry",
+ "properties": {
+ "account": {
+ "$ref": "Account",
+ "description": "The account to create or update. Only defined if the method is insert or update."
+ },
+ "accountId": {
+ "description": "The ID of the targeted account. Only defined if the method is not insert.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "force": {
+ "description": "Whether the account should be deleted if the account has offers. Only applicable if the method is delete.",
+ "type": "boolean"
+ },
+ "linkRequest": {
+ "$ref": "AccountsCustomBatchRequestEntryLinkRequest",
+ "description": "Details about the link request."
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "description": "The method of the batch entry.",
+ "type": "string"
+ },
+ "overwrite": {
+ "description": "Only applicable if the method is claimwebsite. Indicates whether or not to take the claim from another account in case there is a conflict.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsCustomBatchRequestEntryLinkRequest": {
+ "id": "AccountsCustomBatchRequestEntryLinkRequest",
+ "properties": {
+ "action": {
+ "description": "Action to perform for this link. The \"request\" action is only available to select merchants.",
+ "type": "string"
+ },
+ "linkType": {
+ "description": "Type of the link between the two accounts.",
+ "type": "string"
+ },
+ "linkedAccountId": {
+ "description": "The ID of the linked account.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsCustomBatchResponse": {
+ "id": "AccountsCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "AccountsCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#accountsCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountsCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch accounts response.",
+ "id": "AccountsCustomBatchResponseEntry",
+ "properties": {
+ "account": {
+ "$ref": "Account",
+ "description": "The retrieved, created, or updated account. Not defined if the method was delete, claimwebsite or link."
+ },
+ "batchId": {
+ "description": "The ID of the request entry this entry responds to.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if and only if the request failed."
+ },
+ "kind": {
+ "default": "content#accountsCustomBatchResponseEntry",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountsCustomBatchResponseEntry\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsLinkRequest": {
+ "id": "AccountsLinkRequest",
+ "properties": {
+ "action": {
+ "description": "Action to perform for this link. The \"request\" action is only available to select merchants.",
+ "type": "string"
+ },
+ "linkType": {
+ "description": "Type of the link between the two accounts.",
+ "type": "string"
+ },
+ "linkedAccountId": {
+ "description": "The ID of the linked account.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsLinkResponse": {
+ "id": "AccountsLinkResponse",
+ "properties": {
+ "kind": {
+ "default": "content#accountsLinkResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountsLinkResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountsListResponse": {
+ "id": "AccountsListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#accountsListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountsListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of accounts.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "Account"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AccountstatusesCustomBatchRequest": {
+ "id": "AccountstatusesCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "AccountstatusesCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AccountstatusesCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch accountstatuses request.",
+ "id": "AccountstatusesCustomBatchRequestEntry",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the (sub-)account whose status to get.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "destinations": {
+ "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "description": "The method (get).",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountstatusesCustomBatchResponse": {
+ "id": "AccountstatusesCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "AccountstatusesCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#accountstatusesCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountstatusesCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccountstatusesCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch accountstatuses response.",
+ "id": "AccountstatusesCustomBatchResponseEntry",
+ "properties": {
+ "accountStatus": {
+ "$ref": "AccountStatus",
+ "description": "The requested account status. Defined if and only if the request was successful."
+ },
+ "batchId": {
+ "description": "The ID of the request entry this entry responds to.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if and only if the request failed."
+ }
+ },
+ "type": "object"
+ },
+ "AccountstatusesListResponse": {
+ "id": "AccountstatusesListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#accountstatusesListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountstatusesListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of account statuses.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "AccountStatus"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AccounttaxCustomBatchRequest": {
+ "id": "AccounttaxCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "AccounttaxCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "AccounttaxCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch accounttax request.",
+ "id": "AccounttaxCustomBatchRequestEntry",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account for which to get/update account tax settings.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "accountTax": {
+ "$ref": "AccountTax",
+ "description": "The account tax settings to update. Only defined if the method is update."
+ },
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccounttaxCustomBatchResponse": {
+ "id": "AccounttaxCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "AccounttaxCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#accounttaxCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accounttaxCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccounttaxCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch accounttax response.",
+ "id": "AccounttaxCustomBatchResponseEntry",
+ "properties": {
+ "accountTax": {
+ "$ref": "AccountTax",
+ "description": "The retrieved or updated account tax settings."
+ },
+ "batchId": {
+ "description": "The ID of the request entry this entry responds to.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if and only if the request failed."
+ },
+ "kind": {
+ "default": "content#accounttaxCustomBatchResponseEntry",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accounttaxCustomBatchResponseEntry\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AccounttaxListResponse": {
+ "id": "AccounttaxListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#accounttaxListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accounttaxListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of account tax settings.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "AccountTax"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Amount": {
+ "id": "Amount",
+ "properties": {
+ "pretax": {
+ "$ref": "Price",
+ "description": "[required] Value before taxes."
+ },
+ "tax": {
+ "$ref": "Price",
+ "description": "[required] Tax value."
+ }
+ },
+ "type": "object"
+ },
+ "CarrierRate": {
+ "id": "CarrierRate",
+ "properties": {
+ "carrierName": {
+ "description": "Carrier service, such as \"UPS\" or \"Fedex\". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.",
+ "type": "string"
+ },
+ "carrierService": {
+ "description": "Carrier service, such as \"ground\" or \"2 days\". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.",
+ "type": "string"
+ },
+ "flatAdjustment": {
+ "$ref": "Price",
+ "description": "Additive shipping rate modifier. Can be negative. For example { \"value\": \"1\", \"currency\" : \"USD\" } adds $1 to the rate, { \"value\": \"-3\", \"currency\" : \"USD\" } removes $3 from the rate. Optional."
+ },
+ "name": {
+ "description": "Name of the carrier rate. Must be unique per rate group. Required.",
+ "type": "string"
+ },
+ "originPostalCode": {
+ "description": "Shipping origin for this carrier rate. Required.",
+ "type": "string"
+ },
+ "percentageAdjustment": {
+ "description": "Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example \"5.4\" increases the rate by 5.4%, \"-3\" decreases the rate by 3%. Optional.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "CarriersCarrier": {
+ "id": "CarriersCarrier",
+ "properties": {
+ "country": {
+ "description": "The CLDR country code of the carrier (e.g., \"US\"). Always present.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the carrier (e.g., \"UPS\"). Always present.",
+ "type": "string"
+ },
+ "services": {
+ "description": "A list of supported services (e.g., \"ground\") for that carrier. Contains at least one service.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "CustomAttribute": {
+ "id": "CustomAttribute",
+ "properties": {
+ "groupValues": {
+ "description": "Subattributes within this attribute group. Exactly one of value or groupValues must be provided.",
+ "items": {
+ "$ref": "CustomAttribute"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "The name of the attribute. Underscores will be replaced by spaces upon insertion.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the attribute.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "CustomerReturnReason": {
+ "id": "CustomerReturnReason",
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "reasonCode": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "CutoffTime": {
+ "id": "CutoffTime",
+ "properties": {
+ "hour": {
+ "description": "Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "minute": {
+ "description": "Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "timezone": {
+ "description": "Timezone identifier for the cutoff time. A list of identifiers can be found in the AdWords API documentation. E.g. \"Europe/Zurich\". Required.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Datafeed": {
+ "description": "Datafeed configuration data.",
+ "id": "Datafeed",
+ "properties": {
+ "attributeLanguage": {
+ "description": "The two-letter ISO 639-1 language in which the attributes are defined in the data feed.",
+ "type": "string"
+ },
+ "contentType": {
+ "annotations": {
+ "required": [
+ "content.datafeeds.insert",
+ "content.datafeeds.update"
+ ]
+ },
+ "description": "The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported.",
+ "type": "string"
+ },
+ "fetchSchedule": {
+ "$ref": "DatafeedFetchSchedule",
+ "description": "Fetch schedule for the feed file."
+ },
+ "fileName": {
+ "annotations": {
+ "required": [
+ "content.datafeeds.insert",
+ "content.datafeeds.update"
+ ]
+ },
+ "description": "The filename of the feed. All feeds must have a unique file name.",
+ "type": "string"
+ },
+ "format": {
+ "$ref": "DatafeedFormat",
+ "description": "Format of the feed file."
+ },
+ "id": {
+ "annotations": {
+ "required": [
+ "content.datafeeds.update"
+ ]
+ },
+ "description": "The ID of the data feed.",
+ "format": "int64",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#datafeed",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeed\".",
+ "type": "string"
+ },
+ "name": {
+ "annotations": {
+ "required": [
+ "content.datafeeds.insert"
+ ]
+ },
+ "description": "A descriptive name of the data feed.",
+ "type": "string"
+ },
+ "targets": {
+ "description": "The targets this feed should apply to (country, language, destinations).",
+ "items": {
+ "$ref": "DatafeedTarget"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedFetchSchedule": {
+ "description": "The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.",
+ "id": "DatafeedFetchSchedule",
+ "properties": {
+ "dayOfMonth": {
+ "description": "The day of the month the feed file should be fetched (1-31).",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "fetchUrl": {
+ "description": "The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.",
+ "type": "string"
+ },
+ "hour": {
+ "description": "The hour of the day the feed file should be fetched (0-23).",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "minuteOfHour": {
+ "description": "The minute of the hour the feed file should be fetched (0-59). Read-only.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "password": {
+ "description": "An optional password for fetch_url.",
+ "type": "string"
+ },
+ "paused": {
+ "description": "Whether the scheduled fetch is paused or not.",
+ "type": "boolean"
+ },
+ "timeZone": {
+ "description": "Time zone used for schedule. UTC by default. E.g., \"America/Los_Angeles\".",
+ "type": "string"
+ },
+ "username": {
+ "description": "An optional user name for fetch_url.",
+ "type": "string"
+ },
+ "weekday": {
+ "description": "The day of the week the feed file should be fetched.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedFormat": {
+ "id": "DatafeedFormat",
+ "properties": {
+ "columnDelimiter": {
+ "description": "Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds.",
+ "type": "string"
+ },
+ "fileEncoding": {
+ "description": "Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected.",
+ "type": "string"
+ },
+ "quotingMode": {
+ "description": "Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedStatus": {
+ "description": "The status of a datafeed, i.e., the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.",
+ "id": "DatafeedStatus",
+ "properties": {
+ "country": {
+ "description": "The country for which the status is reported, represented as a CLDR territory code.",
+ "type": "string"
+ },
+ "datafeedId": {
+ "description": "The ID of the feed for which the status is reported.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "errors": {
+ "description": "The list of errors occurring in the feed.",
+ "items": {
+ "$ref": "DatafeedStatusError"
+ },
+ "type": "array"
+ },
+ "itemsTotal": {
+ "description": "The number of items in the feed that were processed.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "itemsValid": {
+ "description": "The number of items in the feed that were valid.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#datafeedStatus",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeedStatus\".",
+ "type": "string"
+ },
+ "language": {
+ "description": "The two-letter ISO 639-1 language for which the status is reported.",
+ "type": "string"
+ },
+ "lastUploadDate": {
+ "description": "The last date at which the feed was uploaded.",
+ "type": "string"
+ },
+ "processingStatus": {
+ "description": "The processing status of the feed.",
+ "type": "string"
+ },
+ "warnings": {
+ "description": "The list of errors occurring in the feed.",
+ "items": {
+ "$ref": "DatafeedStatusError"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedStatusError": {
+ "description": "An error occurring in the feed, like \"invalid price\".",
+ "id": "DatafeedStatusError",
+ "properties": {
+ "code": {
+ "description": "The code of the error, e.g., \"validation/invalid_value\".",
+ "type": "string"
+ },
+ "count": {
+ "description": "The number of occurrences of the error in the feed.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "examples": {
+ "description": "A list of example occurrences of the error, grouped by product.",
+ "items": {
+ "$ref": "DatafeedStatusExample"
+ },
+ "type": "array"
+ },
+ "message": {
+ "description": "The error message, e.g., \"Invalid price\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedStatusExample": {
+ "description": "An example occurrence for a particular error.",
+ "id": "DatafeedStatusExample",
+ "properties": {
+ "itemId": {
+ "description": "The ID of the example item.",
+ "type": "string"
+ },
+ "lineNumber": {
+ "description": "Line number in the data feed where the example is found.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "value": {
+ "description": "The problematic value.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedTarget": {
+ "id": "DatafeedTarget",
+ "properties": {
+ "country": {
+ "description": "The country where the items in the feed will be included in the search index, represented as a CLDR territory code.",
+ "type": "string"
+ },
+ "excludedDestinations": {
+ "description": "The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "includedDestinations": {
+ "description": "The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in the excluded_destination field.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "language": {
+ "description": "The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targets[].country.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedsCustomBatchRequest": {
+ "id": "DatafeedsCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "DatafeedsCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedsCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch datafeeds request.",
+ "id": "DatafeedsCustomBatchRequestEntry",
+ "properties": {
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "datafeed": {
+ "$ref": "Datafeed",
+ "description": "The data feed to insert."
+ },
+ "datafeedId": {
+ "description": "The ID of the data feed to get, delete or fetch.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedsCustomBatchResponse": {
+ "id": "DatafeedsCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "DatafeedsCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#datafeedsCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeedsCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedsCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch datafeeds response.",
+ "id": "DatafeedsCustomBatchResponseEntry",
+ "properties": {
+ "batchId": {
+ "description": "The ID of the request entry this entry responds to.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "datafeed": {
+ "$ref": "Datafeed",
+ "description": "The requested data feed. Defined if and only if the request was successful."
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if and only if the request failed."
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedsFetchNowResponse": {
+ "id": "DatafeedsFetchNowResponse",
+ "properties": {
+ "kind": {
+ "default": "content#datafeedsFetchNowResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeedsFetchNowResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedsListResponse": {
+ "id": "DatafeedsListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#datafeedsListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeedsListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of datafeeds.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "Datafeed"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedstatusesCustomBatchRequest": {
+ "id": "DatafeedstatusesCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "DatafeedstatusesCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedstatusesCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch datafeedstatuses request.",
+ "id": "DatafeedstatusesCustomBatchRequestEntry",
+ "properties": {
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "country": {
+ "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that for multi-target datafeeds this parameter is required.",
+ "type": "string"
+ },
+ "datafeedId": {
+ "description": "The ID of the data feed to get.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "language": {
+ "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that for multi-target datafeeds this parameter is required.",
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedstatusesCustomBatchResponse": {
+ "id": "DatafeedstatusesCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "DatafeedstatusesCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#datafeedstatusesCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeedstatusesCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedstatusesCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch datafeedstatuses response.",
+ "id": "DatafeedstatusesCustomBatchResponseEntry",
+ "properties": {
+ "batchId": {
+ "description": "The ID of the request entry this entry responds to.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "datafeedStatus": {
+ "$ref": "DatafeedStatus",
+ "description": "The requested data feed status. Defined if and only if the request was successful."
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if and only if the request failed."
+ }
+ },
+ "type": "object"
+ },
+ "DatafeedstatusesListResponse": {
+ "id": "DatafeedstatusesListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#datafeedstatusesListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeedstatusesListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of datafeed statuses.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "DatafeedStatus"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DeliveryTime": {
+ "id": "DeliveryTime",
+ "properties": {
+ "cutoffTime": {
+ "$ref": "CutoffTime",
+ "description": "Business days cutoff time definition. If not configured the cutoff time will be defaulted to 8AM PST."
+ },
+ "holidayCutoffs": {
+ "description": "Holiday cutoff definitions. If configured, they specify order cutoff times for holiday-specific shipping.",
+ "items": {
+ "$ref": "HolidayCutoff"
+ },
+ "type": "array"
+ },
+ "maxHandlingTimeInDays": {
+ "description": "Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to minHandlingTimeInDays.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "maxTransitTimeInDays": {
+ "description": "Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "minHandlingTimeInDays": {
+ "description": "Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "minTransitTimeInDays": {
+ "description": "Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required.",
+ "format": "uint32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "Error": {
+ "description": "An error returned by the API.",
+ "id": "Error",
+ "properties": {
+ "domain": {
+ "description": "The domain of the error.",
+ "type": "string"
+ },
+ "message": {
+ "description": "A description of the error.",
+ "type": "string"
+ },
+ "reason": {
+ "description": "The error code.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Errors": {
+ "description": "A list of errors returned by a failed batch entry.",
+ "id": "Errors",
+ "properties": {
+ "code": {
+ "description": "The HTTP status of the first error in errors.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "description": "A list of errors.",
+ "items": {
+ "$ref": "Error"
+ },
+ "type": "array"
+ },
+ "message": {
+ "description": "The message of the first error in errors.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GmbAccounts": {
+ "id": "GmbAccounts",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "gmbAccounts": {
+ "description": "A list of GMB accounts which are available to the merchant.",
+ "items": {
+ "$ref": "GmbAccountsGmbAccount"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "GmbAccountsGmbAccount": {
+ "id": "GmbAccountsGmbAccount",
+ "properties": {
+ "email": {
+ "description": "The email which identifies the GMB account.",
+ "type": "string"
+ },
+ "listingCount": {
+ "description": "Number of listings under this account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the GMB account.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of the GMB account (User or Business).",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Headers": {
+ "description": "A non-empty list of row or column headers for a table. Exactly one of prices, weights, numItems, postalCodeGroupNames, or locations must be set.",
+ "id": "Headers",
+ "properties": {
+ "locations": {
+ "description": "A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.",
+ "items": {
+ "$ref": "LocationIdSet"
+ },
+ "type": "array"
+ },
+ "numberOfItems": {
+ "description": "A list of inclusive number of items upper bounds. The last value can be \"infinity\". For example [\"10\", \"50\", \"infinity\"] represents the headers \"\u003c= 10 items\", \" 50 items\". Must be non-empty. Can only be set if all other fields are not set.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "postalCodeGroupNames": {
+ "description": "A list of postal group names. The last value can be \"all other locations\". Example: [\"zone 1\", \"zone 2\", \"all other locations\"]. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "prices": {
+ "description": "A list of inclusive order price upper bounds. The last price's value can be \"infinity\". For example [{\"value\": \"10\", \"currency\": \"USD\"}, {\"value\": \"500\", \"currency\": \"USD\"}, {\"value\": \"infinity\", \"currency\": \"USD\"}] represents the headers \"\u003c= $10\", \" $500\". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.",
+ "items": {
+ "$ref": "Price"
+ },
+ "type": "array"
+ },
+ "weights": {
+ "description": "A list of inclusive order weight upper bounds. The last weight's value can be \"infinity\". For example [{\"value\": \"10\", \"unit\": \"kg\"}, {\"value\": \"50\", \"unit\": \"kg\"}, {\"value\": \"infinity\", \"unit\": \"kg\"}] represents the headers \"\u003c= 10kg\", \" 50kg\". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.",
+ "items": {
+ "$ref": "Weight"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "HolidayCutoff": {
+ "id": "HolidayCutoff",
+ "properties": {
+ "deadlineDate": {
+ "description": "Date of the order deadline, in ISO 8601 format. E.g. \"2016-11-29\" for 29th November 2016. Required.",
+ "type": "string"
+ },
+ "deadlineHour": {
+ "description": "Hour of the day on the deadline date until which the order has to be placed to qualify for the delivery guarantee. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Required.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "deadlineTimezone": {
+ "description": "Timezone identifier for the deadline hour. A list of identifiers can be found in the AdWords API documentation. E.g. \"Europe/Zurich\". Required.",
+ "type": "string"
+ },
+ "holidayId": {
+ "description": "Unique identifier for the holiday. Required.",
+ "type": "string"
+ },
+ "visibleFromDate": {
+ "description": "Date on which the deadline will become visible to consumers in ISO 8601 format. E.g. \"2016-10-31\" for 31st October 2016. Required.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "HolidaysHoliday": {
+ "id": "HolidaysHoliday",
+ "properties": {
+ "countryCode": {
+ "description": "The CLDR territory code of the country in which the holiday is available. E.g. \"US\", \"DE\", \"GB\". A holiday cutoff can only be configured in a shipping settings service with matching delivery country. Always present.",
+ "type": "string"
+ },
+ "date": {
+ "description": "Date of the holiday, in ISO 8601 format. E.g. \"2016-12-25\" for Christmas 2016. Always present.",
+ "type": "string"
+ },
+ "deliveryGuaranteeDate": {
+ "description": "Date on which the order has to arrive at the customer's, in ISO 8601 format. E.g. \"2016-12-24\" for 24th December 2016. Always present.",
+ "type": "string"
+ },
+ "deliveryGuaranteeHour": {
+ "description": "Hour of the day in the delivery location's timezone on the guaranteed delivery date by which the order has to arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always present.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the holiday to be used when configuring holiday cutoffs. Always present.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The holiday type. Always present.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Installment": {
+ "id": "Installment",
+ "properties": {
+ "amount": {
+ "$ref": "Price",
+ "description": "The amount the buyer has to pay per month."
+ },
+ "months": {
+ "description": "The number of installments the buyer has to pay.",
+ "format": "int64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "InvoiceSummary": {
+ "id": "InvoiceSummary",
+ "properties": {
+ "additionalChargeSummaries": {
+ "description": "Summary of the total amounts of the additional charges.",
+ "items": {
+ "$ref": "InvoiceSummaryAdditionalChargeSummary"
+ },
+ "type": "array"
+ },
+ "customerBalance": {
+ "$ref": "Amount",
+ "description": "[required] Customer balance on this invoice. A negative amount means the customer is paying, a positive one means the customer is receiving money. Note: the sum of merchant_balance, customer_balance and google_balance must always be zero.\n\nFurthermore the absolute value of this amount is expected to be equal to the sum of product amount and additional charges, minus promotions."
+ },
+ "googleBalance": {
+ "$ref": "Amount",
+ "description": "[required] Google balance on this invoice. A negative amount means Google is paying, a positive one means Google is receiving money. Note: the sum of merchant_balance, customer_balance and google_balance must always be zero."
+ },
+ "merchantBalance": {
+ "$ref": "Amount",
+ "description": "[required] Merchant balance on this invoice. A negative amount means the merchant is paying, a positive one means the merchant is receiving money. Note: the sum of merchant_balance, customer_balance and google_balance must always be zero."
+ },
+ "productTotal": {
+ "$ref": "Amount",
+ "description": "[required] Total price for the product."
+ },
+ "promotionSummaries": {
+ "description": "Summary for each promotion.",
+ "items": {
+ "$ref": "Promotion"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "InvoiceSummaryAdditionalChargeSummary": {
+ "id": "InvoiceSummaryAdditionalChargeSummary",
+ "properties": {
+ "totalAmount": {
+ "$ref": "Amount",
+ "description": "[required] Total additional charge for this type."
+ },
+ "type": {
+ "description": "[required] Type of the additional charge.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiaAboutPageSettings": {
+ "id": "LiaAboutPageSettings",
+ "properties": {
+ "status": {
+ "description": "The status of the verification process for the About page.",
+ "type": "string"
+ },
+ "url": {
+ "description": "The URL for the About page.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiaCountrySettings": {
+ "id": "LiaCountrySettings",
+ "properties": {
+ "about": {
+ "$ref": "LiaAboutPageSettings",
+ "description": "The settings for the About page."
+ },
+ "country": {
+ "annotations": {
+ "required": [
+ "content.liasettings.update"
+ ]
+ },
+ "description": "CLDR country code (e.g. \"US\").",
+ "type": "string"
+ },
+ "hostedLocalStorefrontActive": {
+ "description": "The status of the \"Merchant hosted local storefront\" feature.",
+ "type": "boolean"
+ },
+ "inventory": {
+ "$ref": "LiaInventorySettings",
+ "description": "LIA inventory verification settings."
+ },
+ "onDisplayToOrder": {
+ "$ref": "LiaOnDisplayToOrderSettings",
+ "description": "LIA \"On Display To Order\" settings."
+ },
+ "posDataProvider": {
+ "$ref": "LiaPosDataProvider",
+ "description": "The POS data provider linked with this country."
+ },
+ "storePickupActive": {
+ "description": "The status of the \"Store pickup\" feature.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "LiaInventorySettings": {
+ "id": "LiaInventorySettings",
+ "properties": {
+ "inventoryVerificationContactEmail": {
+ "description": "The email of the contact for the inventory verification process.",
+ "type": "string"
+ },
+ "inventoryVerificationContactName": {
+ "description": "The name of the contact for the inventory verification process.",
+ "type": "string"
+ },
+ "inventoryVerificationContactStatus": {
+ "description": "The status of the verification contact.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the inventory verification process.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiaOnDisplayToOrderSettings": {
+ "id": "LiaOnDisplayToOrderSettings",
+ "properties": {
+ "shippingCostPolicyUrl": {
+ "description": "Shipping cost and policy URL.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the ?On display to order? feature.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiaPosDataProvider": {
+ "id": "LiaPosDataProvider",
+ "properties": {
+ "posDataProviderId": {
+ "description": "The ID of the POS data provider.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "posExternalAccountId": {
+ "description": "The account ID by which this merchant is known to the POS data provider.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiaSettings": {
+ "description": "Local Inventory ads (LIA) settings. All methods except listposdataproviders require the admin role.",
+ "id": "LiaSettings",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account to which these LIA settings belong. Ignored upon update, always present in get request responses.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "countrySettings": {
+ "description": "The LIA settings for each country.",
+ "items": {
+ "$ref": "LiaCountrySettings"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#liaSettings",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liaSettings\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsCustomBatchRequest": {
+ "id": "LiasettingsCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "LiasettingsCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsCustomBatchRequestEntry": {
+ "id": "LiasettingsCustomBatchRequestEntry",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account for which to get/update account shipping settings.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "contactEmail": {
+ "description": "Inventory validation contact email. Required only for SetInventoryValidationContact.",
+ "type": "string"
+ },
+ "contactName": {
+ "description": "Inventory validation contact name. Required only for SetInventoryValidationContact.",
+ "type": "string"
+ },
+ "country": {
+ "description": "The country code. Required only for RequestInventoryVerification.",
+ "type": "string"
+ },
+ "gmbEmail": {
+ "description": "The GMB account. Required only for RequestGmbAccess.",
+ "type": "string"
+ },
+ "liaSettings": {
+ "$ref": "LiaSettings",
+ "description": "The account Lia settings to update. Only defined if the method is update."
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ },
+ "posDataProviderId": {
+ "description": "The ID of POS data provider. Required only for SetPosProvider.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "posExternalAccountId": {
+ "description": "The account ID by which this merchant is known to the POS provider.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsCustomBatchResponse": {
+ "id": "LiasettingsCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "LiasettingsCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#liasettingsCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsCustomBatchResponseEntry": {
+ "id": "LiasettingsCustomBatchResponseEntry",
+ "properties": {
+ "batchId": {
+ "description": "The ID of the request entry to which this entry responds.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if, and only if, the request failed."
+ },
+ "gmbAccounts": {
+ "$ref": "GmbAccounts",
+ "description": "The the list of accessible GMB accounts."
+ },
+ "kind": {
+ "default": "content#liasettingsCustomBatchResponseEntry",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsCustomBatchResponseEntry\".",
+ "type": "string"
+ },
+ "liaSettings": {
+ "$ref": "LiaSettings",
+ "description": "The retrieved or updated Lia settings."
+ },
+ "posDataProviders": {
+ "description": "The list of POS data providers.",
+ "items": {
+ "$ref": "PosDataProviders"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsGetAccessibleGmbAccountsResponse": {
+ "id": "LiasettingsGetAccessibleGmbAccountsResponse",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "gmbAccounts": {
+ "description": "A list of GMB accounts which are available to the merchant.",
+ "items": {
+ "$ref": "GmbAccountsGmbAccount"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#liasettingsGetAccessibleGmbAccountsResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsGetAccessibleGmbAccountsResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsListPosDataProvidersResponse": {
+ "id": "LiasettingsListPosDataProvidersResponse",
+ "properties": {
+ "kind": {
+ "default": "content#liasettingsListPosDataProvidersResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsListPosDataProvidersResponse\".",
+ "type": "string"
+ },
+ "posDataProviders": {
+ "description": "The list of POS data providers for each eligible country",
+ "items": {
+ "$ref": "PosDataProviders"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsListResponse": {
+ "id": "LiasettingsListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#liasettingsListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of LIA settings.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "LiaSettings"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsRequestGmbAccessResponse": {
+ "id": "LiasettingsRequestGmbAccessResponse",
+ "properties": {
+ "kind": {
+ "default": "content#liasettingsRequestGmbAccessResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsRequestGmbAccessResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsRequestInventoryVerificationResponse": {
+ "id": "LiasettingsRequestInventoryVerificationResponse",
+ "properties": {
+ "kind": {
+ "default": "content#liasettingsRequestInventoryVerificationResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsRequestInventoryVerificationResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsSetInventoryVerificationContactResponse": {
+ "id": "LiasettingsSetInventoryVerificationContactResponse",
+ "properties": {
+ "kind": {
+ "default": "content#liasettingsSetInventoryVerificationContactResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsSetInventoryVerificationContactResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LiasettingsSetPosDataProviderResponse": {
+ "id": "LiasettingsSetPosDataProviderResponse",
+ "properties": {
+ "kind": {
+ "default": "content#liasettingsSetPosDataProviderResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#liasettingsSetPosDataProviderResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "LocationIdSet": {
+ "id": "LocationIdSet",
+ "properties": {
+ "locationIds": {
+ "description": "A non-empty list of location IDs. They must all be of the same location type (e.g., state).",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "LoyaltyPoints": {
+ "id": "LoyaltyPoints",
+ "properties": {
+ "name": {
+ "description": "Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.",
+ "type": "string"
+ },
+ "pointsValue": {
+ "description": "The retailer's loyalty points in absolute value.",
+ "format": "int64",
+ "type": "string"
+ },
+ "ratio": {
+ "description": "The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "MerchantOrderReturn": {
+ "id": "MerchantOrderReturn",
+ "properties": {
+ "creationDate": {
+ "type": "string"
+ },
+ "merchantOrderId": {
+ "type": "string"
+ },
+ "orderId": {
+ "type": "string"
+ },
+ "orderReturnId": {
+ "type": "string"
+ },
+ "returnItems": {
+ "items": {
+ "$ref": "MerchantOrderReturnItem"
+ },
+ "type": "array"
+ },
+ "returnShipments": {
+ "items": {
+ "$ref": "ReturnShipment"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "MerchantOrderReturnItem": {
+ "id": "MerchantOrderReturnItem",
+ "properties": {
+ "customerReturnReason": {
+ "$ref": "CustomerReturnReason"
+ },
+ "itemId": {
+ "type": "string"
+ },
+ "merchantReturnReason": {
+ "$ref": "RefundReason"
+ },
+ "product": {
+ "$ref": "OrderLineItemProduct"
+ },
+ "returnShipmentIds": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "state": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Order": {
+ "description": "Order. All methods require the order manager role.",
+ "id": "Order",
+ "properties": {
+ "acknowledged": {
+ "description": "Whether the order was acknowledged.",
+ "type": "boolean"
+ },
+ "billingAddress": {
+ "$ref": "OrderAddress",
+ "description": "The billing address."
+ },
+ "channelType": {
+ "description": "The channel type of the order: \"purchaseOnGoogle\" or \"googleExpress\".",
+ "type": "string"
+ },
+ "customer": {
+ "$ref": "OrderCustomer",
+ "description": "The details of the customer who placed the order."
+ },
+ "deliveryDetails": {
+ "$ref": "OrderDeliveryDetails",
+ "description": "The details for the delivery."
+ },
+ "id": {
+ "description": "The REST id of the order. Globally unique.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#order",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#order\".",
+ "type": "string"
+ },
+ "lineItems": {
+ "description": "Line items that are ordered.",
+ "items": {
+ "$ref": "OrderLineItem"
+ },
+ "type": "array"
+ },
+ "merchantId": {
+ "format": "uint64",
+ "type": "string"
+ },
+ "merchantOrderId": {
+ "description": "Merchant-provided id of the order.",
+ "type": "string"
+ },
+ "netAmount": {
+ "$ref": "Price",
+ "description": "The net amount for the order. For example, if an order was originally for a grand total of $100 and a refund was issued for $20, the net amount will be $80."
+ },
+ "paymentStatus": {
+ "description": "The status of the payment.",
+ "type": "string"
+ },
+ "placedDate": {
+ "description": "The date when the order was placed, in ISO 8601 format.",
+ "type": "string"
+ },
+ "promotions": {
+ "description": "Promotions associated with the order.",
+ "items": {
+ "$ref": "OrderPromotion"
+ },
+ "type": "array"
+ },
+ "refunds": {
+ "description": "Refunds for the order.",
+ "items": {
+ "$ref": "OrderRefund"
+ },
+ "type": "array"
+ },
+ "shipments": {
+ "description": "Shipments of the order.",
+ "items": {
+ "$ref": "OrderShipment"
+ },
+ "type": "array"
+ },
+ "shippingCost": {
+ "$ref": "Price",
+ "description": "The total cost of shipping for all items."
+ },
+ "shippingCostTax": {
+ "$ref": "Price",
+ "description": "The tax for the total shipping cost."
+ },
+ "shippingOption": {
+ "description": "The requested shipping option.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the order.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderAddress": {
+ "id": "OrderAddress",
+ "properties": {
+ "country": {
+ "description": "CLDR country code (e.g. \"US\").",
+ "type": "string"
+ },
+ "fullAddress": {
+ "description": "Strings representing the lines of the printed label for mailing the order, for example:\nJohn Smith\n1600 Amphitheatre Parkway\nMountain View, CA, 94043\nUnited States",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "isPostOfficeBox": {
+ "description": "Whether the address is a post office box.",
+ "type": "boolean"
+ },
+ "locality": {
+ "description": "City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs).",
+ "type": "string"
+ },
+ "postalCode": {
+ "description": "Postal Code or ZIP (e.g. \"94043\").",
+ "type": "string"
+ },
+ "recipientName": {
+ "description": "Name of the recipient.",
+ "type": "string"
+ },
+ "region": {
+ "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").",
+ "type": "string"
+ },
+ "streetAddress": {
+ "description": "Street-level part of the address.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrderCancellation": {
+ "id": "OrderCancellation",
+ "properties": {
+ "actor": {
+ "description": "The actor that created the cancellation.",
+ "type": "string"
+ },
+ "creationDate": {
+ "description": "Date on which the cancellation has been created, in ISO 8601 format.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity that was canceled.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "reason": {
+ "description": "The reason for the cancellation. Orders that are cancelled with a noInventory reason will lead to the removal of the product from Shopping Actions until you make an update to that product. This will not affect your Shopping ads.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderCustomer": {
+ "id": "OrderCustomer",
+ "properties": {
+ "email": {
+ "description": "Deprecated.",
+ "type": "string"
+ },
+ "fullName": {
+ "description": "Full name of the customer.",
+ "type": "string"
+ },
+ "marketingRightsInfo": {
+ "$ref": "OrderCustomerMarketingRightsInfo",
+ "description": "Customer's marketing preferences."
+ }
+ },
+ "type": "object"
+ },
+ "OrderCustomerMarketingRightsInfo": {
+ "id": "OrderCustomerMarketingRightsInfo",
+ "properties": {
+ "explicitMarketingPreference": {
+ "description": "Last known user selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty.",
+ "type": "string"
+ },
+ "lastUpdatedTimestamp": {
+ "description": "Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet.",
+ "type": "string"
+ },
+ "marketingEmailAddress": {
+ "description": "Email address that can be used for marketing purposes. This field is only filled when explicitMarketingPreference is equal to 'granted'.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderDeliveryDetails": {
+ "id": "OrderDeliveryDetails",
+ "properties": {
+ "address": {
+ "$ref": "OrderAddress",
+ "description": "The delivery address"
+ },
+ "phoneNumber": {
+ "description": "The phone number of the person receiving the delivery.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderLineItem": {
+ "id": "OrderLineItem",
+ "properties": {
+ "annotations": {
+ "description": "Annotations that are attached to the line item.",
+ "items": {
+ "$ref": "OrderMerchantProvidedAnnotation"
+ },
+ "type": "array"
+ },
+ "cancellations": {
+ "description": "Cancellations of the line item.",
+ "items": {
+ "$ref": "OrderCancellation"
+ },
+ "type": "array"
+ },
+ "id": {
+ "description": "The id of the line item.",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "description": "Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20."
+ },
+ "product": {
+ "$ref": "OrderLineItemProduct",
+ "description": "Product data as seen by customer from the time of the order placement. Note that certain attributes values (e.g. title or gtin) might be reformatted and no longer match values submitted via product feed."
+ },
+ "quantityCanceled": {
+ "description": "Number of items canceled.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "quantityDelivered": {
+ "description": "Number of items delivered.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "quantityOrdered": {
+ "description": "Number of items ordered.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "quantityPending": {
+ "description": "Number of items pending.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "quantityReturned": {
+ "description": "Number of items returned.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "quantityShipped": {
+ "description": "Number of items shipped.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "returnInfo": {
+ "$ref": "OrderLineItemReturnInfo",
+ "description": "Details of the return policy for the line item."
+ },
+ "returns": {
+ "description": "Returns of the line item.",
+ "items": {
+ "$ref": "OrderReturn"
+ },
+ "type": "array"
+ },
+ "shippingDetails": {
+ "$ref": "OrderLineItemShippingDetails",
+ "description": "Details of the requested shipping for the line item."
+ },
+ "tax": {
+ "$ref": "Price",
+ "description": "Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4."
+ }
+ },
+ "type": "object"
+ },
+ "OrderLineItemProduct": {
+ "id": "OrderLineItemProduct",
+ "properties": {
+ "brand": {
+ "description": "Brand of the item.",
+ "type": "string"
+ },
+ "channel": {
+ "description": "The item's channel (online or local).",
+ "type": "string"
+ },
+ "condition": {
+ "description": "Condition or state of the item.",
+ "type": "string"
+ },
+ "contentLanguage": {
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "fees": {
+ "description": "Associated fees at order creation time.",
+ "items": {
+ "$ref": "OrderLineItemProductFee"
+ },
+ "type": "array"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number (GTIN) of the item.",
+ "type": "string"
+ },
+ "id": {
+ "description": "The REST id of the product.",
+ "type": "string"
+ },
+ "imageLink": {
+ "description": "URL of an image of the item.",
+ "type": "string"
+ },
+ "itemGroupId": {
+ "description": "Shared identifier for all variants of the same product.",
+ "type": "string"
+ },
+ "mpn": {
+ "description": "Manufacturer Part Number (MPN) of the item.",
+ "type": "string"
+ },
+ "offerId": {
+ "description": "An identifier of the item.",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "description": "Price of the item."
+ },
+ "shownImage": {
+ "description": "URL to the cached image shown to the user when order was placed.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "description": "The CLDR territory code of the target country of the product.",
+ "type": "string"
+ },
+ "title": {
+ "description": "The title of the product.",
+ "type": "string"
+ },
+ "variantAttributes": {
+ "description": "Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here.",
+ "items": {
+ "$ref": "OrderLineItemProductVariantAttribute"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrderLineItemProductFee": {
+ "id": "OrderLineItemProductFee",
+ "properties": {
+ "amount": {
+ "$ref": "Price",
+ "description": "Amount of the fee."
+ },
+ "name": {
+ "description": "Name of the fee.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderLineItemProductVariantAttribute": {
+ "id": "OrderLineItemProductVariantAttribute",
+ "properties": {
+ "dimension": {
+ "description": "The dimension of the variant.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value for the dimension.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderLineItemReturnInfo": {
+ "id": "OrderLineItemReturnInfo",
+ "properties": {
+ "daysToReturn": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "How many days later the item can be returned.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "isReturnable": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Whether the item is returnable.",
+ "type": "boolean"
+ },
+ "policyUrl": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "URL of the item return policy.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderLineItemShippingDetails": {
+ "id": "OrderLineItemShippingDetails",
+ "properties": {
+ "deliverByDate": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The delivery by date, in ISO 8601 format.",
+ "type": "string"
+ },
+ "method": {
+ "$ref": "OrderLineItemShippingDetailsMethod",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Details of the shipping method."
+ },
+ "shipByDate": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The ship by date, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderLineItemShippingDetailsMethod": {
+ "id": "OrderLineItemShippingDetailsMethod",
+ "properties": {
+ "carrier": {
+ "description": "The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values.",
+ "type": "string"
+ },
+ "maxDaysInTransit": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Maximum transit time.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "methodName": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The name of the shipping method.",
+ "type": "string"
+ },
+ "minDaysInTransit": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Minimum transit time.",
+ "format": "uint32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "OrderMerchantProvidedAnnotation": {
+ "id": "OrderMerchantProvidedAnnotation",
+ "properties": {
+ "key": {
+ "description": "Key for additional merchant provided (as key-value pairs) annotation about the line item.",
+ "type": "string"
+ },
+ "value": {
+ "description": "Value for additional merchant provided (as key-value pairs) annotation about the line item.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderPromotion": {
+ "id": "OrderPromotion",
+ "properties": {
+ "applicableItems": {
+ "description": "Items which this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity.",
+ "items": {
+ "$ref": "OrderPromotionItem"
+ },
+ "type": "array"
+ },
+ "appliedItems": {
+ "description": "Items which this promotion have been applied to.",
+ "items": {
+ "$ref": "OrderPromotionItem"
+ },
+ "type": "array"
+ },
+ "funder": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The party funding the promotion.",
+ "type": "string"
+ },
+ "merchantPromotionId": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "This field is used to identify promotions within merchants' own systems.",
+ "type": "string"
+ },
+ "pretaxValue": {
+ "$ref": "Price",
+ "description": "Estimated discount applied to pre-tax amount."
+ },
+ "shortTitle": {
+ "description": "A short title of the promotion to be shown on the checkout page.",
+ "type": "string"
+ },
+ "subtype": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The category of the promotion.",
+ "type": "string"
+ },
+ "taxValue": {
+ "$ref": "Price",
+ "description": "Estimated discount applied to tax (if allowed by law)."
+ },
+ "title": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The title of the promotion.",
+ "type": "string"
+ },
+ "type": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The scope of the promotion.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderPromotionItem": {
+ "id": "OrderPromotionItem",
+ "properties": {
+ "lineItemId": {
+ "type": "string"
+ },
+ "productId": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity of the associated product.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "OrderRefund": {
+ "id": "OrderRefund",
+ "properties": {
+ "actor": {
+ "description": "The actor that created the refund.",
+ "type": "string"
+ },
+ "amount": {
+ "$ref": "Price",
+ "description": "The amount that is refunded."
+ },
+ "creationDate": {
+ "description": "Date on which the item has been created, in ISO 8601 format.",
+ "type": "string"
+ },
+ "reason": {
+ "description": "The reason for the refund.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderReportDisbursement": {
+ "description": "Order disbursement. All methods require the payment analyst role.",
+ "id": "OrderReportDisbursement",
+ "properties": {
+ "disbursementAmount": {
+ "$ref": "Price",
+ "description": "The disbursement amount."
+ },
+ "disbursementCreationDate": {
+ "description": "The disbursement date, in ISO 8601 format.",
+ "type": "string"
+ },
+ "disbursementDate": {
+ "description": "The date the disbursement was initiated, in ISO 8601 format.",
+ "type": "string"
+ },
+ "disbursementId": {
+ "description": "The ID of the disbursement.",
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderReportTransaction": {
+ "id": "OrderReportTransaction",
+ "properties": {
+ "disbursementAmount": {
+ "$ref": "Price",
+ "description": "The disbursement amount."
+ },
+ "disbursementCreationDate": {
+ "description": "The date the disbursement was created, in ISO 8601 format.",
+ "type": "string"
+ },
+ "disbursementDate": {
+ "description": "The date the disbursement was initiated, in ISO 8601 format.",
+ "type": "string"
+ },
+ "disbursementId": {
+ "description": "The ID of the disbursement.",
+ "type": "string"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "merchantOrderId": {
+ "description": "Merchant-provided id of the order.",
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The id of the order.",
+ "type": "string"
+ },
+ "productAmount": {
+ "$ref": "Amount",
+ "description": "Total amount for the items."
+ },
+ "transactionDate": {
+ "description": "The date of the transaction, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderReturn": {
+ "id": "OrderReturn",
+ "properties": {
+ "actor": {
+ "description": "The actor that created the refund.",
+ "type": "string"
+ },
+ "creationDate": {
+ "description": "Date on which the item has been created, in ISO 8601 format.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "Quantity that is returned.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "reason": {
+ "description": "The reason for the return.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderShipment": {
+ "id": "OrderShipment",
+ "properties": {
+ "carrier": {
+ "description": "The carrier handling the shipment.\n\nAcceptable values for US are: \n- \"gsx\" \n- \"ups\" \n- \"usps\" \n- \"fedex\" \n- \"dhl\" \n- \"ecourier\" \n- \"cxt\" \n- \"google\" \n- \"ontrac\" \n- \"emsy\" \n- \"ont\" \n- \"deliv\" \n- \"dynamex\" \n- \"lasership\" \n- \"mpx\" \n- \"uds\" \n\nAcceptable values for FR are: \n- \"colissimo\" \n- \"chronopost\"",
+ "type": "string"
+ },
+ "creationDate": {
+ "description": "Date on which the shipment has been created, in ISO 8601 format.",
+ "type": "string"
+ },
+ "deliveryDate": {
+ "description": "Date on which the shipment has been delivered, in ISO 8601 format. Present only if status is delivered",
+ "type": "string"
+ },
+ "id": {
+ "description": "The id of the shipment.",
+ "type": "string"
+ },
+ "lineItems": {
+ "description": "The line items that are shipped.",
+ "items": {
+ "$ref": "OrderShipmentLineItemShipment"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of the shipment.",
+ "type": "string"
+ },
+ "trackingId": {
+ "description": "The tracking id for the shipment.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderShipmentLineItemShipment": {
+ "id": "OrderShipmentLineItemShipment",
+ "properties": {
+ "lineItemId": {
+ "description": "The id of the line item that is shipped. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "productId": {
+ "description": "The ID of the product to ship. This is the REST ID used in the products service. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity that is shipped.",
+ "format": "uint32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "OrderinvoicesCreateChargeInvoiceRequest": {
+ "id": "OrderinvoicesCreateChargeInvoiceRequest",
+ "properties": {
+ "invoiceId": {
+ "description": "[required] The ID of the invoice.",
+ "type": "string"
+ },
+ "invoiceSummary": {
+ "$ref": "InvoiceSummary",
+ "description": "[required] Invoice summary."
+ },
+ "lineItemInvoices": {
+ "description": "[required] Invoice details per line item.",
+ "items": {
+ "$ref": "ShipmentInvoiceLineItemInvoice"
+ },
+ "type": "array"
+ },
+ "operationId": {
+ "description": "[required] The ID of the operation, unique across all operations for a given order.",
+ "type": "string"
+ },
+ "shipmentGroupId": {
+ "description": "[required] ID of the shipment group.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderinvoicesCreateChargeInvoiceResponse": {
+ "id": "OrderinvoicesCreateChargeInvoiceResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#orderinvoicesCreateChargeInvoiceResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderinvoicesCreateChargeInvoiceResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderinvoicesCreateRefundInvoiceRequest": {
+ "id": "OrderinvoicesCreateRefundInvoiceRequest",
+ "properties": {
+ "invoiceId": {
+ "description": "[required] The ID of the invoice.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "[required] The ID of the operation, unique across all operations for a given order.",
+ "type": "string"
+ },
+ "refundOnlyOption": {
+ "$ref": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption",
+ "description": "Option to create a refund-only invoice. Exactly one of refundOnlyOption or returnOption must be provided."
+ },
+ "returnOption": {
+ "$ref": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption",
+ "description": "Option to create an invoice for a refund and mark all items within the invoice as returned. Exactly one of refundOnlyOption or returnOption must be provided."
+ },
+ "shipmentInvoices": {
+ "description": "Invoice details for different shipment groups.",
+ "items": {
+ "$ref": "ShipmentInvoice"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrderinvoicesCreateRefundInvoiceResponse": {
+ "id": "OrderinvoicesCreateRefundInvoiceResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#orderinvoicesCreateRefundInvoiceResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderinvoicesCreateRefundInvoiceResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption": {
+ "id": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption",
+ "properties": {
+ "description": {
+ "description": "Optional description of the refund reason.",
+ "type": "string"
+ },
+ "reason": {
+ "description": "[required] Reason for the refund.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption": {
+ "id": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption",
+ "properties": {
+ "description": {
+ "description": "Optional description of the return reason.",
+ "type": "string"
+ },
+ "reason": {
+ "description": "[required] Reason for the return.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyAuthApprovedRequest": {
+ "id": "OrderpaymentsNotifyAuthApprovedRequest",
+ "properties": {
+ "authAmountPretax": {
+ "$ref": "Price"
+ },
+ "authAmountTax": {
+ "$ref": "Price"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyAuthApprovedResponse": {
+ "id": "OrderpaymentsNotifyAuthApprovedResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#orderpaymentsNotifyAuthApprovedResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderpaymentsNotifyAuthApprovedResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyAuthDeclinedRequest": {
+ "id": "OrderpaymentsNotifyAuthDeclinedRequest",
+ "properties": {
+ "declineReason": {
+ "description": "Reason why payment authorization was declined.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyAuthDeclinedResponse": {
+ "id": "OrderpaymentsNotifyAuthDeclinedResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#orderpaymentsNotifyAuthDeclinedResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderpaymentsNotifyAuthDeclinedResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyChargeRequest": {
+ "id": "OrderpaymentsNotifyChargeRequest",
+ "properties": {
+ "chargeState": {
+ "description": "Whether charge was successful.",
+ "type": "string"
+ },
+ "invoiceIds": {
+ "description": "Invoice IDs from the orderinvoices service that correspond to the charge.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyChargeResponse": {
+ "id": "OrderpaymentsNotifyChargeResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#orderpaymentsNotifyChargeResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderpaymentsNotifyChargeResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyRefundRequest": {
+ "id": "OrderpaymentsNotifyRefundRequest",
+ "properties": {
+ "invoiceIds": {
+ "description": "Invoice IDs from the orderinvoices service that correspond to the refund.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "refundState": {
+ "description": "Whether refund was successful.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderpaymentsNotifyRefundResponse": {
+ "id": "OrderpaymentsNotifyRefundResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#orderpaymentsNotifyRefundResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderpaymentsNotifyRefundResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderreportsListDisbursementsResponse": {
+ "id": "OrderreportsListDisbursementsResponse",
+ "properties": {
+ "disbursements": {
+ "description": "The list of disbursements.",
+ "items": {
+ "$ref": "OrderReportDisbursement"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#orderreportsListDisbursementsResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderreportsListDisbursementsResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of disbursements.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrderreportsListTransactionsResponse": {
+ "id": "OrderreportsListTransactionsResponse",
+ "properties": {
+ "kind": {
+ "default": "content#orderreportsListTransactionsResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderreportsListTransactionsResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of transactions.",
+ "type": "string"
+ },
+ "transactions": {
+ "description": "The list of transactions.",
+ "items": {
+ "$ref": "OrderReportTransaction"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrderreturnsListResponse": {
+ "id": "OrderreturnsListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#orderreturnsListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#orderreturnsListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of returns.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "MerchantOrderReturn"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersAcknowledgeRequest": {
+ "id": "OrdersAcknowledgeRequest",
+ "properties": {
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersAcknowledgeResponse": {
+ "id": "OrdersAcknowledgeResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersAcknowledgeResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersAcknowledgeResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersAdvanceTestOrderResponse": {
+ "id": "OrdersAdvanceTestOrderResponse",
+ "properties": {
+ "kind": {
+ "default": "content#ordersAdvanceTestOrderResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersAdvanceTestOrderResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCancelLineItemRequest": {
+ "id": "OrdersCancelLineItemRequest",
+ "properties": {
+ "lineItemId": {
+ "description": "The ID of the line item to cancel. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "productId": {
+ "description": "The ID of the product to cancel. This is the REST ID used in the products service. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity to cancel.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "reason": {
+ "description": "The reason for the cancellation.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCancelLineItemResponse": {
+ "id": "OrdersCancelLineItemResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersCancelLineItemResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersCancelLineItemResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCancelRequest": {
+ "id": "OrdersCancelRequest",
+ "properties": {
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "reason": {
+ "description": "The reason for the cancellation.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCancelResponse": {
+ "id": "OrdersCancelResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersCancelResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersCancelResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCancelTestOrderByCustomerRequest": {
+ "id": "OrdersCancelTestOrderByCustomerRequest",
+ "properties": {
+ "reason": {
+ "description": "The reason for the cancellation.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCancelTestOrderByCustomerResponse": {
+ "id": "OrdersCancelTestOrderByCustomerResponse",
+ "properties": {
+ "kind": {
+ "default": "content#ordersCancelTestOrderByCustomerResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersCancelTestOrderByCustomerResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCreateTestOrderRequest": {
+ "id": "OrdersCreateTestOrderRequest",
+ "properties": {
+ "country": {
+ "description": "The CLDR territory code of the country of the test order to create. Affects the currency and addresses of orders created via template_name, or the addresses of orders created via test_order.\n\nAcceptable values are: \n- \"US\" \n- \"FR\" Defaults to US.",
+ "type": "string"
+ },
+ "templateName": {
+ "description": "The test order template to use. Specify as an alternative to testOrder as a shortcut for retrieving a template and then creating an order using that template.",
+ "type": "string"
+ },
+ "testOrder": {
+ "$ref": "TestOrder",
+ "description": "The test order to create."
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCreateTestOrderResponse": {
+ "id": "OrdersCreateTestOrderResponse",
+ "properties": {
+ "kind": {
+ "default": "content#ordersCreateTestOrderResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersCreateTestOrderResponse\".",
+ "type": "string"
+ },
+ "orderId": {
+ "description": "The ID of the newly created test order.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCreateTestReturnRequest": {
+ "id": "OrdersCreateTestReturnRequest",
+ "properties": {
+ "items": {
+ "description": "Returned items.",
+ "items": {
+ "$ref": "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCreateTestReturnResponse": {
+ "id": "OrdersCreateTestReturnResponse",
+ "properties": {
+ "kind": {
+ "default": "content#ordersCreateTestReturnResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersCreateTestReturnResponse\".",
+ "type": "string"
+ },
+ "returnId": {
+ "description": "The ID of the newly created test order return.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem": {
+ "id": "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem",
+ "properties": {
+ "lineItemId": {
+ "description": "The ID of the line item to return.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "Quantity that is returned.",
+ "format": "uint32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo": {
+ "id": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo",
+ "properties": {
+ "carrier": {
+ "description": "The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values.",
+ "type": "string"
+ },
+ "shipmentId": {
+ "annotations": {
+ "required": [
+ "content.orders.shiplineitems"
+ ]
+ },
+ "description": "The ID of the shipment.",
+ "type": "string"
+ },
+ "trackingId": {
+ "description": "The tracking id for the shipment.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersGetByMerchantOrderIdResponse": {
+ "id": "OrdersGetByMerchantOrderIdResponse",
+ "properties": {
+ "kind": {
+ "default": "content#ordersGetByMerchantOrderIdResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersGetByMerchantOrderIdResponse\".",
+ "type": "string"
+ },
+ "order": {
+ "$ref": "Order",
+ "description": "The requested order."
+ }
+ },
+ "type": "object"
+ },
+ "OrdersGetTestOrderTemplateResponse": {
+ "id": "OrdersGetTestOrderTemplateResponse",
+ "properties": {
+ "kind": {
+ "default": "content#ordersGetTestOrderTemplateResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersGetTestOrderTemplateResponse\".",
+ "type": "string"
+ },
+ "template": {
+ "$ref": "TestOrder",
+ "description": "The requested test order template."
+ }
+ },
+ "type": "object"
+ },
+ "OrdersInStoreRefundLineItemRequest": {
+ "id": "OrdersInStoreRefundLineItemRequest",
+ "properties": {
+ "lineItemId": {
+ "description": "The ID of the line item to return. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "priceAmount": {
+ "$ref": "Price",
+ "description": "The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. Required."
+ },
+ "productId": {
+ "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity to return and refund.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "reason": {
+ "description": "The reason for the return.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ },
+ "taxAmount": {
+ "$ref": "Price",
+ "description": "The amount of tax to be refunded. Required."
+ }
+ },
+ "type": "object"
+ },
+ "OrdersInStoreRefundLineItemResponse": {
+ "id": "OrdersInStoreRefundLineItemResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersInStoreRefundLineItemResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersInStoreRefundLineItemResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersListResponse": {
+ "id": "OrdersListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#ordersListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of orders.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "Order"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersRejectReturnLineItemRequest": {
+ "id": "OrdersRejectReturnLineItemRequest",
+ "properties": {
+ "lineItemId": {
+ "description": "The ID of the line item to return. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "productId": {
+ "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity to return and refund.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "reason": {
+ "description": "The reason for the return.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersRejectReturnLineItemResponse": {
+ "id": "OrdersRejectReturnLineItemResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersRejectReturnLineItemResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersRejectReturnLineItemResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersReturnRefundLineItemRequest": {
+ "id": "OrdersReturnRefundLineItemRequest",
+ "properties": {
+ "lineItemId": {
+ "description": "The ID of the line item to return. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "priceAmount": {
+ "$ref": "Price",
+ "description": "The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. If omitted, refundless return is assumed. Optional, but if filled then both priceAmount and taxAmount must be set."
+ },
+ "productId": {
+ "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity to return and refund.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "reason": {
+ "description": "The reason for the return.",
+ "type": "string"
+ },
+ "reasonText": {
+ "description": "The explanation of the reason.",
+ "type": "string"
+ },
+ "taxAmount": {
+ "$ref": "Price",
+ "description": "The amount of tax to be refunded."
+ }
+ },
+ "type": "object"
+ },
+ "OrdersReturnRefundLineItemResponse": {
+ "id": "OrdersReturnRefundLineItemResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersReturnRefundLineItemResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersReturnRefundLineItemResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersSetLineItemMetadataRequest": {
+ "id": "OrdersSetLineItemMetadataRequest",
+ "properties": {
+ "annotations": {
+ "items": {
+ "$ref": "OrderMerchantProvidedAnnotation"
+ },
+ "type": "array"
+ },
+ "lineItemId": {
+ "description": "The ID of the line item to set metadata. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "productId": {
+ "description": "The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersSetLineItemMetadataResponse": {
+ "id": "OrdersSetLineItemMetadataResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersSetLineItemMetadataResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersSetLineItemMetadataResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersShipLineItemsRequest": {
+ "id": "OrdersShipLineItemsRequest",
+ "properties": {
+ "lineItems": {
+ "description": "Line items to ship.",
+ "items": {
+ "$ref": "OrderShipmentLineItemShipment"
+ },
+ "type": "array"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "shipmentGroupId": {
+ "description": "ID of the shipment group. Required for orders that use the orderinvoices service.",
+ "type": "string"
+ },
+ "shipmentInfos": {
+ "description": "Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs).",
+ "items": {
+ "$ref": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersShipLineItemsResponse": {
+ "id": "OrdersShipLineItemsResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersShipLineItemsResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersShipLineItemsResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersUpdateLineItemShippingDetailsRequest": {
+ "id": "OrdersUpdateLineItemShippingDetailsRequest",
+ "properties": {
+ "deliverByDate": {
+ "description": "Updated delivery by date, in ISO 8601 format. If not specified only ship by date is updated.",
+ "type": "string"
+ },
+ "lineItemId": {
+ "description": "The ID of the line item to set metadata. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "productId": {
+ "description": "The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required.",
+ "type": "string"
+ },
+ "shipByDate": {
+ "description": "Updated ship by date, in ISO 8601 format. If not specified only deliver by date is updated.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersUpdateLineItemShippingDetailsResponse": {
+ "id": "OrdersUpdateLineItemShippingDetailsResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersUpdateLineItemShippingDetailsResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersUpdateLineItemShippingDetailsResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersUpdateMerchantOrderIdRequest": {
+ "id": "OrdersUpdateMerchantOrderIdRequest",
+ "properties": {
+ "merchantOrderId": {
+ "description": "The merchant order id to be assigned to the order. Must be unique per merchant.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersUpdateMerchantOrderIdResponse": {
+ "id": "OrdersUpdateMerchantOrderIdResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersUpdateMerchantOrderIdResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersUpdateMerchantOrderIdResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersUpdateShipmentRequest": {
+ "id": "OrdersUpdateShipmentRequest",
+ "properties": {
+ "carrier": {
+ "description": "The carrier handling the shipment. Not updated if missing. See shipments[].carrier in the Orders resource representation for a list of acceptable values.",
+ "type": "string"
+ },
+ "deliveryDate": {
+ "description": "Date on which the shipment has been delivered, in ISO 8601 format. Optional and can be provided only if status is delivered.",
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation. Unique across all operations for a given order.",
+ "type": "string"
+ },
+ "shipmentId": {
+ "description": "The ID of the shipment.",
+ "type": "string"
+ },
+ "status": {
+ "description": "New status for the shipment. Not updated if missing.",
+ "type": "string"
+ },
+ "trackingId": {
+ "description": "The tracking id for the shipment. Not updated if missing.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OrdersUpdateShipmentResponse": {
+ "id": "OrdersUpdateShipmentResponse",
+ "properties": {
+ "executionStatus": {
+ "description": "The status of the execution.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#ordersUpdateShipmentResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#ordersUpdateShipmentResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosCustomBatchRequest": {
+ "id": "PosCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "PosCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "PosCustomBatchRequestEntry": {
+ "id": "PosCustomBatchRequestEntry",
+ "properties": {
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "inventory": {
+ "$ref": "PosInventory",
+ "description": "The inventory to submit. Set this only if the method is inventory."
+ },
+ "merchantId": {
+ "description": "The ID of the POS data provider.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ },
+ "sale": {
+ "$ref": "PosSale",
+ "description": "The sale information to submit. Set this only if the method is sale."
+ },
+ "store": {
+ "$ref": "PosStore",
+ "description": "The store information to submit. Set this only if the method is insert."
+ },
+ "storeCode": {
+ "description": "The store code. Set this only if the method is delete or get.",
+ "type": "string"
+ },
+ "targetMerchantId": {
+ "description": "The ID of the account for which to get/submit data.",
+ "format": "uint64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosCustomBatchResponse": {
+ "id": "PosCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "PosCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#posCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosCustomBatchResponseEntry": {
+ "id": "PosCustomBatchResponseEntry",
+ "properties": {
+ "batchId": {
+ "description": "The ID of the request entry to which this entry responds.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if, and only if, the request failed."
+ },
+ "inventory": {
+ "$ref": "PosInventory",
+ "description": "The updated inventory information."
+ },
+ "kind": {
+ "default": "content#posCustomBatchResponseEntry",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posCustomBatchResponseEntry\".",
+ "type": "string"
+ },
+ "sale": {
+ "$ref": "PosSale",
+ "description": "The updated sale information."
+ },
+ "store": {
+ "$ref": "PosStore",
+ "description": "The retrieved or updated store information."
+ }
+ },
+ "type": "object"
+ },
+ "PosDataProviders": {
+ "id": "PosDataProviders",
+ "properties": {
+ "country": {
+ "description": "Country code.",
+ "type": "string"
+ },
+ "posDataProviders": {
+ "description": "A list of POS data providers.",
+ "items": {
+ "$ref": "PosDataProvidersPosDataProvider"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "PosDataProvidersPosDataProvider": {
+ "id": "PosDataProvidersPosDataProvider",
+ "properties": {
+ "displayName": {
+ "description": "The display name of Pos data Provider.",
+ "type": "string"
+ },
+ "fullName": {
+ "description": "The full name of this POS data Provider.",
+ "type": "string"
+ },
+ "providerId": {
+ "description": "The ID of the account.",
+ "format": "uint64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosInventory": {
+ "description": "The absolute quantity of an item available at the given store.",
+ "id": "PosInventory",
+ "properties": {
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number.",
+ "type": "string"
+ },
+ "itemId": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "A unique identifier for the item.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#posInventory",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posInventory\".",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The current price of the item."
+ },
+ "quantity": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The available quantity of the item.",
+ "format": "int64",
+ "type": "string"
+ },
+ "storeCode": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The CLDR territory code for the item.",
+ "type": "string"
+ },
+ "timestamp": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The inventory timestamp, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosInventoryRequest": {
+ "id": "PosInventoryRequest",
+ "properties": {
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number.",
+ "type": "string"
+ },
+ "itemId": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "A unique identifier for the item.",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The current price of the item."
+ },
+ "quantity": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The available quantity of the item.",
+ "format": "int64",
+ "type": "string"
+ },
+ "storeCode": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The CLDR territory code for the item.",
+ "type": "string"
+ },
+ "timestamp": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The inventory timestamp, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosInventoryResponse": {
+ "id": "PosInventoryResponse",
+ "properties": {
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number.",
+ "type": "string"
+ },
+ "itemId": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "A unique identifier for the item.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#posInventoryResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posInventoryResponse\".",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The current price of the item."
+ },
+ "quantity": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The available quantity of the item.",
+ "format": "int64",
+ "type": "string"
+ },
+ "storeCode": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The CLDR territory code for the item.",
+ "type": "string"
+ },
+ "timestamp": {
+ "annotations": {
+ "required": [
+ "content.pos.inventory"
+ ]
+ },
+ "description": "The inventory timestamp, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosListResponse": {
+ "id": "PosListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#posListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posListResponse\".",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "PosStore"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "PosSale": {
+ "description": "The change of the available quantity of an item at the given store.",
+ "id": "PosSale",
+ "properties": {
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number.",
+ "type": "string"
+ },
+ "itemId": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "A unique identifier for the item.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#posSale",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posSale\".",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The price of the item."
+ },
+ "quantity": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The relative change of the available quantity. Negative for items returned.",
+ "format": "int64",
+ "type": "string"
+ },
+ "saleId": {
+ "description": "A unique ID to group items from the same sale event.",
+ "type": "string"
+ },
+ "storeCode": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The CLDR territory code for the item.",
+ "type": "string"
+ },
+ "timestamp": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The inventory timestamp, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosSaleRequest": {
+ "id": "PosSaleRequest",
+ "properties": {
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number.",
+ "type": "string"
+ },
+ "itemId": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "A unique identifier for the item.",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The price of the item."
+ },
+ "quantity": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The relative change of the available quantity. Negative for items returned.",
+ "format": "int64",
+ "type": "string"
+ },
+ "saleId": {
+ "description": "A unique ID to group items from the same sale event.",
+ "type": "string"
+ },
+ "storeCode": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The CLDR territory code for the item.",
+ "type": "string"
+ },
+ "timestamp": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The inventory timestamp, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosSaleResponse": {
+ "id": "PosSaleResponse",
+ "properties": {
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number.",
+ "type": "string"
+ },
+ "itemId": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "A unique identifier for the item.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#posSaleResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posSaleResponse\".",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The price of the item."
+ },
+ "quantity": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The relative change of the available quantity. Negative for items returned.",
+ "format": "int64",
+ "type": "string"
+ },
+ "saleId": {
+ "description": "A unique ID to group items from the same sale event.",
+ "type": "string"
+ },
+ "storeCode": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The CLDR territory code for the item.",
+ "type": "string"
+ },
+ "timestamp": {
+ "annotations": {
+ "required": [
+ "content.pos.sale"
+ ]
+ },
+ "description": "The inventory timestamp, in ISO 8601 format.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PosStore": {
+ "description": "Store resource.",
+ "id": "PosStore",
+ "properties": {
+ "kind": {
+ "default": "content#posStore",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#posStore\".",
+ "type": "string"
+ },
+ "storeAddress": {
+ "annotations": {
+ "required": [
+ "content.pos.insert"
+ ]
+ },
+ "description": "The street address of the store.",
+ "type": "string"
+ },
+ "storeCode": {
+ "annotations": {
+ "required": [
+ "content.pos.insert"
+ ]
+ },
+ "description": "A store identifier that is unique for the given merchant.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PostalCodeGroup": {
+ "id": "PostalCodeGroup",
+ "properties": {
+ "country": {
+ "description": "The CLDR territory code of the country the postal code group applies to. Required.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the postal code group, referred to in headers. Required.",
+ "type": "string"
+ },
+ "postalCodeRanges": {
+ "description": "A range of postal codes. Required.",
+ "items": {
+ "$ref": "PostalCodeRange"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "PostalCodeRange": {
+ "id": "PostalCodeRange",
+ "properties": {
+ "postalCodeRangeBegin": {
+ "description": "A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: \"94108\", \"9410*\", \"9*\". Required.",
+ "type": "string"
+ },
+ "postalCodeRangeEnd": {
+ "description": "A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area. It must have the same length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a pattern then postalCodeRangeEnd must be a pattern with the same prefix length. Optional: if not set, then the area is defined as being all the postal codes matching postalCodeRangeBegin.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Price": {
+ "id": "Price",
+ "properties": {
+ "currency": {
+ "description": "The currency of the price.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The price represented as a number.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Product": {
+ "description": "Product data. After inserting, updating, or deleting a product, it may take several minutes before changes take effect.",
+ "id": "Product",
+ "properties": {
+ "additionalImageLinks": {
+ "description": "Additional URLs of images of the item.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "adsGrouping": {
+ "description": "Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise.",
+ "type": "string"
+ },
+ "adsLabels": {
+ "description": "Similar to ads_grouping, but only works on CPC.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "adsRedirect": {
+ "description": "Allows advertisers to override the item URL when the product is shown within the context of Product Ads.",
+ "type": "string"
+ },
+ "adult": {
+ "description": "Set to true if the item is targeted towards adults.",
+ "type": "boolean"
+ },
+ "ageGroup": {
+ "description": "Target age group of the item.",
+ "type": "string"
+ },
+ "availability": {
+ "description": "Availability status of the item.",
+ "type": "string"
+ },
+ "availabilityDate": {
+ "description": "The day a pre-ordered product becomes available for delivery, in ISO 8601 format.",
+ "type": "string"
+ },
+ "brand": {
+ "description": "Brand of the item.",
+ "type": "string"
+ },
+ "channel": {
+ "annotations": {
+ "required": [
+ "content.products.insert"
+ ]
+ },
+ "description": "The item's channel (online or local).",
+ "type": "string"
+ },
+ "color": {
+ "description": "Color of the item.",
+ "type": "string"
+ },
+ "condition": {
+ "description": "Condition or state of the item.",
+ "type": "string"
+ },
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.products.insert"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "costOfGoodsSold": {
+ "$ref": "Price",
+ "description": "Cost of goods sold. Used for gross profit reporting."
+ },
+ "customAttributes": {
+ "description": "A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (e.g., { \"name\": \"size type\", \"type\": \"text\", \"value\": \"regular\" }). This is useful for submitting attributes not explicitly exposed by the API.",
+ "items": {
+ "$ref": "CustomAttribute"
+ },
+ "type": "array"
+ },
+ "customLabel0": {
+ "description": "Custom label 0 for custom grouping of items in a Shopping campaign.",
+ "type": "string"
+ },
+ "customLabel1": {
+ "description": "Custom label 1 for custom grouping of items in a Shopping campaign.",
+ "type": "string"
+ },
+ "customLabel2": {
+ "description": "Custom label 2 for custom grouping of items in a Shopping campaign.",
+ "type": "string"
+ },
+ "customLabel3": {
+ "description": "Custom label 3 for custom grouping of items in a Shopping campaign.",
+ "type": "string"
+ },
+ "customLabel4": {
+ "description": "Custom label 4 for custom grouping of items in a Shopping campaign.",
+ "type": "string"
+ },
+ "description": {
+ "description": "Description of the item.",
+ "type": "string"
+ },
+ "displayAdsId": {
+ "description": "An identifier for an item for dynamic remarketing campaigns.",
+ "type": "string"
+ },
+ "displayAdsLink": {
+ "description": "URL directly to your item's landing page for dynamic remarketing campaigns.",
+ "type": "string"
+ },
+ "displayAdsSimilarIds": {
+ "description": "Advertiser-specified recommendations.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "displayAdsTitle": {
+ "description": "Title of an item for dynamic remarketing campaigns.",
+ "type": "string"
+ },
+ "displayAdsValue": {
+ "description": "Offer margin for dynamic remarketing campaigns.",
+ "format": "double",
+ "type": "number"
+ },
+ "energyEfficiencyClass": {
+ "description": "The energy efficiency class as defined in EU directive 2010/30/EU.",
+ "type": "string"
+ },
+ "excludedDestinations": {
+ "description": "The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "expirationDate": {
+ "description": "Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in productstatuses as googleExpirationDate and might be earlier if expirationDate is too far in the future.",
+ "type": "string"
+ },
+ "gender": {
+ "description": "Target gender of the item.",
+ "type": "string"
+ },
+ "googleProductCategory": {
+ "description": "Google's category of the item (see Google product taxonomy).",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number (GTIN) of the item.",
+ "type": "string"
+ },
+ "id": {
+ "description": "The REST id of the product. Content API methods that operate on products take this as their productId parameter.\nThe REST id for a product is of the form channel:contentLanguage:targetCountry:offerId.",
+ "type": "string"
+ },
+ "identifierExists": {
+ "description": "False when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Required according to the Unique Product Identifier Rules for all target countries except for Canada.",
+ "type": "boolean"
+ },
+ "imageLink": {
+ "description": "URL of an image of the item.",
+ "type": "string"
+ },
+ "includedDestinations": {
+ "description": "The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in the excluded_destination field.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "installment": {
+ "$ref": "Installment",
+ "description": "Number and amount of installments to pay for an item. Brazil only."
+ },
+ "isBundle": {
+ "description": "Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price.",
+ "type": "boolean"
+ },
+ "itemGroupId": {
+ "description": "Shared identifier for all variants of the same product.",
+ "type": "string"
+ },
+ "kind": {
+ "default": "content#product",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#product\".",
+ "type": "string"
+ },
+ "link": {
+ "description": "URL directly linking to your item's page on your website.",
+ "type": "string"
+ },
+ "loyaltyPoints": {
+ "$ref": "LoyaltyPoints",
+ "description": "Loyalty points that users receive after purchasing the item. Japan only."
+ },
+ "material": {
+ "description": "The material of which the item is made.",
+ "type": "string"
+ },
+ "maxEnergyEfficiencyClass": {
+ "description": "The energy efficiency class as defined in EU directive 2010/30/EU.",
+ "type": "string"
+ },
+ "maxHandlingTime": {
+ "description": "Maximal product handling time (in business days).",
+ "format": "int64",
+ "type": "string"
+ },
+ "minEnergyEfficiencyClass": {
+ "description": "The energy efficiency class as defined in EU directive 2010/30/EU.",
+ "type": "string"
+ },
+ "minHandlingTime": {
+ "description": "Minimal product handling time (in business days).",
+ "format": "int64",
+ "type": "string"
+ },
+ "mobileLink": {
+ "description": "Link to a mobile-optimized version of the landing page.",
+ "type": "string"
+ },
+ "mpn": {
+ "description": "Manufacturer Part Number (MPN) of the item.",
+ "type": "string"
+ },
+ "multipack": {
+ "description": "The number of identical products in a merchant-defined multipack.",
+ "format": "int64",
+ "type": "string"
+ },
+ "offerId": {
+ "annotations": {
+ "required": [
+ "content.products.insert"
+ ]
+ },
+ "description": "A unique identifier for the item. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. Only valid unicode characters are accepted. See the products feed specification for details.\nNote: Content API methods that operate on products take the REST id of the product, not this identifier.",
+ "type": "string"
+ },
+ "pattern": {
+ "description": "The item's pattern (e.g. polka dots).",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "description": "Price of the item."
+ },
+ "productTypes": {
+ "description": "Categories of the item (formatted as in products feed specification).",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "promotionIds": {
+ "description": "The unique ID of a promotion.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "salePrice": {
+ "$ref": "Price",
+ "description": "Advertised sale price of the item."
+ },
+ "salePriceEffectiveDate": {
+ "description": "Date range during which the item is on sale (see products feed specification).",
+ "type": "string"
+ },
+ "sellOnGoogleQuantity": {
+ "description": "The quantity of the product that is available for selling on Google. Supported only for online products.",
+ "format": "int64",
+ "type": "string"
+ },
+ "shipping": {
+ "description": "Shipping rules.",
+ "items": {
+ "$ref": "ProductShipping"
+ },
+ "type": "array"
+ },
+ "shippingHeight": {
+ "$ref": "ProductShippingDimension",
+ "description": "Height of the item for shipping."
+ },
+ "shippingLabel": {
+ "description": "The shipping label of the product, used to group product in account-level shipping rules.",
+ "type": "string"
+ },
+ "shippingLength": {
+ "$ref": "ProductShippingDimension",
+ "description": "Length of the item for shipping."
+ },
+ "shippingWeight": {
+ "$ref": "ProductShippingWeight",
+ "description": "Weight of the item for shipping."
+ },
+ "shippingWidth": {
+ "$ref": "ProductShippingDimension",
+ "description": "Width of the item for shipping."
+ },
+ "sizeSystem": {
+ "description": "System in which the size is specified. Recommended for apparel items.",
+ "type": "string"
+ },
+ "sizeType": {
+ "description": "The cut of the item. Recommended for apparel items.",
+ "type": "string"
+ },
+ "sizes": {
+ "description": "Size of the item.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "source": {
+ "description": "The source of the offer, i.e., how the offer was created.",
+ "type": "string"
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.products.insert"
+ ]
+ },
+ "description": "The CLDR territory code for the item.",
+ "type": "string"
+ },
+ "taxes": {
+ "description": "Tax information.",
+ "items": {
+ "$ref": "ProductTax"
+ },
+ "type": "array"
+ },
+ "title": {
+ "description": "Title of the item.",
+ "type": "string"
+ },
+ "unitPricingBaseMeasure": {
+ "$ref": "ProductUnitPricingBaseMeasure",
+ "description": "The preference of the denominator of the unit price."
+ },
+ "unitPricingMeasure": {
+ "$ref": "ProductUnitPricingMeasure",
+ "description": "The measure and dimension of an item."
+ }
+ },
+ "type": "object"
+ },
+ "ProductShipping": {
+ "id": "ProductShipping",
+ "properties": {
+ "country": {
+ "description": "The CLDR territory code of the country to which an item will ship.",
+ "type": "string"
+ },
+ "locationGroupName": {
+ "description": "The location where the shipping is applicable, represented by a location group name.",
+ "type": "string"
+ },
+ "locationId": {
+ "description": "The numeric id of a location that the shipping rate applies to as defined in the AdWords API.",
+ "format": "int64",
+ "type": "string"
+ },
+ "postalCode": {
+ "description": "The postal code range that the shipping rate applies to, represented by a postal code, a postal code prefix followed by a * wildcard, a range between two postal codes or two postal code prefixes of equal length.",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "description": "Fixed shipping price, represented as a number."
+ },
+ "region": {
+ "description": "The geographic region to which a shipping rate applies.",
+ "type": "string"
+ },
+ "service": {
+ "description": "A free-form description of the service class or delivery speed.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductShippingDimension": {
+ "id": "ProductShippingDimension",
+ "properties": {
+ "unit": {
+ "description": "The unit of value.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The dimension of the product used to calculate the shipping cost of the item.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ProductShippingWeight": {
+ "id": "ProductShippingWeight",
+ "properties": {
+ "unit": {
+ "description": "The unit of value.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The weight of the product used to calculate the shipping cost of the item.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ProductStatus": {
+ "description": "The status of a product, i.e., information about a product computed asynchronously by the data quality analysis.",
+ "id": "ProductStatus",
+ "properties": {
+ "creationDate": {
+ "description": "Date on which the item has been created, in ISO 8601 format.",
+ "type": "string"
+ },
+ "destinationStatuses": {
+ "description": "The intended destinations for the product.",
+ "items": {
+ "$ref": "ProductStatusDestinationStatus"
+ },
+ "type": "array"
+ },
+ "googleExpirationDate": {
+ "description": "Date on which the item expires in Google Shopping, in ISO 8601 format.",
+ "type": "string"
+ },
+ "itemLevelIssues": {
+ "description": "A list of all issues associated with the product.",
+ "items": {
+ "$ref": "ProductStatusItemLevelIssue"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#productStatus",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#productStatus\".",
+ "type": "string"
+ },
+ "lastUpdateDate": {
+ "description": "Date on which the item has been last updated, in ISO 8601 format.",
+ "type": "string"
+ },
+ "link": {
+ "description": "The link to the product.",
+ "type": "string"
+ },
+ "productId": {
+ "description": "The id of the product for which status is reported.",
+ "type": "string"
+ },
+ "title": {
+ "description": "The title of the product.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductStatusDestinationStatus": {
+ "id": "ProductStatusDestinationStatus",
+ "properties": {
+ "destination": {
+ "description": "The name of the destination",
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductStatusItemLevelIssue": {
+ "id": "ProductStatusItemLevelIssue",
+ "properties": {
+ "attributeName": {
+ "description": "The attribute's name, if the issue is caused by a single attribute.",
+ "type": "string"
+ },
+ "code": {
+ "description": "The error code of the issue.",
+ "type": "string"
+ },
+ "description": {
+ "description": "A short issue description in English.",
+ "type": "string"
+ },
+ "destination": {
+ "description": "The destination the issue applies to.",
+ "type": "string"
+ },
+ "detail": {
+ "description": "A detailed issue description in English.",
+ "type": "string"
+ },
+ "documentation": {
+ "description": "The URL of a web page to help with resolving this issue.",
+ "type": "string"
+ },
+ "resolution": {
+ "description": "Whether the issue can be resolved by the merchant.",
+ "type": "string"
+ },
+ "servability": {
+ "description": "How this issue affects serving of the offer.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductTax": {
+ "id": "ProductTax",
+ "properties": {
+ "country": {
+ "description": "The country within which the item is taxed, specified as a CLDR territory code.",
+ "type": "string"
+ },
+ "locationId": {
+ "description": "The numeric id of a location that the tax rate applies to as defined in the AdWords API.",
+ "format": "int64",
+ "type": "string"
+ },
+ "postalCode": {
+ "description": "The postal code range that the tax rate applies to, represented by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460, 94*-95*.",
+ "type": "string"
+ },
+ "rate": {
+ "description": "The percentage of tax rate that applies to the item price.",
+ "format": "double",
+ "type": "number"
+ },
+ "region": {
+ "description": "The geographic region to which the tax rate applies.",
+ "type": "string"
+ },
+ "taxShip": {
+ "description": "Set to true if tax is charged on shipping.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "ProductUnitPricingBaseMeasure": {
+ "id": "ProductUnitPricingBaseMeasure",
+ "properties": {
+ "unit": {
+ "description": "The unit of the denominator.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The denominator of the unit price.",
+ "format": "int64",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductUnitPricingMeasure": {
+ "id": "ProductUnitPricingMeasure",
+ "properties": {
+ "unit": {
+ "description": "The unit of the measure.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The measure of an item.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ProductsCustomBatchRequest": {
+ "id": "ProductsCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "ProductsCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ProductsCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch products request.",
+ "id": "ProductsCustomBatchRequestEntry",
+ "properties": {
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ },
+ "product": {
+ "$ref": "Product",
+ "description": "The product to insert. Only required if the method is insert."
+ },
+ "productId": {
+ "description": "The ID of the product to get or delete. Only defined if the method is get or delete.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductsCustomBatchResponse": {
+ "id": "ProductsCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "ProductsCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#productsCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#productsCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductsCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch products response.",
+ "id": "ProductsCustomBatchResponseEntry",
+ "properties": {
+ "batchId": {
+ "description": "The ID of the request entry this entry responds to.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if and only if the request failed."
+ },
+ "kind": {
+ "default": "content#productsCustomBatchResponseEntry",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#productsCustomBatchResponseEntry\".",
+ "type": "string"
+ },
+ "product": {
+ "$ref": "Product",
+ "description": "The inserted product. Only defined if the method is insert and if the request was successful."
+ }
+ },
+ "type": "object"
+ },
+ "ProductsListResponse": {
+ "id": "ProductsListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#productsListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#productsListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of products.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "Product"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ProductstatusesCustomBatchRequest": {
+ "id": "ProductstatusesCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "ProductstatusesCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ProductstatusesCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch productstatuses request.",
+ "id": "ProductstatusesCustomBatchRequestEntry",
+ "properties": {
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "destinations": {
+ "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "includeAttributes": {
+ "type": "boolean"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ },
+ "productId": {
+ "description": "The ID of the product whose status to get.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductstatusesCustomBatchResponse": {
+ "id": "ProductstatusesCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "ProductstatusesCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#productstatusesCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#productstatusesCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ProductstatusesCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch productstatuses response.",
+ "id": "ProductstatusesCustomBatchResponseEntry",
+ "properties": {
+ "batchId": {
+ "description": "The ID of the request entry this entry responds to.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors, if the request failed."
+ },
+ "kind": {
+ "default": "content#productstatusesCustomBatchResponseEntry",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#productstatusesCustomBatchResponseEntry\".",
+ "type": "string"
+ },
+ "productStatus": {
+ "$ref": "ProductStatus",
+ "description": "The requested product status. Only defined if the request was successful."
+ }
+ },
+ "type": "object"
+ },
+ "ProductstatusesListResponse": {
+ "id": "ProductstatusesListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#productstatusesListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#productstatusesListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of products statuses.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "ProductStatus"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Promotion": {
+ "id": "Promotion",
+ "properties": {
+ "promotionAmount": {
+ "$ref": "Amount",
+ "description": "[required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts."
+ },
+ "promotionId": {
+ "description": "[required] ID of the promotion.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RateGroup": {
+ "id": "RateGroup",
+ "properties": {
+ "applicableShippingLabels": {
+ "description": "A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "carrierRates": {
+ "description": "A list of carrier rates that can be referred to by mainTable or singleValue.",
+ "items": {
+ "$ref": "CarrierRate"
+ },
+ "type": "array"
+ },
+ "mainTable": {
+ "$ref": "Table",
+ "description": "A table defining the rate group, when singleValue is not expressive enough. Can only be set if singleValue is not set."
+ },
+ "name": {
+ "description": "Name of the rate group. Optional. If set has to be unique within shipping service.",
+ "type": "string"
+ },
+ "singleValue": {
+ "$ref": "Value",
+ "description": "The value of the rate group (e.g. flat rate $10). Can only be set if mainTable and subtables are not set."
+ },
+ "subtables": {
+ "description": "A list of subtables referred to by mainTable. Can only be set if mainTable is set.",
+ "items": {
+ "$ref": "Table"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "RefundReason": {
+ "id": "RefundReason",
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "reasonCode": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ReturnShipment": {
+ "id": "ReturnShipment",
+ "properties": {
+ "creationDate": {
+ "type": "string"
+ },
+ "returnMethodType": {
+ "type": "string"
+ },
+ "shipmentId": {
+ "type": "string"
+ },
+ "shipmentTrackingInfos": {
+ "items": {
+ "$ref": "ShipmentTrackingInfo"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Row": {
+ "id": "Row",
+ "properties": {
+ "cells": {
+ "description": "The list of cells that constitute the row. Must have the same length as columnHeaders for two-dimensional tables, a length of 1 for one-dimensional tables. Required.",
+ "items": {
+ "$ref": "Value"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Service": {
+ "id": "Service",
+ "properties": {
+ "active": {
+ "description": "A boolean exposing the active status of the shipping service. Required.",
+ "type": "boolean"
+ },
+ "currency": {
+ "description": "The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.",
+ "type": "string"
+ },
+ "deliveryCountry": {
+ "description": "The CLDR territory code of the country to which the service applies. Required.",
+ "type": "string"
+ },
+ "deliveryTime": {
+ "$ref": "DeliveryTime",
+ "description": "Time spent in various aspects from order to the delivery of the product. Required."
+ },
+ "eligibility": {
+ "description": "Eligibility for this service.",
+ "type": "string"
+ },
+ "minimumOrderValue": {
+ "$ref": "Price",
+ "description": "Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency."
+ },
+ "name": {
+ "description": "Free-form name of the service. Must be unique within target account. Required.",
+ "type": "string"
+ },
+ "rateGroups": {
+ "description": "Shipping rate group definitions. Only the last one is allowed to have an empty applicableShippingLabels, which means \"everything else\". The other applicableShippingLabels must not overlap.",
+ "items": {
+ "$ref": "RateGroup"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ShipmentInvoice": {
+ "id": "ShipmentInvoice",
+ "properties": {
+ "invoiceSummary": {
+ "$ref": "InvoiceSummary",
+ "description": "[required] Invoice summary."
+ },
+ "lineItemInvoices": {
+ "description": "[required] Invoice details per line item.",
+ "items": {
+ "$ref": "ShipmentInvoiceLineItemInvoice"
+ },
+ "type": "array"
+ },
+ "shipmentGroupId": {
+ "description": "[required] ID of the shipment group.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ShipmentInvoiceLineItemInvoice": {
+ "id": "ShipmentInvoiceLineItemInvoice",
+ "properties": {
+ "lineItemId": {
+ "description": "ID of the line item. Either lineItemId or productId must be set.",
+ "type": "string"
+ },
+ "productId": {
+ "description": "ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set.",
+ "type": "string"
+ },
+ "shipmentUnitIds": {
+ "description": "[required] Unit IDs to define specific units within the line item.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "unitInvoice": {
+ "$ref": "UnitInvoice",
+ "description": "[required] Invoice details for a single unit."
+ }
+ },
+ "type": "object"
+ },
+ "ShipmentTrackingInfo": {
+ "id": "ShipmentTrackingInfo",
+ "properties": {
+ "carrier": {
+ "type": "string"
+ },
+ "trackingNumber": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ShippingSettings": {
+ "description": "The merchant account's shipping settings. All methods except getsupportedcarriers and getsupportedholidays require the admin role.",
+ "id": "ShippingSettings",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account to which these account shipping settings belong. Ignored upon update, always present in get request responses.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "postalCodeGroups": {
+ "description": "A list of postal code groups that can be referred to in services. Optional.",
+ "items": {
+ "$ref": "PostalCodeGroup"
+ },
+ "type": "array"
+ },
+ "services": {
+ "description": "The target account's list of services. Optional.",
+ "items": {
+ "$ref": "Service"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ShippingsettingsCustomBatchRequest": {
+ "id": "ShippingsettingsCustomBatchRequest",
+ "properties": {
+ "entries": {
+ "description": "The request entries to be processed in the batch.",
+ "items": {
+ "$ref": "ShippingsettingsCustomBatchRequestEntry"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ShippingsettingsCustomBatchRequestEntry": {
+ "description": "A batch entry encoding a single non-batch shippingsettings request.",
+ "id": "ShippingsettingsCustomBatchRequestEntry",
+ "properties": {
+ "accountId": {
+ "description": "The ID of the account for which to get/update account shipping settings.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "batchId": {
+ "description": "An entry ID, unique within the batch request.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "merchantId": {
+ "description": "The ID of the managing account.",
+ "format": "uint64",
+ "type": "string"
+ },
+ "method": {
+ "type": "string"
+ },
+ "shippingSettings": {
+ "$ref": "ShippingSettings",
+ "description": "The account shipping settings to update. Only defined if the method is update."
+ }
+ },
+ "type": "object"
+ },
+ "ShippingsettingsCustomBatchResponse": {
+ "id": "ShippingsettingsCustomBatchResponse",
+ "properties": {
+ "entries": {
+ "description": "The result of the execution of the batch requests.",
+ "items": {
+ "$ref": "ShippingsettingsCustomBatchResponseEntry"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#shippingsettingsCustomBatchResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#shippingsettingsCustomBatchResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ShippingsettingsCustomBatchResponseEntry": {
+ "description": "A batch entry encoding a single non-batch shipping settings response.",
+ "id": "ShippingsettingsCustomBatchResponseEntry",
+ "properties": {
+ "batchId": {
+ "description": "The ID of the request entry to which this entry responds.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "errors": {
+ "$ref": "Errors",
+ "description": "A list of errors defined if, and only if, the request failed."
+ },
+ "kind": {
+ "default": "content#shippingsettingsCustomBatchResponseEntry",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#shippingsettingsCustomBatchResponseEntry\".",
+ "type": "string"
+ },
+ "shippingSettings": {
+ "$ref": "ShippingSettings",
+ "description": "The retrieved or updated account shipping settings."
+ }
+ },
+ "type": "object"
+ },
+ "ShippingsettingsGetSupportedCarriersResponse": {
+ "id": "ShippingsettingsGetSupportedCarriersResponse",
+ "properties": {
+ "carriers": {
+ "description": "A list of supported carriers. May be empty.",
+ "items": {
+ "$ref": "CarriersCarrier"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#shippingsettingsGetSupportedCarriersResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#shippingsettingsGetSupportedCarriersResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ShippingsettingsGetSupportedHolidaysResponse": {
+ "id": "ShippingsettingsGetSupportedHolidaysResponse",
+ "properties": {
+ "holidays": {
+ "description": "A list of holidays applicable for delivery guarantees. May be empty.",
+ "items": {
+ "$ref": "HolidaysHoliday"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "content#shippingsettingsGetSupportedHolidaysResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#shippingsettingsGetSupportedHolidaysResponse\".",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ShippingsettingsListResponse": {
+ "id": "ShippingsettingsListResponse",
+ "properties": {
+ "kind": {
+ "default": "content#shippingsettingsListResponse",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#shippingsettingsListResponse\".",
+ "type": "string"
+ },
+ "nextPageToken": {
+ "description": "The token for the retrieval of the next page of shipping settings.",
+ "type": "string"
+ },
+ "resources": {
+ "items": {
+ "$ref": "ShippingSettings"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Table": {
+ "id": "Table",
+ "properties": {
+ "columnHeaders": {
+ "$ref": "Headers",
+ "description": "Headers of the table's columns. Optional: if not set then the table has only one dimension."
+ },
+ "name": {
+ "description": "Name of the table. Required for subtables, ignored for the main table.",
+ "type": "string"
+ },
+ "rowHeaders": {
+ "$ref": "Headers",
+ "description": "Headers of the table's rows. Required."
+ },
+ "rows": {
+ "description": "The list of rows that constitute the table. Must have the same length as rowHeaders. Required.",
+ "items": {
+ "$ref": "Row"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "TestOrder": {
+ "id": "TestOrder",
+ "properties": {
+ "customer": {
+ "$ref": "TestOrderCustomer",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The details of the customer who placed the order."
+ },
+ "enableOrderinvoices": {
+ "description": "Whether the orderinvoices service should support this order.",
+ "type": "boolean"
+ },
+ "kind": {
+ "default": "content#testOrder",
+ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#testOrder\".",
+ "type": "string"
+ },
+ "lineItems": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Line items that are ordered. At least one line item must be provided.",
+ "items": {
+ "$ref": "TestOrderLineItem"
+ },
+ "type": "array"
+ },
+ "notificationMode": {
+ "description": "Determines if test order must be pulled by merchant or pushed to merchant via push integration.",
+ "type": "string"
+ },
+ "predefinedBillingAddress": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The billing address.",
+ "type": "string"
+ },
+ "predefinedDeliveryAddress": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Identifier of one of the predefined delivery addresses for the delivery.",
+ "type": "string"
+ },
+ "promotions": {
+ "description": "Promotions associated with the order.",
+ "items": {
+ "$ref": "OrderPromotion"
+ },
+ "type": "array"
+ },
+ "shippingCost": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The total cost of shipping for all items."
+ },
+ "shippingCostTax": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The tax for the total shipping cost."
+ },
+ "shippingOption": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The requested shipping option.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TestOrderCustomer": {
+ "id": "TestOrderCustomer",
+ "properties": {
+ "email": {
+ "description": "Deprecated.",
+ "type": "string"
+ },
+ "fullName": {
+ "description": "Full name of the customer.",
+ "type": "string"
+ },
+ "marketingRightsInfo": {
+ "$ref": "TestOrderCustomerMarketingRightsInfo",
+ "description": "Customer's marketing preferences."
+ }
+ },
+ "type": "object"
+ },
+ "TestOrderCustomerMarketingRightsInfo": {
+ "id": "TestOrderCustomerMarketingRightsInfo",
+ "properties": {
+ "explicitMarketingPreference": {
+ "description": "Last know user use selection regards marketing preferences. In certain cases selection might not be known, so this field would be empty.",
+ "type": "string"
+ },
+ "lastUpdatedTimestamp": {
+ "description": "Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TestOrderLineItem": {
+ "id": "TestOrderLineItem",
+ "properties": {
+ "product": {
+ "$ref": "TestOrderLineItemProduct",
+ "description": "Product data from the time of the order placement."
+ },
+ "quantityOrdered": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Number of items ordered.",
+ "format": "uint32",
+ "type": "integer"
+ },
+ "returnInfo": {
+ "$ref": "OrderLineItemReturnInfo",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Details of the return policy for the line item."
+ },
+ "shippingDetails": {
+ "$ref": "OrderLineItemShippingDetails",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Details of the requested shipping for the line item."
+ },
+ "unitTax": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Unit tax for the line item."
+ }
+ },
+ "type": "object"
+ },
+ "TestOrderLineItemProduct": {
+ "id": "TestOrderLineItemProduct",
+ "properties": {
+ "brand": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Brand of the item.",
+ "type": "string"
+ },
+ "channel": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The item's channel.",
+ "type": "string"
+ },
+ "condition": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "Condition or state of the item.",
+ "type": "string"
+ },
+ "contentLanguage": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The two-letter ISO 639-1 language code for the item.",
+ "type": "string"
+ },
+ "gtin": {
+ "description": "Global Trade Item Number (GTIN) of the item. Optional.",
+ "type": "string"
+ },
+ "imageLink": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "URL of an image of the item.",
+ "type": "string"
+ },
+ "itemGroupId": {
+ "description": "Shared identifier for all variants of the same product. Optional.",
+ "type": "string"
+ },
+ "mpn": {
+ "description": "Manufacturer Part Number (MPN) of the item. Optional.",
+ "type": "string"
+ },
+ "offerId": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "An identifier of the item.",
+ "type": "string"
+ },
+ "price": {
+ "$ref": "Price",
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The price for the product."
+ },
+ "targetCountry": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The CLDR territory code of the target country of the product.",
+ "type": "string"
+ },
+ "title": {
+ "annotations": {
+ "required": [
+ "content.orders.createtestorder"
+ ]
+ },
+ "description": "The title of the product.",
+ "type": "string"
+ },
+ "variantAttributes": {
+ "description": "Variant attributes for the item. Optional.",
+ "items": {
+ "$ref": "OrderLineItemProductVariantAttribute"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "UnitInvoice": {
+ "id": "UnitInvoice",
+ "properties": {
+ "additionalCharges": {
+ "description": "Additional charges for a unit, e.g. shipping costs.",
+ "items": {
+ "$ref": "UnitInvoiceAdditionalCharge"
+ },
+ "type": "array"
+ },
+ "promotions": {
+ "description": "Promotions applied to a unit.",
+ "items": {
+ "$ref": "Promotion"
+ },
+ "type": "array"
+ },
+ "unitPricePretax": {
+ "$ref": "Price",
+ "description": "[required] Price of the unit, before applying taxes."
+ },
+ "unitPriceTaxes": {
+ "description": "Tax amounts to apply to the unit price.",
+ "items": {
+ "$ref": "UnitInvoiceTaxLine"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "UnitInvoiceAdditionalCharge": {
+ "id": "UnitInvoiceAdditionalCharge",
+ "properties": {
+ "additionalChargeAmount": {
+ "$ref": "Amount",
+ "description": "[required] Amount of the additional charge."
+ },
+ "additionalChargePromotions": {
+ "description": "Promotions applied to the additional charge.",
+ "items": {
+ "$ref": "Promotion"
+ },
+ "type": "array"
+ },
+ "type": {
+ "description": "[required] Type of the additional charge.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "UnitInvoiceTaxLine": {
+ "id": "UnitInvoiceTaxLine",
+ "properties": {
+ "taxAmount": {
+ "$ref": "Price",
+ "description": "[required] Tax amount for the tax type."
+ },
+ "taxName": {
+ "description": "Optional name of the tax type. This should only be provided if taxType is otherFeeTax.",
+ "type": "string"
+ },
+ "taxType": {
+ "description": "[required] Type of the tax.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Value": {
+ "description": "The single value of a rate group or the value of a rate group table's cell. Exactly one of noShipping, flatRate, pricePercentage, carrierRateName, subtableName must be set.",
+ "id": "Value",
+ "properties": {
+ "carrierRateName": {
+ "description": "The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.",
+ "type": "string"
+ },
+ "flatRate": {
+ "$ref": "Price",
+ "description": "A flat rate. Can only be set if all other fields are not set."
+ },
+ "noShipping": {
+ "description": "If true, then the product can't ship. Must be true when set, can only be set if all other fields are not set.",
+ "type": "boolean"
+ },
+ "pricePercentage": {
+ "description": "A percentage of the price represented as a number in decimal notation (e.g., \"5.4\"). Can only be set if all other fields are not set.",
+ "type": "string"
+ },
+ "subtableName": {
+ "description": "The name of a subtable. Can only be set in table cells (i.e., not for single values), and only if all other fields are not set.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Weight": {
+ "id": "Weight",
+ "properties": {
+ "unit": {
+ "description": "The weight unit.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The weight represented as a number.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "servicePath": "content/v2.1/",
+ "title": "Content API for Shopping",
+ "version": "v2.1"
+}
\ No newline at end of file
diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go
new file mode 100644
index 0000000..870ba17
--- /dev/null
+++ b/content/v2.1/content-gen.go
@@ -0,0 +1,22949 @@
+// Copyright 2018 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Code generated file. DO NOT EDIT.
+
+// Package content provides access to the Content API for Shopping.
+//
+// See https://developers.google.com/shopping-content
+//
+// Usage example:
+//
+// import "google.golang.org/api/content/v2.1"
+// ...
+// contentService, err := content.New(oauthHttpClient)
+package content // import "google.golang.org/api/content/v2.1"
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+
+ gensupport "google.golang.org/api/gensupport"
+ googleapi "google.golang.org/api/googleapi"
+)
+
+// Always reference these packages, just in case the auto-generated code
+// below doesn't.
+var _ = bytes.NewBuffer
+var _ = strconv.Itoa
+var _ = fmt.Sprintf
+var _ = json.NewDecoder
+var _ = io.Copy
+var _ = url.Parse
+var _ = gensupport.MarshalJSON
+var _ = googleapi.Version
+var _ = errors.New
+var _ = strings.Replace
+var _ = context.Canceled
+
+const apiId = "content:v2.1"
+const apiName = "content"
+const apiVersion = "v2.1"
+const basePath = "https://www.googleapis.com/content/v2.1/"
+
+// OAuth2 scopes used by this API.
+const (
+ // Manage your product listings and accounts for Google Shopping
+ ContentScope = "https://www.googleapis.com/auth/content"
+)
+
+func New(client *http.Client) (*APIService, error) {
+ if client == nil {
+ return nil, errors.New("client is nil")
+ }
+ s := &APIService{client: client, BasePath: basePath}
+ s.Accounts = NewAccountsService(s)
+ s.Accountstatuses = NewAccountstatusesService(s)
+ s.Accounttax = NewAccounttaxService(s)
+ s.Datafeeds = NewDatafeedsService(s)
+ s.Datafeedstatuses = NewDatafeedstatusesService(s)
+ s.Liasettings = NewLiasettingsService(s)
+ s.Orderinvoices = NewOrderinvoicesService(s)
+ s.Orderpayments = NewOrderpaymentsService(s)
+ s.Orderreports = NewOrderreportsService(s)
+ s.Orderreturns = NewOrderreturnsService(s)
+ s.Orders = NewOrdersService(s)
+ s.Pos = NewPosService(s)
+ s.Products = NewProductsService(s)
+ s.Productstatuses = NewProductstatusesService(s)
+ s.Shippingsettings = NewShippingsettingsService(s)
+ return s, nil
+}
+
+type APIService struct {
+ client *http.Client
+ BasePath string // API endpoint base URL
+ UserAgent string // optional additional User-Agent fragment
+
+ Accounts *AccountsService
+
+ Accountstatuses *AccountstatusesService
+
+ Accounttax *AccounttaxService
+
+ Datafeeds *DatafeedsService
+
+ Datafeedstatuses *DatafeedstatusesService
+
+ Liasettings *LiasettingsService
+
+ Orderinvoices *OrderinvoicesService
+
+ Orderpayments *OrderpaymentsService
+
+ Orderreports *OrderreportsService
+
+ Orderreturns *OrderreturnsService
+
+ Orders *OrdersService
+
+ Pos *PosService
+
+ Products *ProductsService
+
+ Productstatuses *ProductstatusesService
+
+ Shippingsettings *ShippingsettingsService
+}
+
+func (s *APIService) userAgent() string {
+ if s.UserAgent == "" {
+ return googleapi.UserAgent
+ }
+ return googleapi.UserAgent + " " + s.UserAgent
+}
+
+func NewAccountsService(s *APIService) *AccountsService {
+ rs := &AccountsService{s: s}
+ return rs
+}
+
+type AccountsService struct {
+ s *APIService
+}
+
+func NewAccountstatusesService(s *APIService) *AccountstatusesService {
+ rs := &AccountstatusesService{s: s}
+ return rs
+}
+
+type AccountstatusesService struct {
+ s *APIService
+}
+
+func NewAccounttaxService(s *APIService) *AccounttaxService {
+ rs := &AccounttaxService{s: s}
+ return rs
+}
+
+type AccounttaxService struct {
+ s *APIService
+}
+
+func NewDatafeedsService(s *APIService) *DatafeedsService {
+ rs := &DatafeedsService{s: s}
+ return rs
+}
+
+type DatafeedsService struct {
+ s *APIService
+}
+
+func NewDatafeedstatusesService(s *APIService) *DatafeedstatusesService {
+ rs := &DatafeedstatusesService{s: s}
+ return rs
+}
+
+type DatafeedstatusesService struct {
+ s *APIService
+}
+
+func NewLiasettingsService(s *APIService) *LiasettingsService {
+ rs := &LiasettingsService{s: s}
+ return rs
+}
+
+type LiasettingsService struct {
+ s *APIService
+}
+
+func NewOrderinvoicesService(s *APIService) *OrderinvoicesService {
+ rs := &OrderinvoicesService{s: s}
+ return rs
+}
+
+type OrderinvoicesService struct {
+ s *APIService
+}
+
+func NewOrderpaymentsService(s *APIService) *OrderpaymentsService {
+ rs := &OrderpaymentsService{s: s}
+ return rs
+}
+
+type OrderpaymentsService struct {
+ s *APIService
+}
+
+func NewOrderreportsService(s *APIService) *OrderreportsService {
+ rs := &OrderreportsService{s: s}
+ return rs
+}
+
+type OrderreportsService struct {
+ s *APIService
+}
+
+func NewOrderreturnsService(s *APIService) *OrderreturnsService {
+ rs := &OrderreturnsService{s: s}
+ return rs
+}
+
+type OrderreturnsService struct {
+ s *APIService
+}
+
+func NewOrdersService(s *APIService) *OrdersService {
+ rs := &OrdersService{s: s}
+ return rs
+}
+
+type OrdersService struct {
+ s *APIService
+}
+
+func NewPosService(s *APIService) *PosService {
+ rs := &PosService{s: s}
+ return rs
+}
+
+type PosService struct {
+ s *APIService
+}
+
+func NewProductsService(s *APIService) *ProductsService {
+ rs := &ProductsService{s: s}
+ return rs
+}
+
+type ProductsService struct {
+ s *APIService
+}
+
+func NewProductstatusesService(s *APIService) *ProductstatusesService {
+ rs := &ProductstatusesService{s: s}
+ return rs
+}
+
+type ProductstatusesService struct {
+ s *APIService
+}
+
+func NewShippingsettingsService(s *APIService) *ShippingsettingsService {
+ rs := &ShippingsettingsService{s: s}
+ return rs
+}
+
+type ShippingsettingsService struct {
+ s *APIService
+}
+
+// Account: Account data. After the creation of a new account it may
+// take a few minutes before it is fully operational. The methods
+// delete, insert, patch, and update require the admin role.
+type Account struct {
+ // AdsLinks: List of linked Ads accounts that are active or pending
+ // approval. To create a new link request, add a new link with status
+ // active to the list. It will remain in a pending state until approved
+ // or rejected either in the Ads interface or through the AdWords API.
+ // To delete an active link, or to cancel a link request, remove it from
+ // the list.
+ AdsLinks []*AccountAdsLink `json:"adsLinks,omitempty"`
+
+ // AdultContent: Indicates whether the merchant sells adult content.
+ AdultContent bool `json:"adultContent,omitempty"`
+
+ // BusinessInformation: The business information of the account.
+ BusinessInformation *AccountBusinessInformation `json:"businessInformation,omitempty"`
+
+ // GoogleMyBusinessLink: The GMB account which is linked or in the
+ // process of being linked with the Merchant Center account.
+ GoogleMyBusinessLink *AccountGoogleMyBusinessLink `json:"googleMyBusinessLink,omitempty"`
+
+ // Id: Merchant Center account ID.
+ Id uint64 `json:"id,omitempty,string"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#account".
+ Kind string `json:"kind,omitempty"`
+
+ // Name: Display name for the account.
+ Name string `json:"name,omitempty"`
+
+ // SellerId: Client-specific, locally-unique, internal ID for the child
+ // account.
+ SellerId string `json:"sellerId,omitempty"`
+
+ // Users: Users with access to the account. Every account (except for
+ // subaccounts) must have at least one admin user.
+ Users []*AccountUser `json:"users,omitempty"`
+
+ // WebsiteUrl: The merchant's website.
+ WebsiteUrl string `json:"websiteUrl,omitempty"`
+
+ // YoutubeChannelLinks: List of linked YouTube channels that are active
+ // or pending approval. To create a new link request, add a new link
+ // with status active to the list. It will remain in a pending state
+ // until approved or rejected in the YT Creator Studio interface. To
+ // delete an active link, or to cancel a link request, remove it from
+ // the list.
+ YoutubeChannelLinks []*AccountYouTubeChannelLink `json:"youtubeChannelLinks,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AdsLinks") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AdsLinks") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Account) MarshalJSON() ([]byte, error) {
+ type NoMethod Account
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountAddress struct {
+ // Country: CLDR country code (e.g. "US").
+ Country string `json:"country,omitempty"`
+
+ // Locality: City, town or commune. May also include dependent
+ // localities or sublocalities (e.g. neighborhoods or suburbs).
+ Locality string `json:"locality,omitempty"`
+
+ // PostalCode: Postal code or ZIP (e.g. "94043").
+ PostalCode string `json:"postalCode,omitempty"`
+
+ // Region: Top-level administrative subdivision of the country. For
+ // example, a state like California ("CA") or a province like Quebec
+ // ("QC").
+ Region string `json:"region,omitempty"`
+
+ // StreetAddress: Street-level part of the address.
+ StreetAddress string `json:"streetAddress,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountAddress) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountAddress
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountAdsLink struct {
+ // AdsId: Customer ID of the Ads account.
+ AdsId uint64 `json:"adsId,omitempty,string"`
+
+ // Status: Status of the link between this Merchant Center account and
+ // the Ads account. Upon retrieval, it represents the actual status of
+ // the link and can be either active if it was approved in Google Ads or
+ // pending if it's pending approval. Upon insertion, it represents the
+ // intended status of the link. Re-uploading a link with status active
+ // when it's still pending or with status pending when it's already
+ // active will have no effect: the status will remain unchanged.
+ // Re-uploading a link with deprecated status inactive is equivalent to
+ // not submitting the link at all and will delete the link if it was
+ // active or cancel the link request if it was pending.
+ Status string `json:"status,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AdsId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AdsId") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountAdsLink) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountAdsLink
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountBusinessInformation struct {
+ // Address: The address of the business.
+ Address *AccountAddress `json:"address,omitempty"`
+
+ // CustomerService: The customer service information of the business.
+ CustomerService *AccountCustomerService `json:"customerService,omitempty"`
+
+ // PhoneNumber: The phone number of the business.
+ PhoneNumber string `json:"phoneNumber,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Address") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Address") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountBusinessInformation) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountBusinessInformation
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountCustomerService struct {
+ // Email: Customer service email.
+ Email string `json:"email,omitempty"`
+
+ // PhoneNumber: Customer service phone number.
+ PhoneNumber string `json:"phoneNumber,omitempty"`
+
+ // Url: Customer service URL.
+ Url string `json:"url,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Email") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Email") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountCustomerService) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountCustomerService
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountGoogleMyBusinessLink struct {
+ // GmbEmail: The GMB email address of which a specific account within a
+ // GMB account. A sample account within a GMB account could be a
+ // business account with set of locations, managed under the GMB
+ // account.
+ GmbEmail string `json:"gmbEmail,omitempty"`
+
+ // Status: Status of the link between this Merchant Center account and
+ // the GMB account.
+ Status string `json:"status,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "GmbEmail") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "GmbEmail") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountGoogleMyBusinessLink) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountGoogleMyBusinessLink
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountIdentifier struct {
+ // AggregatorId: The aggregator ID, set for aggregators and subaccounts
+ // (in that case, it represents the aggregator of the subaccount).
+ AggregatorId uint64 `json:"aggregatorId,omitempty,string"`
+
+ // MerchantId: The merchant account ID, set for individual accounts and
+ // subaccounts.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "AggregatorId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AggregatorId") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountIdentifier) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountIdentifier
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccountStatus: The status of an account, i.e., information about its
+// products, which is computed offline and not returned immediately at
+// insertion time.
+type AccountStatus struct {
+ // AccountId: The ID of the account for which the status is reported.
+ AccountId string `json:"accountId,omitempty"`
+
+ // AccountLevelIssues: A list of account level issues.
+ AccountLevelIssues []*AccountStatusAccountLevelIssue `json:"accountLevelIssues,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountStatus".
+ Kind string `json:"kind,omitempty"`
+
+ // Products: List of product-related data by channel, destination, and
+ // country. Data in this field may be delayed by up to 30 minutes.
+ Products []*AccountStatusProducts `json:"products,omitempty"`
+
+ // WebsiteClaimed: Whether the account's website is claimed or not.
+ WebsiteClaimed bool `json:"websiteClaimed,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountStatus) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountStatus
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountStatusAccountLevelIssue struct {
+ // Country: Country for which this issue is reported.
+ Country string `json:"country,omitempty"`
+
+ // Destination: The destination the issue applies to.
+ Destination string `json:"destination,omitempty"`
+
+ // Detail: Additional details about the issue.
+ Detail string `json:"detail,omitempty"`
+
+ // Documentation: The URL of a web page to help resolving this issue.
+ Documentation string `json:"documentation,omitempty"`
+
+ // Id: Issue identifier.
+ Id string `json:"id,omitempty"`
+
+ // Severity: Severity of the issue.
+ Severity string `json:"severity,omitempty"`
+
+ // Title: Short description of the issue.
+ Title string `json:"title,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountStatusAccountLevelIssue) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountStatusAccountLevelIssue
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountStatusItemLevelIssue struct {
+ // AttributeName: The attribute's name, if the issue is caused by a
+ // single attribute.
+ AttributeName string `json:"attributeName,omitempty"`
+
+ // Code: The error code of the issue.
+ Code string `json:"code,omitempty"`
+
+ // Description: A short issue description in English.
+ Description string `json:"description,omitempty"`
+
+ // Detail: A detailed issue description in English.
+ Detail string `json:"detail,omitempty"`
+
+ // Documentation: The URL of a web page to help with resolving this
+ // issue.
+ Documentation string `json:"documentation,omitempty"`
+
+ // NumItems: Number of items with this issue.
+ NumItems int64 `json:"numItems,omitempty,string"`
+
+ // Resolution: Whether the issue can be resolved by the merchant.
+ Resolution string `json:"resolution,omitempty"`
+
+ // Servability: How this issue affects serving of the offer.
+ Servability string `json:"servability,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AttributeName") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AttributeName") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountStatusItemLevelIssue) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountStatusItemLevelIssue
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountStatusProducts struct {
+ // Channel: The channel the data applies to.
+ Channel string `json:"channel,omitempty"`
+
+ // Country: The country the data applies to.
+ Country string `json:"country,omitempty"`
+
+ // Destination: The destination the data applies to.
+ Destination string `json:"destination,omitempty"`
+
+ // ItemLevelIssues: List of item-level issues.
+ ItemLevelIssues []*AccountStatusItemLevelIssue `json:"itemLevelIssues,omitempty"`
+
+ // Statistics: Aggregated product statistics.
+ Statistics *AccountStatusStatistics `json:"statistics,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Channel") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Channel") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountStatusProducts) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountStatusProducts
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountStatusStatistics struct {
+ // Active: Number of active offers.
+ Active int64 `json:"active,omitempty,string"`
+
+ // Disapproved: Number of disapproved offers.
+ Disapproved int64 `json:"disapproved,omitempty,string"`
+
+ // Expiring: Number of expiring offers.
+ Expiring int64 `json:"expiring,omitempty,string"`
+
+ // Pending: Number of pending offers.
+ Pending int64 `json:"pending,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "Active") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Active") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountStatusStatistics) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountStatusStatistics
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccountTax: The tax settings of a merchant account. All methods
+// require the admin role.
+type AccountTax struct {
+ // AccountId: The ID of the account to which these account tax settings
+ // belong.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountTax".
+ Kind string `json:"kind,omitempty"`
+
+ // Rules: Tax rules. Updating the tax rules will enable US taxes (not
+ // reversible). Defining no rules is equivalent to not charging tax at
+ // all.
+ Rules []*AccountTaxTaxRule `json:"rules,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountTax) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountTax
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccountTaxTaxRule: Tax calculation rule to apply in a state or
+// province (USA only).
+type AccountTaxTaxRule struct {
+ // Country: Country code in which tax is applicable.
+ Country string `json:"country,omitempty"`
+
+ // LocationId: State (or province) is which the tax is applicable,
+ // described by its location id (also called criteria id).
+ LocationId uint64 `json:"locationId,omitempty,string"`
+
+ // RatePercent: Explicit tax rate in percent, represented as a floating
+ // point number without the percentage character. Must not be negative.
+ RatePercent string `json:"ratePercent,omitempty"`
+
+ // ShippingTaxed: If true, shipping charges are also taxed.
+ ShippingTaxed bool `json:"shippingTaxed,omitempty"`
+
+ // UseGlobalRate: Whether the tax rate is taken from a global tax table
+ // or specified explicitly.
+ UseGlobalRate bool `json:"useGlobalRate,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountTaxTaxRule) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountTaxTaxRule
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountUser struct {
+ // Admin: Whether user is an admin.
+ Admin bool `json:"admin,omitempty"`
+
+ // EmailAddress: User's email address.
+ EmailAddress string `json:"emailAddress,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Admin") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Admin") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountUser) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountUser
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountYouTubeChannelLink struct {
+ // ChannelId: Channel ID.
+ ChannelId string `json:"channelId,omitempty"`
+
+ // Status: Status of the link between this Merchant Center account and
+ // the YouTube channel. Upon retrieval, it represents the actual status
+ // of the link and can be either active if it was approved in YT Creator
+ // Studio or pending if it's pending approval. Upon insertion, it
+ // represents the intended status of the link. Re-uploading a link with
+ // status active when it's still pending or with status pending when
+ // it's already active will have no effect: the status will remain
+ // unchanged. Re-uploading a link with deprecated status inactive is
+ // equivalent to not submitting the link at all and will delete the link
+ // if it was active or cancel the link request if it was pending.
+ Status string `json:"status,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ChannelId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ChannelId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountYouTubeChannelLink) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountYouTubeChannelLink
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsAuthInfoResponse struct {
+ // AccountIdentifiers: The account identifiers corresponding to the
+ // authenticated user.
+ // - For an individual account: only the merchant ID is defined
+ // - For an aggregator: only the aggregator ID is defined
+ // - For a subaccount of an MCA: both the merchant ID and the aggregator
+ // ID are defined.
+ AccountIdentifiers []*AccountIdentifier `json:"accountIdentifiers,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountsAuthInfoResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountIdentifiers")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountIdentifiers") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsAuthInfoResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsAuthInfoResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsClaimWebsiteResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountsClaimWebsiteResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsClaimWebsiteResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsClaimWebsiteResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*AccountsCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccountsCustomBatchRequestEntry: A batch entry encoding a single
+// non-batch accounts request.
+type AccountsCustomBatchRequestEntry struct {
+ // Account: The account to create or update. Only defined if the method
+ // is insert or update.
+ Account *Account `json:"account,omitempty"`
+
+ // AccountId: The ID of the targeted account. Only defined if the method
+ // is not insert.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Force: Whether the account should be deleted if the account has
+ // offers. Only applicable if the method is delete.
+ Force bool `json:"force,omitempty"`
+
+ // LinkRequest: Details about the link request.
+ LinkRequest *AccountsCustomBatchRequestEntryLinkRequest `json:"linkRequest,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ // Method: The method of the batch entry.
+ Method string `json:"method,omitempty"`
+
+ // Overwrite: Only applicable if the method is claimwebsite. Indicates
+ // whether or not to take the claim from another account in case there
+ // is a conflict.
+ Overwrite bool `json:"overwrite,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Account") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Account") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsCustomBatchRequestEntryLinkRequest struct {
+ // Action: Action to perform for this link. The "request" action is only
+ // available to select merchants.
+ Action string `json:"action,omitempty"`
+
+ // LinkType: Type of the link between the two accounts.
+ LinkType string `json:"linkType,omitempty"`
+
+ // LinkedAccountId: The ID of the linked account.
+ LinkedAccountId string `json:"linkedAccountId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Action") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Action") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsCustomBatchRequestEntryLinkRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsCustomBatchRequestEntryLinkRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*AccountsCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountsCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccountsCustomBatchResponseEntry: A batch entry encoding a single
+// non-batch accounts response.
+type AccountsCustomBatchResponseEntry struct {
+ // Account: The retrieved, created, or updated account. Not defined if
+ // the method was delete, claimwebsite or link.
+ Account *Account `json:"account,omitempty"`
+
+ // BatchId: The ID of the request entry this entry responds to.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors defined if and only if the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountsCustomBatchResponseEntry".
+ Kind string `json:"kind,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Account") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Account") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsLinkRequest struct {
+ // Action: Action to perform for this link. The "request" action is only
+ // available to select merchants.
+ Action string `json:"action,omitempty"`
+
+ // LinkType: Type of the link between the two accounts.
+ LinkType string `json:"linkType,omitempty"`
+
+ // LinkedAccountId: The ID of the linked account.
+ LinkedAccountId string `json:"linkedAccountId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Action") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Action") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsLinkRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsLinkRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsLinkResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountsLinkResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsLinkResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsLinkResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountsListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountsListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // accounts.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*Account `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountsListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountstatusesCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*AccountstatusesCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountstatusesCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccountstatusesCustomBatchRequestEntry: A batch entry encoding a
+// single non-batch accountstatuses request.
+type AccountstatusesCustomBatchRequestEntry struct {
+ // AccountId: The ID of the (sub-)account whose status to get.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Destinations: If set, only issues for the specified destinations are
+ // returned, otherwise only issues for the Shopping destination.
+ Destinations []string `json:"destinations,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ // Method: The method (get).
+ Method string `json:"method,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountstatusesCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountstatusesCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*AccountstatusesCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountstatusesCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountstatusesCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccountstatusesCustomBatchResponseEntry: A batch entry encoding a
+// single non-batch accountstatuses response.
+type AccountstatusesCustomBatchResponseEntry struct {
+ // AccountStatus: The requested account status. Defined if and only if
+ // the request was successful.
+ AccountStatus *AccountStatus `json:"accountStatus,omitempty"`
+
+ // BatchId: The ID of the request entry this entry responds to.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors defined if and only if the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountStatus") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountstatusesCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccountstatusesListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accountstatusesListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // account statuses.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*AccountStatus `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccountstatusesListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccountstatusesListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccounttaxCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*AccounttaxCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccounttaxCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod AccounttaxCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccounttaxCustomBatchRequestEntry: A batch entry encoding a single
+// non-batch accounttax request.
+type AccounttaxCustomBatchRequestEntry struct {
+ // AccountId: The ID of the account for which to get/update account tax
+ // settings.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // AccountTax: The account tax settings to update. Only defined if the
+ // method is update.
+ AccountTax *AccountTax `json:"accountTax,omitempty"`
+
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccounttaxCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod AccounttaxCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccounttaxCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*AccounttaxCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accounttaxCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccounttaxCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccounttaxCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AccounttaxCustomBatchResponseEntry: A batch entry encoding a single
+// non-batch accounttax response.
+type AccounttaxCustomBatchResponseEntry struct {
+ // AccountTax: The retrieved or updated account tax settings.
+ AccountTax *AccountTax `json:"accountTax,omitempty"`
+
+ // BatchId: The ID of the request entry this entry responds to.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors defined if and only if the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accounttaxCustomBatchResponseEntry".
+ Kind string `json:"kind,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountTax") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountTax") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccounttaxCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod AccounttaxCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type AccounttaxListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#accounttaxListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // account tax settings.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*AccountTax `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AccounttaxListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod AccounttaxListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Amount struct {
+ // Pretax: [required] Value before taxes.
+ Pretax *Price `json:"pretax,omitempty"`
+
+ // Tax: [required] Tax value.
+ Tax *Price `json:"tax,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Pretax") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Pretax") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Amount) MarshalJSON() ([]byte, error) {
+ type NoMethod Amount
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type CarrierRate struct {
+ // CarrierName: Carrier service, such as "UPS" or "Fedex". The list of
+ // supported carriers can be retrieved via the getSupportedCarriers
+ // method. Required.
+ CarrierName string `json:"carrierName,omitempty"`
+
+ // CarrierService: Carrier service, such as "ground" or "2 days". The
+ // list of supported services for a carrier can be retrieved via the
+ // getSupportedCarriers method. Required.
+ CarrierService string `json:"carrierService,omitempty"`
+
+ // FlatAdjustment: Additive shipping rate modifier. Can be negative. For
+ // example { "value": "1", "currency" : "USD" } adds $1 to the rate, {
+ // "value": "-3", "currency" : "USD" } removes $3 from the rate.
+ // Optional.
+ FlatAdjustment *Price `json:"flatAdjustment,omitempty"`
+
+ // Name: Name of the carrier rate. Must be unique per rate group.
+ // Required.
+ Name string `json:"name,omitempty"`
+
+ // OriginPostalCode: Shipping origin for this carrier rate. Required.
+ OriginPostalCode string `json:"originPostalCode,omitempty"`
+
+ // PercentageAdjustment: Multiplicative shipping rate modifier as a
+ // number in decimal notation. Can be negative. For example "5.4"
+ // increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
+ PercentageAdjustment string `json:"percentageAdjustment,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CarrierName") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CarrierName") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CarrierRate) MarshalJSON() ([]byte, error) {
+ type NoMethod CarrierRate
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type CarriersCarrier struct {
+ // Country: The CLDR country code of the carrier (e.g., "US"). Always
+ // present.
+ Country string `json:"country,omitempty"`
+
+ // Name: The name of the carrier (e.g., "UPS"). Always present.
+ Name string `json:"name,omitempty"`
+
+ // Services: A list of supported services (e.g., "ground") for that
+ // carrier. Contains at least one service.
+ Services []string `json:"services,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CarriersCarrier) MarshalJSON() ([]byte, error) {
+ type NoMethod CarriersCarrier
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type CustomAttribute struct {
+ // GroupValues: Subattributes within this attribute group. Exactly one
+ // of value or groupValues must be provided.
+ GroupValues []*CustomAttribute `json:"groupValues,omitempty"`
+
+ // Name: The name of the attribute. Underscores will be replaced by
+ // spaces upon insertion.
+ Name string `json:"name,omitempty"`
+
+ // Value: The value of the attribute.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "GroupValues") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "GroupValues") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CustomAttribute) MarshalJSON() ([]byte, error) {
+ type NoMethod CustomAttribute
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type CustomerReturnReason struct {
+ Description string `json:"description,omitempty"`
+
+ ReasonCode string `json:"reasonCode,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Description") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Description") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CustomerReturnReason) MarshalJSON() ([]byte, error) {
+ type NoMethod CustomerReturnReason
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type CutoffTime struct {
+ // Hour: Hour of the cutoff time until which an order has to be placed
+ // to be processed in the same day. Required.
+ Hour int64 `json:"hour,omitempty"`
+
+ // Minute: Minute of the cutoff time until which an order has to be
+ // placed to be processed in the same day. Required.
+ Minute int64 `json:"minute,omitempty"`
+
+ // Timezone: Timezone identifier for the cutoff time. A list of
+ // identifiers can be found in the AdWords API documentation. E.g.
+ // "Europe/Zurich". Required.
+ Timezone string `json:"timezone,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Hour") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Hour") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CutoffTime) MarshalJSON() ([]byte, error) {
+ type NoMethod CutoffTime
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Datafeed: Datafeed configuration data.
+type Datafeed struct {
+ // AttributeLanguage: The two-letter ISO 639-1 language in which the
+ // attributes are defined in the data feed.
+ AttributeLanguage string `json:"attributeLanguage,omitempty"`
+
+ // ContentType: The type of data feed. For product inventory feeds, only
+ // feeds for local stores, not online stores, are supported.
+ ContentType string `json:"contentType,omitempty"`
+
+ // FetchSchedule: Fetch schedule for the feed file.
+ FetchSchedule *DatafeedFetchSchedule `json:"fetchSchedule,omitempty"`
+
+ // FileName: The filename of the feed. All feeds must have a unique file
+ // name.
+ FileName string `json:"fileName,omitempty"`
+
+ // Format: Format of the feed file.
+ Format *DatafeedFormat `json:"format,omitempty"`
+
+ // Id: The ID of the data feed.
+ Id int64 `json:"id,omitempty,string"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#datafeed".
+ Kind string `json:"kind,omitempty"`
+
+ // Name: A descriptive name of the data feed.
+ Name string `json:"name,omitempty"`
+
+ // Targets: The targets this feed should apply to (country, language,
+ // destinations).
+ Targets []*DatafeedTarget `json:"targets,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AttributeLanguage")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AttributeLanguage") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Datafeed) MarshalJSON() ([]byte, error) {
+ type NoMethod Datafeed
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedFetchSchedule: The required fields vary based on the
+// frequency of fetching. For a monthly fetch schedule, day_of_month and
+// hour are required. For a weekly fetch schedule, weekday and hour are
+// required. For a daily fetch schedule, only hour is required.
+type DatafeedFetchSchedule struct {
+ // DayOfMonth: The day of the month the feed file should be fetched
+ // (1-31).
+ DayOfMonth int64 `json:"dayOfMonth,omitempty"`
+
+ // FetchUrl: The URL where the feed file can be fetched. Google Merchant
+ // Center will support automatic scheduled uploads using the HTTP,
+ // HTTPS, FTP, or SFTP protocols, so the value will need to be a valid
+ // link using one of those four protocols.
+ FetchUrl string `json:"fetchUrl,omitempty"`
+
+ // Hour: The hour of the day the feed file should be fetched (0-23).
+ Hour int64 `json:"hour,omitempty"`
+
+ // MinuteOfHour: The minute of the hour the feed file should be fetched
+ // (0-59). Read-only.
+ MinuteOfHour int64 `json:"minuteOfHour,omitempty"`
+
+ // Password: An optional password for fetch_url.
+ Password string `json:"password,omitempty"`
+
+ // Paused: Whether the scheduled fetch is paused or not.
+ Paused bool `json:"paused,omitempty"`
+
+ // TimeZone: Time zone used for schedule. UTC by default. E.g.,
+ // "America/Los_Angeles".
+ TimeZone string `json:"timeZone,omitempty"`
+
+ // Username: An optional user name for fetch_url.
+ Username string `json:"username,omitempty"`
+
+ // Weekday: The day of the week the feed file should be fetched.
+ Weekday string `json:"weekday,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DayOfMonth") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DayOfMonth") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedFetchSchedule) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedFetchSchedule
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedFormat struct {
+ // ColumnDelimiter: Delimiter for the separation of values in a
+ // delimiter-separated values feed. If not specified, the delimiter will
+ // be auto-detected. Ignored for non-DSV data feeds.
+ ColumnDelimiter string `json:"columnDelimiter,omitempty"`
+
+ // FileEncoding: Character encoding scheme of the data feed. If not
+ // specified, the encoding will be auto-detected.
+ FileEncoding string `json:"fileEncoding,omitempty"`
+
+ // QuotingMode: Specifies how double quotes are interpreted. If not
+ // specified, the mode will be auto-detected. Ignored for non-DSV data
+ // feeds.
+ QuotingMode string `json:"quotingMode,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ColumnDelimiter") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ColumnDelimiter") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedFormat) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedFormat
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedStatus: The status of a datafeed, i.e., the result of the
+// last retrieval of the datafeed computed asynchronously when the feed
+// processing is finished.
+type DatafeedStatus struct {
+ // Country: The country for which the status is reported, represented as
+ // a CLDR territory code.
+ Country string `json:"country,omitempty"`
+
+ // DatafeedId: The ID of the feed for which the status is reported.
+ DatafeedId uint64 `json:"datafeedId,omitempty,string"`
+
+ // Errors: The list of errors occurring in the feed.
+ Errors []*DatafeedStatusError `json:"errors,omitempty"`
+
+ // ItemsTotal: The number of items in the feed that were processed.
+ ItemsTotal uint64 `json:"itemsTotal,omitempty,string"`
+
+ // ItemsValid: The number of items in the feed that were valid.
+ ItemsValid uint64 `json:"itemsValid,omitempty,string"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#datafeedStatus".
+ Kind string `json:"kind,omitempty"`
+
+ // Language: The two-letter ISO 639-1 language for which the status is
+ // reported.
+ Language string `json:"language,omitempty"`
+
+ // LastUploadDate: The last date at which the feed was uploaded.
+ LastUploadDate string `json:"lastUploadDate,omitempty"`
+
+ // ProcessingStatus: The processing status of the feed.
+ ProcessingStatus string `json:"processingStatus,omitempty"`
+
+ // Warnings: The list of errors occurring in the feed.
+ Warnings []*DatafeedStatusError `json:"warnings,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedStatus) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedStatus
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedStatusError: An error occurring in the feed, like "invalid
+// price".
+type DatafeedStatusError struct {
+ // Code: The code of the error, e.g., "validation/invalid_value".
+ Code string `json:"code,omitempty"`
+
+ // Count: The number of occurrences of the error in the feed.
+ Count uint64 `json:"count,omitempty,string"`
+
+ // Examples: A list of example occurrences of the error, grouped by
+ // product.
+ Examples []*DatafeedStatusExample `json:"examples,omitempty"`
+
+ // Message: The error message, e.g., "Invalid price".
+ Message string `json:"message,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Code") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Code") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedStatusError) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedStatusError
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedStatusExample: An example occurrence for a particular error.
+type DatafeedStatusExample struct {
+ // ItemId: The ID of the example item.
+ ItemId string `json:"itemId,omitempty"`
+
+ // LineNumber: Line number in the data feed where the example is found.
+ LineNumber uint64 `json:"lineNumber,omitempty,string"`
+
+ // Value: The problematic value.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ItemId") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedStatusExample) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedStatusExample
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedTarget struct {
+ // Country: The country where the items in the feed will be included in
+ // the search index, represented as a CLDR territory code.
+ Country string `json:"country,omitempty"`
+
+ // ExcludedDestinations: The list of destinations to exclude for this
+ // target (corresponds to unchecked check boxes in Merchant Center).
+ ExcludedDestinations []string `json:"excludedDestinations,omitempty"`
+
+ // IncludedDestinations: The list of destinations to include for this
+ // target (corresponds to checked check boxes in Merchant Center).
+ // Default destinations are always included unless provided in the
+ // excluded_destination field.
+ IncludedDestinations []string `json:"includedDestinations,omitempty"`
+
+ // Language: The two-letter ISO 639-1 language of the items in the feed.
+ // Must be a valid language for targets[].country.
+ Language string `json:"language,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedTarget) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedTarget
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedsCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*DatafeedsCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedsCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedsCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedsCustomBatchRequestEntry: A batch entry encoding a single
+// non-batch datafeeds request.
+type DatafeedsCustomBatchRequestEntry struct {
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Datafeed: The data feed to insert.
+ Datafeed *Datafeed `json:"datafeed,omitempty"`
+
+ // DatafeedId: The ID of the data feed to get, delete or fetch.
+ DatafeedId uint64 `json:"datafeedId,omitempty,string"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedsCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedsCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*DatafeedsCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#datafeedsCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedsCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedsCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedsCustomBatchResponseEntry: A batch entry encoding a single
+// non-batch datafeeds response.
+type DatafeedsCustomBatchResponseEntry struct {
+ // BatchId: The ID of the request entry this entry responds to.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Datafeed: The requested data feed. Defined if and only if the request
+ // was successful.
+ Datafeed *Datafeed `json:"datafeed,omitempty"`
+
+ // Errors: A list of errors defined if and only if the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedsCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedsFetchNowResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#datafeedsFetchNowResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedsFetchNowResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedsFetchNowResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedsListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#datafeedsListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // datafeeds.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*Datafeed `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedsListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedsListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedstatusesCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*DatafeedstatusesCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedstatusesCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedstatusesCustomBatchRequestEntry: A batch entry encoding a
+// single non-batch datafeedstatuses request.
+type DatafeedstatusesCustomBatchRequestEntry struct {
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Country: The country for which to get the datafeed status. If this
+ // parameter is provided then language must also be provided. Note that
+ // for multi-target datafeeds this parameter is required.
+ Country string `json:"country,omitempty"`
+
+ // DatafeedId: The ID of the data feed to get.
+ DatafeedId uint64 `json:"datafeedId,omitempty,string"`
+
+ // Language: The language for which to get the datafeed status. If this
+ // parameter is provided then country must also be provided. Note that
+ // for multi-target datafeeds this parameter is required.
+ Language string `json:"language,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedstatusesCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedstatusesCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*DatafeedstatusesCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#datafeedstatusesCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedstatusesCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DatafeedstatusesCustomBatchResponseEntry: A batch entry encoding a
+// single non-batch datafeedstatuses response.
+type DatafeedstatusesCustomBatchResponseEntry struct {
+ // BatchId: The ID of the request entry this entry responds to.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // DatafeedStatus: The requested data feed status. Defined if and only
+ // if the request was successful.
+ DatafeedStatus *DatafeedStatus `json:"datafeedStatus,omitempty"`
+
+ // Errors: A list of errors defined if and only if the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedstatusesCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DatafeedstatusesListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#datafeedstatusesListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // datafeed statuses.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*DatafeedStatus `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DatafeedstatusesListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod DatafeedstatusesListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type DeliveryTime struct {
+ // CutoffTime: Business days cutoff time definition. If not configured
+ // the cutoff time will be defaulted to 8AM PST.
+ CutoffTime *CutoffTime `json:"cutoffTime,omitempty"`
+
+ // HolidayCutoffs: Holiday cutoff definitions. If configured, they
+ // specify order cutoff times for holiday-specific shipping.
+ HolidayCutoffs []*HolidayCutoff `json:"holidayCutoffs,omitempty"`
+
+ // MaxHandlingTimeInDays: Maximum number of business days spent before
+ // an order is shipped. 0 means same day shipped, 1 means next day
+ // shipped. Must be greater than or equal to minHandlingTimeInDays.
+ MaxHandlingTimeInDays int64 `json:"maxHandlingTimeInDays,omitempty"`
+
+ // MaxTransitTimeInDays: Maximum number of business days that is spent
+ // in transit. 0 means same day delivery, 1 means next day delivery.
+ // Must be greater than or equal to minTransitTimeInDays. Required.
+ MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"`
+
+ // MinHandlingTimeInDays: Minimum number of business days spent before
+ // an order is shipped. 0 means same day shipped, 1 means next day
+ // shipped.
+ MinHandlingTimeInDays int64 `json:"minHandlingTimeInDays,omitempty"`
+
+ // MinTransitTimeInDays: Minimum number of business days that is spent
+ // in transit. 0 means same day delivery, 1 means next day delivery.
+ // Required.
+ MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CutoffTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CutoffTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DeliveryTime) MarshalJSON() ([]byte, error) {
+ type NoMethod DeliveryTime
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Error: An error returned by the API.
+type Error struct {
+ // Domain: The domain of the error.
+ Domain string `json:"domain,omitempty"`
+
+ // Message: A description of the error.
+ Message string `json:"message,omitempty"`
+
+ // Reason: The error code.
+ Reason string `json:"reason,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Domain") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Domain") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Error) MarshalJSON() ([]byte, error) {
+ type NoMethod Error
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Errors: A list of errors returned by a failed batch entry.
+type Errors struct {
+ // Code: The HTTP status of the first error in errors.
+ Code int64 `json:"code,omitempty"`
+
+ // Errors: A list of errors.
+ Errors []*Error `json:"errors,omitempty"`
+
+ // Message: The message of the first error in errors.
+ Message string `json:"message,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Code") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Code") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Errors) MarshalJSON() ([]byte, error) {
+ type NoMethod Errors
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type GmbAccounts struct {
+ // AccountId: The ID of the account.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // GmbAccounts: A list of GMB accounts which are available to the
+ // merchant.
+ GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *GmbAccounts) MarshalJSON() ([]byte, error) {
+ type NoMethod GmbAccounts
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type GmbAccountsGmbAccount struct {
+ // Email: The email which identifies the GMB account.
+ Email string `json:"email,omitempty"`
+
+ // ListingCount: Number of listings under this account.
+ ListingCount uint64 `json:"listingCount,omitempty,string"`
+
+ // Name: The name of the GMB account.
+ Name string `json:"name,omitempty"`
+
+ // Type: The type of the GMB account (User or Business).
+ Type string `json:"type,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Email") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Email") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *GmbAccountsGmbAccount) MarshalJSON() ([]byte, error) {
+ type NoMethod GmbAccountsGmbAccount
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Headers: A non-empty list of row or column headers for a table.
+// Exactly one of prices, weights, numItems, postalCodeGroupNames, or
+// locations must be set.
+type Headers struct {
+ // Locations: A list of location ID sets. Must be non-empty. Can only be
+ // set if all other fields are not set.
+ Locations []*LocationIdSet `json:"locations,omitempty"`
+
+ // NumberOfItems: A list of inclusive number of items upper bounds. The
+ // last value can be "infinity". For example ["10", "50", "infinity"]
+ // represents the headers "<= 10 items", " 50 items". Must be non-empty.
+ // Can only be set if all other fields are not set.
+ NumberOfItems []string `json:"numberOfItems,omitempty"`
+
+ // PostalCodeGroupNames: A list of postal group names. The last value
+ // can be "all other locations". Example: ["zone 1", "zone 2", "all
+ // other locations"]. The referred postal code groups must match the
+ // delivery country of the service. Must be non-empty. Can only be set
+ // if all other fields are not set.
+ PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"`
+
+ // Prices: A list of inclusive order price upper bounds. The last
+ // price's value can be "infinity". For example [{"value": "10",
+ // "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value":
+ // "infinity", "currency": "USD"}] represents the headers "<= $10", "
+ // $500". All prices within a service must have the same currency. Must
+ // be non-empty. Can only be set if all other fields are not set.
+ Prices []*Price `json:"prices,omitempty"`
+
+ // Weights: A list of inclusive order weight upper bounds. The last
+ // weight's value can be "infinity". For example [{"value": "10",
+ // "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity",
+ // "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights
+ // within a service must have the same unit. Must be non-empty. Can only
+ // be set if all other fields are not set.
+ Weights []*Weight `json:"weights,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Locations") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Locations") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Headers) MarshalJSON() ([]byte, error) {
+ type NoMethod Headers
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type HolidayCutoff struct {
+ // DeadlineDate: Date of the order deadline, in ISO 8601 format. E.g.
+ // "2016-11-29" for 29th November 2016. Required.
+ DeadlineDate string `json:"deadlineDate,omitempty"`
+
+ // DeadlineHour: Hour of the day on the deadline date until which the
+ // order has to be placed to qualify for the delivery guarantee.
+ // Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23.
+ // Required.
+ DeadlineHour int64 `json:"deadlineHour,omitempty"`
+
+ // DeadlineTimezone: Timezone identifier for the deadline hour. A list
+ // of identifiers can be found in the AdWords API documentation. E.g.
+ // "Europe/Zurich". Required.
+ DeadlineTimezone string `json:"deadlineTimezone,omitempty"`
+
+ // HolidayId: Unique identifier for the holiday. Required.
+ HolidayId string `json:"holidayId,omitempty"`
+
+ // VisibleFromDate: Date on which the deadline will become visible to
+ // consumers in ISO 8601 format. E.g. "2016-10-31" for 31st October
+ // 2016. Required.
+ VisibleFromDate string `json:"visibleFromDate,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DeadlineDate") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DeadlineDate") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *HolidayCutoff) MarshalJSON() ([]byte, error) {
+ type NoMethod HolidayCutoff
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type HolidaysHoliday struct {
+ // CountryCode: The CLDR territory code of the country in which the
+ // holiday is available. E.g. "US", "DE", "GB". A holiday cutoff can
+ // only be configured in a shipping settings service with matching
+ // delivery country. Always present.
+ CountryCode string `json:"countryCode,omitempty"`
+
+ // Date: Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for
+ // Christmas 2016. Always present.
+ Date string `json:"date,omitempty"`
+
+ // DeliveryGuaranteeDate: Date on which the order has to arrive at the
+ // customer's, in ISO 8601 format. E.g. "2016-12-24" for 24th December
+ // 2016. Always present.
+ DeliveryGuaranteeDate string `json:"deliveryGuaranteeDate,omitempty"`
+
+ // DeliveryGuaranteeHour: Hour of the day in the delivery location's
+ // timezone on the guaranteed delivery date by which the order has to
+ // arrive at the customer's. Possible values are: 0 (midnight), 1, ...,
+ // 12 (noon), 13, ..., 23. Always present.
+ DeliveryGuaranteeHour uint64 `json:"deliveryGuaranteeHour,omitempty,string"`
+
+ // Id: Unique identifier for the holiday to be used when configuring
+ // holiday cutoffs. Always present.
+ Id string `json:"id,omitempty"`
+
+ // Type: The holiday type. Always present.
+ Type string `json:"type,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CountryCode") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CountryCode") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) {
+ type NoMethod HolidaysHoliday
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Installment struct {
+ // Amount: The amount the buyer has to pay per month.
+ Amount *Price `json:"amount,omitempty"`
+
+ // Months: The number of installments the buyer has to pay.
+ Months int64 `json:"months,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "Amount") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Amount") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Installment) MarshalJSON() ([]byte, error) {
+ type NoMethod Installment
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type InvoiceSummary struct {
+ // AdditionalChargeSummaries: Summary of the total amounts of the
+ // additional charges.
+ AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"`
+
+ // CustomerBalance: [required] Customer balance on this invoice. A
+ // negative amount means the customer is paying, a positive one means
+ // the customer is receiving money. Note: the sum of merchant_balance,
+ // customer_balance and google_balance must always be zero.
+ //
+ // Furthermore the absolute value of this amount is expected to be equal
+ // to the sum of product amount and additional charges, minus
+ // promotions.
+ CustomerBalance *Amount `json:"customerBalance,omitempty"`
+
+ // GoogleBalance: [required] Google balance on this invoice. A negative
+ // amount means Google is paying, a positive one means Google is
+ // receiving money. Note: the sum of merchant_balance, customer_balance
+ // and google_balance must always be zero.
+ GoogleBalance *Amount `json:"googleBalance,omitempty"`
+
+ // MerchantBalance: [required] Merchant balance on this invoice. A
+ // negative amount means the merchant is paying, a positive one means
+ // the merchant is receiving money. Note: the sum of merchant_balance,
+ // customer_balance and google_balance must always be zero.
+ MerchantBalance *Amount `json:"merchantBalance,omitempty"`
+
+ // ProductTotal: [required] Total price for the product.
+ ProductTotal *Amount `json:"productTotal,omitempty"`
+
+ // PromotionSummaries: Summary for each promotion.
+ PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "AdditionalChargeSummaries") to unconditionally include in API
+ // requests. By default, fields with empty values are omitted from API
+ // requests. However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g.
+ // "AdditionalChargeSummaries") to include in API requests with the JSON
+ // null value. By default, fields with empty values are omitted from API
+ // requests. However, any field with an empty value appearing in
+ // NullFields will be sent to the server as null. It is an error if a
+ // field in this list has a non-empty value. This may be used to include
+ // null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *InvoiceSummary) MarshalJSON() ([]byte, error) {
+ type NoMethod InvoiceSummary
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type InvoiceSummaryAdditionalChargeSummary struct {
+ // TotalAmount: [required] Total additional charge for this type.
+ TotalAmount *Amount `json:"totalAmount,omitempty"`
+
+ // Type: [required] Type of the additional charge.
+ Type string `json:"type,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "TotalAmount") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "TotalAmount") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) {
+ type NoMethod InvoiceSummaryAdditionalChargeSummary
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiaAboutPageSettings struct {
+ // Status: The status of the verification process for the About page.
+ Status string `json:"status,omitempty"`
+
+ // Url: The URL for the About page.
+ Url string `json:"url,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Status") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Status") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiaAboutPageSettings) MarshalJSON() ([]byte, error) {
+ type NoMethod LiaAboutPageSettings
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiaCountrySettings struct {
+ // About: The settings for the About page.
+ About *LiaAboutPageSettings `json:"about,omitempty"`
+
+ // Country: CLDR country code (e.g. "US").
+ Country string `json:"country,omitempty"`
+
+ // HostedLocalStorefrontActive: The status of the "Merchant hosted local
+ // storefront" feature.
+ HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"`
+
+ // Inventory: LIA inventory verification settings.
+ Inventory *LiaInventorySettings `json:"inventory,omitempty"`
+
+ // OnDisplayToOrder: LIA "On Display To Order" settings.
+ OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"`
+
+ // PosDataProvider: The POS data provider linked with this country.
+ PosDataProvider *LiaPosDataProvider `json:"posDataProvider,omitempty"`
+
+ // StorePickupActive: The status of the "Store pickup" feature.
+ StorePickupActive bool `json:"storePickupActive,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "About") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "About") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) {
+ type NoMethod LiaCountrySettings
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiaInventorySettings struct {
+ // InventoryVerificationContactEmail: The email of the contact for the
+ // inventory verification process.
+ InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"`
+
+ // InventoryVerificationContactName: The name of the contact for the
+ // inventory verification process.
+ InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"`
+
+ // InventoryVerificationContactStatus: The status of the verification
+ // contact.
+ InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"`
+
+ // Status: The status of the inventory verification process.
+ Status string `json:"status,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "InventoryVerificationContactEmail") to unconditionally include in
+ // API requests. By default, fields with empty values are omitted from
+ // API requests. However, any non-pointer, non-interface field appearing
+ // in ForceSendFields will be sent to the server regardless of whether
+ // the field is empty or not. This may be used to include empty fields
+ // in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g.
+ // "InventoryVerificationContactEmail") to include in API requests with
+ // the JSON null value. By default, fields with empty values are omitted
+ // from API requests. However, any field with an empty value appearing
+ // in NullFields will be sent to the server as null. It is an error if a
+ // field in this list has a non-empty value. This may be used to include
+ // null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) {
+ type NoMethod LiaInventorySettings
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiaOnDisplayToOrderSettings struct {
+ // ShippingCostPolicyUrl: Shipping cost and policy URL.
+ ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"`
+
+ // Status: The status of the ?On display to order? feature.
+ Status string `json:"status,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "ShippingCostPolicyUrl") to unconditionally include in API requests.
+ // By default, fields with empty values are omitted from API requests.
+ // However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ShippingCostPolicyUrl") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) {
+ type NoMethod LiaOnDisplayToOrderSettings
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiaPosDataProvider struct {
+ // PosDataProviderId: The ID of the POS data provider.
+ PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"`
+
+ // PosExternalAccountId: The account ID by which this merchant is known
+ // to the POS data provider.
+ PosExternalAccountId string `json:"posExternalAccountId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "PosDataProviderId")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "PosDataProviderId") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiaPosDataProvider) MarshalJSON() ([]byte, error) {
+ type NoMethod LiaPosDataProvider
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// LiaSettings: Local Inventory ads (LIA) settings. All methods except
+// listposdataproviders require the admin role.
+type LiaSettings struct {
+ // AccountId: The ID of the account to which these LIA settings belong.
+ // Ignored upon update, always present in get request responses.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // CountrySettings: The LIA settings for each country.
+ CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liaSettings".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiaSettings) MarshalJSON() ([]byte, error) {
+ type NoMethod LiaSettings
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsCustomBatchRequestEntry struct {
+ // AccountId: The ID of the account for which to get/update account
+ // shipping settings.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // ContactEmail: Inventory validation contact email. Required only for
+ // SetInventoryValidationContact.
+ ContactEmail string `json:"contactEmail,omitempty"`
+
+ // ContactName: Inventory validation contact name. Required only for
+ // SetInventoryValidationContact.
+ ContactName string `json:"contactName,omitempty"`
+
+ // Country: The country code. Required only for
+ // RequestInventoryVerification.
+ Country string `json:"country,omitempty"`
+
+ // GmbEmail: The GMB account. Required only for RequestGmbAccess.
+ GmbEmail string `json:"gmbEmail,omitempty"`
+
+ // LiaSettings: The account Lia settings to update. Only defined if the
+ // method is update.
+ LiaSettings *LiaSettings `json:"liaSettings,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // PosDataProviderId: The ID of POS data provider. Required only for
+ // SetPosProvider.
+ PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"`
+
+ // PosExternalAccountId: The account ID by which this merchant is known
+ // to the POS provider.
+ PosExternalAccountId string `json:"posExternalAccountId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsCustomBatchResponseEntry struct {
+ // BatchId: The ID of the request entry to which this entry responds.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors defined if, and only if, the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // GmbAccounts: The the list of accessible GMB accounts.
+ GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsCustomBatchResponseEntry".
+ Kind string `json:"kind,omitempty"`
+
+ // LiaSettings: The retrieved or updated Lia settings.
+ LiaSettings *LiaSettings `json:"liaSettings,omitempty"`
+
+ // PosDataProviders: The list of POS data providers.
+ PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsGetAccessibleGmbAccountsResponse struct {
+ // AccountId: The ID of the account.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // GmbAccounts: A list of GMB accounts which are available to the
+ // merchant.
+ GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsGetAccessibleGmbAccountsResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsGetAccessibleGmbAccountsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsListPosDataProvidersResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsListPosDataProvidersResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // PosDataProviders: The list of POS data providers for each eligible
+ // country
+ PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsListPosDataProvidersResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsListPosDataProvidersResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of LIA
+ // settings.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*LiaSettings `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsRequestGmbAccessResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsRequestGmbAccessResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsRequestGmbAccessResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsRequestInventoryVerificationResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsRequestInventoryVerificationResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsRequestInventoryVerificationResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsSetInventoryVerificationContactResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsSetInventoryVerificationContactResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsSetInventoryVerificationContactResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LiasettingsSetPosDataProviderResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#liasettingsSetPosDataProviderResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LiasettingsSetPosDataProviderResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LiasettingsSetPosDataProviderResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LocationIdSet struct {
+ // LocationIds: A non-empty list of location IDs. They must all be of
+ // the same location type (e.g., state).
+ LocationIds []string `json:"locationIds,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LocationIds") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LocationIds") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LocationIdSet) MarshalJSON() ([]byte, error) {
+ type NoMethod LocationIdSet
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type LoyaltyPoints struct {
+ // Name: Name of loyalty points program. It is recommended to limit the
+ // name to 12 full-width characters or 24 Roman characters.
+ Name string `json:"name,omitempty"`
+
+ // PointsValue: The retailer's loyalty points in absolute value.
+ PointsValue int64 `json:"pointsValue,omitempty,string"`
+
+ // Ratio: The ratio of a point when converted to currency. Google
+ // assumes currency based on Merchant Center settings. If ratio is left
+ // out, it defaults to 1.0.
+ Ratio float64 `json:"ratio,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Name") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Name") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LoyaltyPoints) MarshalJSON() ([]byte, error) {
+ type NoMethod LoyaltyPoints
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error {
+ type NoMethod LoyaltyPoints
+ var s1 struct {
+ Ratio gensupport.JSONFloat64 `json:"ratio"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Ratio = float64(s1.Ratio)
+ return nil
+}
+
+type MerchantOrderReturn struct {
+ CreationDate string `json:"creationDate,omitempty"`
+
+ MerchantOrderId string `json:"merchantOrderId,omitempty"`
+
+ OrderId string `json:"orderId,omitempty"`
+
+ OrderReturnId string `json:"orderReturnId,omitempty"`
+
+ ReturnItems []*MerchantOrderReturnItem `json:"returnItems,omitempty"`
+
+ ReturnShipments []*ReturnShipment `json:"returnShipments,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CreationDate") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CreationDate") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *MerchantOrderReturn) MarshalJSON() ([]byte, error) {
+ type NoMethod MerchantOrderReturn
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type MerchantOrderReturnItem struct {
+ CustomerReturnReason *CustomerReturnReason `json:"customerReturnReason,omitempty"`
+
+ ItemId string `json:"itemId,omitempty"`
+
+ MerchantReturnReason *RefundReason `json:"merchantReturnReason,omitempty"`
+
+ Product *OrderLineItemProduct `json:"product,omitempty"`
+
+ ReturnShipmentIds []string `json:"returnShipmentIds,omitempty"`
+
+ State string `json:"state,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "CustomerReturnReason") to unconditionally include in API requests.
+ // By default, fields with empty values are omitted from API requests.
+ // However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CustomerReturnReason") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *MerchantOrderReturnItem) MarshalJSON() ([]byte, error) {
+ type NoMethod MerchantOrderReturnItem
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Order: Order. All methods require the order manager role.
+type Order struct {
+ // Acknowledged: Whether the order was acknowledged.
+ Acknowledged bool `json:"acknowledged,omitempty"`
+
+ // BillingAddress: The billing address.
+ BillingAddress *OrderAddress `json:"billingAddress,omitempty"`
+
+ // ChannelType: The channel type of the order: "purchaseOnGoogle" or
+ // "googleExpress".
+ ChannelType string `json:"channelType,omitempty"`
+
+ // Customer: The details of the customer who placed the order.
+ Customer *OrderCustomer `json:"customer,omitempty"`
+
+ // DeliveryDetails: The details for the delivery.
+ DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"`
+
+ // Id: The REST id of the order. Globally unique.
+ Id string `json:"id,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#order".
+ Kind string `json:"kind,omitempty"`
+
+ // LineItems: Line items that are ordered.
+ LineItems []*OrderLineItem `json:"lineItems,omitempty"`
+
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ // MerchantOrderId: Merchant-provided id of the order.
+ MerchantOrderId string `json:"merchantOrderId,omitempty"`
+
+ // NetAmount: The net amount for the order. For example, if an order was
+ // originally for a grand total of $100 and a refund was issued for $20,
+ // the net amount will be $80.
+ NetAmount *Price `json:"netAmount,omitempty"`
+
+ // PaymentStatus: The status of the payment.
+ PaymentStatus string `json:"paymentStatus,omitempty"`
+
+ // PlacedDate: The date when the order was placed, in ISO 8601 format.
+ PlacedDate string `json:"placedDate,omitempty"`
+
+ // Promotions: Promotions associated with the order.
+ Promotions []*OrderPromotion `json:"promotions,omitempty"`
+
+ // Refunds: Refunds for the order.
+ Refunds []*OrderRefund `json:"refunds,omitempty"`
+
+ // Shipments: Shipments of the order.
+ Shipments []*OrderShipment `json:"shipments,omitempty"`
+
+ // ShippingCost: The total cost of shipping for all items.
+ ShippingCost *Price `json:"shippingCost,omitempty"`
+
+ // ShippingCostTax: The tax for the total shipping cost.
+ ShippingCostTax *Price `json:"shippingCostTax,omitempty"`
+
+ // ShippingOption: The requested shipping option.
+ ShippingOption string `json:"shippingOption,omitempty"`
+
+ // Status: The status of the order.
+ Status string `json:"status,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Acknowledged") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Acknowledged") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Order) MarshalJSON() ([]byte, error) {
+ type NoMethod Order
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderAddress struct {
+ // Country: CLDR country code (e.g. "US").
+ Country string `json:"country,omitempty"`
+
+ // FullAddress: Strings representing the lines of the printed label for
+ // mailing the order, for example:
+ // John Smith
+ // 1600 Amphitheatre Parkway
+ // Mountain View, CA, 94043
+ // United States
+ FullAddress []string `json:"fullAddress,omitempty"`
+
+ // IsPostOfficeBox: Whether the address is a post office box.
+ IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"`
+
+ // Locality: City, town or commune. May also include dependent
+ // localities or sublocalities (e.g. neighborhoods or suburbs).
+ Locality string `json:"locality,omitempty"`
+
+ // PostalCode: Postal Code or ZIP (e.g. "94043").
+ PostalCode string `json:"postalCode,omitempty"`
+
+ // RecipientName: Name of the recipient.
+ RecipientName string `json:"recipientName,omitempty"`
+
+ // Region: Top-level administrative subdivision of the country. For
+ // example, a state like California ("CA") or a province like Quebec
+ // ("QC").
+ Region string `json:"region,omitempty"`
+
+ // StreetAddress: Street-level part of the address.
+ StreetAddress []string `json:"streetAddress,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderAddress) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderAddress
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderCancellation struct {
+ // Actor: The actor that created the cancellation.
+ Actor string `json:"actor,omitempty"`
+
+ // CreationDate: Date on which the cancellation has been created, in ISO
+ // 8601 format.
+ CreationDate string `json:"creationDate,omitempty"`
+
+ // Quantity: The quantity that was canceled.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // Reason: The reason for the cancellation. Orders that are cancelled
+ // with a noInventory reason will lead to the removal of the product
+ // from Shopping Actions until you make an update to that product. This
+ // will not affect your Shopping ads.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Actor") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Actor") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderCancellation) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderCancellation
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderCustomer struct {
+ // Email: Deprecated.
+ Email string `json:"email,omitempty"`
+
+ // FullName: Full name of the customer.
+ FullName string `json:"fullName,omitempty"`
+
+ // MarketingRightsInfo: Customer's marketing preferences.
+ MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Email") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Email") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderCustomer) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderCustomer
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderCustomerMarketingRightsInfo struct {
+ // ExplicitMarketingPreference: Last known user selection regarding
+ // marketing preferences. In certain cases this selection might not be
+ // known, so this field would be empty.
+ ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"`
+
+ // LastUpdatedTimestamp: Timestamp when last time marketing preference
+ // was updated. Could be empty, if user wasn't offered a selection yet.
+ LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"`
+
+ // MarketingEmailAddress: Email address that can be used for marketing
+ // purposes. This field is only filled when explicitMarketingPreference
+ // is equal to 'granted'.
+ MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "ExplicitMarketingPreference") to unconditionally include in API
+ // requests. By default, fields with empty values are omitted from API
+ // requests. However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g.
+ // "ExplicitMarketingPreference") to include in API requests with the
+ // JSON null value. By default, fields with empty values are omitted
+ // from API requests. However, any field with an empty value appearing
+ // in NullFields will be sent to the server as null. It is an error if a
+ // field in this list has a non-empty value. This may be used to include
+ // null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderCustomerMarketingRightsInfo
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderDeliveryDetails struct {
+ // Address: The delivery address
+ Address *OrderAddress `json:"address,omitempty"`
+
+ // PhoneNumber: The phone number of the person receiving the delivery.
+ PhoneNumber string `json:"phoneNumber,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Address") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Address") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderDeliveryDetails
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderLineItem struct {
+ // Annotations: Annotations that are attached to the line item.
+ Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"`
+
+ // Cancellations: Cancellations of the line item.
+ Cancellations []*OrderCancellation `json:"cancellations,omitempty"`
+
+ // Id: The id of the line item.
+ Id string `json:"id,omitempty"`
+
+ // Price: Total price for the line item. For example, if two items for
+ // $10 are purchased, the total price will be $20.
+ Price *Price `json:"price,omitempty"`
+
+ // Product: Product data as seen by customer from the time of the order
+ // placement. Note that certain attributes values (e.g. title or gtin)
+ // might be reformatted and no longer match values submitted via product
+ // feed.
+ Product *OrderLineItemProduct `json:"product,omitempty"`
+
+ // QuantityCanceled: Number of items canceled.
+ QuantityCanceled int64 `json:"quantityCanceled,omitempty"`
+
+ // QuantityDelivered: Number of items delivered.
+ QuantityDelivered int64 `json:"quantityDelivered,omitempty"`
+
+ // QuantityOrdered: Number of items ordered.
+ QuantityOrdered int64 `json:"quantityOrdered,omitempty"`
+
+ // QuantityPending: Number of items pending.
+ QuantityPending int64 `json:"quantityPending,omitempty"`
+
+ // QuantityReturned: Number of items returned.
+ QuantityReturned int64 `json:"quantityReturned,omitempty"`
+
+ // QuantityShipped: Number of items shipped.
+ QuantityShipped int64 `json:"quantityShipped,omitempty"`
+
+ // ReturnInfo: Details of the return policy for the line item.
+ ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"`
+
+ // Returns: Returns of the line item.
+ Returns []*OrderReturn `json:"returns,omitempty"`
+
+ // ShippingDetails: Details of the requested shipping for the line item.
+ ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"`
+
+ // Tax: Total tax amount for the line item. For example, if two items
+ // are purchased, and each have a cost tax of $2, the total tax amount
+ // will be $4.
+ Tax *Price `json:"tax,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Annotations") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Annotations") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderLineItem) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderLineItem
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderLineItemProduct struct {
+ // Brand: Brand of the item.
+ Brand string `json:"brand,omitempty"`
+
+ // Channel: The item's channel (online or local).
+ Channel string `json:"channel,omitempty"`
+
+ // Condition: Condition or state of the item.
+ Condition string `json:"condition,omitempty"`
+
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Fees: Associated fees at order creation time.
+ Fees []*OrderLineItemProductFee `json:"fees,omitempty"`
+
+ // Gtin: Global Trade Item Number (GTIN) of the item.
+ Gtin string `json:"gtin,omitempty"`
+
+ // Id: The REST id of the product.
+ Id string `json:"id,omitempty"`
+
+ // ImageLink: URL of an image of the item.
+ ImageLink string `json:"imageLink,omitempty"`
+
+ // ItemGroupId: Shared identifier for all variants of the same product.
+ ItemGroupId string `json:"itemGroupId,omitempty"`
+
+ // Mpn: Manufacturer Part Number (MPN) of the item.
+ Mpn string `json:"mpn,omitempty"`
+
+ // OfferId: An identifier of the item.
+ OfferId string `json:"offerId,omitempty"`
+
+ // Price: Price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // ShownImage: URL to the cached image shown to the user when order was
+ // placed.
+ ShownImage string `json:"shownImage,omitempty"`
+
+ // TargetCountry: The CLDR territory code of the target country of the
+ // product.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Title: The title of the product.
+ Title string `json:"title,omitempty"`
+
+ // VariantAttributes: Variant attributes for the item. These are
+ // dimensions of the product, such as color, gender, material, pattern,
+ // and size. You can find a comprehensive list of variant attributes
+ // here.
+ VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Brand") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Brand") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderLineItemProduct) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderLineItemProduct
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderLineItemProductFee struct {
+ // Amount: Amount of the fee.
+ Amount *Price `json:"amount,omitempty"`
+
+ // Name: Name of the fee.
+ Name string `json:"name,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Amount") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Amount") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderLineItemProductFee) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderLineItemProductFee
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderLineItemProductVariantAttribute struct {
+ // Dimension: The dimension of the variant.
+ Dimension string `json:"dimension,omitempty"`
+
+ // Value: The value for the dimension.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Dimension") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Dimension") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderLineItemProductVariantAttribute
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderLineItemReturnInfo struct {
+ // DaysToReturn: How many days later the item can be returned.
+ DaysToReturn int64 `json:"daysToReturn,omitempty"`
+
+ // IsReturnable: Whether the item is returnable.
+ IsReturnable bool `json:"isReturnable,omitempty"`
+
+ // PolicyUrl: URL of the item return policy.
+ PolicyUrl string `json:"policyUrl,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DaysToReturn") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DaysToReturn") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderLineItemReturnInfo
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderLineItemShippingDetails struct {
+ // DeliverByDate: The delivery by date, in ISO 8601 format.
+ DeliverByDate string `json:"deliverByDate,omitempty"`
+
+ // Method: Details of the shipping method.
+ Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"`
+
+ // ShipByDate: The ship by date, in ISO 8601 format.
+ ShipByDate string `json:"shipByDate,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DeliverByDate") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DeliverByDate") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderLineItemShippingDetails
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderLineItemShippingDetailsMethod struct {
+ // Carrier: The carrier for the shipping. Optional. See
+ // shipments[].carrier for a list of acceptable values.
+ Carrier string `json:"carrier,omitempty"`
+
+ // MaxDaysInTransit: Maximum transit time.
+ MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"`
+
+ // MethodName: The name of the shipping method.
+ MethodName string `json:"methodName,omitempty"`
+
+ // MinDaysInTransit: Minimum transit time.
+ MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Carrier") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Carrier") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderLineItemShippingDetailsMethod
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderMerchantProvidedAnnotation struct {
+ // Key: Key for additional merchant provided (as key-value pairs)
+ // annotation about the line item.
+ Key string `json:"key,omitempty"`
+
+ // Value: Value for additional merchant provided (as key-value pairs)
+ // annotation about the line item.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Key") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Key") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderMerchantProvidedAnnotation
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderPromotion struct {
+ // ApplicableItems: Items which this promotion may be applied to. If
+ // empty, there are no restrictions on applicable items and quantity.
+ ApplicableItems []*OrderPromotionItem `json:"applicableItems,omitempty"`
+
+ // AppliedItems: Items which this promotion have been applied to.
+ AppliedItems []*OrderPromotionItem `json:"appliedItems,omitempty"`
+
+ // Funder: The party funding the promotion.
+ Funder string `json:"funder,omitempty"`
+
+ // MerchantPromotionId: This field is used to identify promotions within
+ // merchants' own systems.
+ MerchantPromotionId string `json:"merchantPromotionId,omitempty"`
+
+ // PretaxValue: Estimated discount applied to pre-tax amount.
+ PretaxValue *Price `json:"pretaxValue,omitempty"`
+
+ // ShortTitle: A short title of the promotion to be shown on the
+ // checkout page.
+ ShortTitle string `json:"shortTitle,omitempty"`
+
+ // Subtype: The category of the promotion.
+ Subtype string `json:"subtype,omitempty"`
+
+ // TaxValue: Estimated discount applied to tax (if allowed by law).
+ TaxValue *Price `json:"taxValue,omitempty"`
+
+ // Title: The title of the promotion.
+ Title string `json:"title,omitempty"`
+
+ // Type: The scope of the promotion.
+ Type string `json:"type,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ApplicableItems") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ApplicableItems") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderPromotion) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderPromotion
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderPromotionItem struct {
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ ProductId string `json:"productId,omitempty"`
+
+ // Quantity: The quantity of the associated product.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderPromotionItem) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderPromotionItem
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderRefund struct {
+ // Actor: The actor that created the refund.
+ Actor string `json:"actor,omitempty"`
+
+ // Amount: The amount that is refunded.
+ Amount *Price `json:"amount,omitempty"`
+
+ // CreationDate: Date on which the item has been created, in ISO 8601
+ // format.
+ CreationDate string `json:"creationDate,omitempty"`
+
+ // Reason: The reason for the refund.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Actor") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Actor") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderRefund) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderRefund
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// OrderReportDisbursement: Order disbursement. All methods require the
+// payment analyst role.
+type OrderReportDisbursement struct {
+ // DisbursementAmount: The disbursement amount.
+ DisbursementAmount *Price `json:"disbursementAmount,omitempty"`
+
+ // DisbursementCreationDate: The disbursement date, in ISO 8601 format.
+ DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"`
+
+ // DisbursementDate: The date the disbursement was initiated, in ISO
+ // 8601 format.
+ DisbursementDate string `json:"disbursementDate,omitempty"`
+
+ // DisbursementId: The ID of the disbursement.
+ DisbursementId string `json:"disbursementId,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "DisbursementAmount")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DisbursementAmount") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderReportDisbursement) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderReportDisbursement
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderReportTransaction struct {
+ // DisbursementAmount: The disbursement amount.
+ DisbursementAmount *Price `json:"disbursementAmount,omitempty"`
+
+ // DisbursementCreationDate: The date the disbursement was created, in
+ // ISO 8601 format.
+ DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"`
+
+ // DisbursementDate: The date the disbursement was initiated, in ISO
+ // 8601 format.
+ DisbursementDate string `json:"disbursementDate,omitempty"`
+
+ // DisbursementId: The ID of the disbursement.
+ DisbursementId string `json:"disbursementId,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ // MerchantOrderId: Merchant-provided id of the order.
+ MerchantOrderId string `json:"merchantOrderId,omitempty"`
+
+ // OrderId: The id of the order.
+ OrderId string `json:"orderId,omitempty"`
+
+ // ProductAmount: Total amount for the items.
+ ProductAmount *Amount `json:"productAmount,omitempty"`
+
+ // TransactionDate: The date of the transaction, in ISO 8601 format.
+ TransactionDate string `json:"transactionDate,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DisbursementAmount")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DisbursementAmount") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderReportTransaction) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderReportTransaction
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderReturn struct {
+ // Actor: The actor that created the refund.
+ Actor string `json:"actor,omitempty"`
+
+ // CreationDate: Date on which the item has been created, in ISO 8601
+ // format.
+ CreationDate string `json:"creationDate,omitempty"`
+
+ // Quantity: Quantity that is returned.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // Reason: The reason for the return.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Actor") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Actor") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderReturn) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderReturn
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderShipment struct {
+ // Carrier: The carrier handling the shipment.
+ //
+ // Acceptable values for US are:
+ // - "gsx"
+ // - "ups"
+ // - "usps"
+ // - "fedex"
+ // - "dhl"
+ // - "ecourier"
+ // - "cxt"
+ // - "google"
+ // - "ontrac"
+ // - "emsy"
+ // - "ont"
+ // - "deliv"
+ // - "dynamex"
+ // - "lasership"
+ // - "mpx"
+ // - "uds"
+ //
+ // Acceptable values for FR are:
+ // - "colissimo"
+ // - "chronopost"
+ Carrier string `json:"carrier,omitempty"`
+
+ // CreationDate: Date on which the shipment has been created, in ISO
+ // 8601 format.
+ CreationDate string `json:"creationDate,omitempty"`
+
+ // DeliveryDate: Date on which the shipment has been delivered, in ISO
+ // 8601 format. Present only if status is delivered
+ DeliveryDate string `json:"deliveryDate,omitempty"`
+
+ // Id: The id of the shipment.
+ Id string `json:"id,omitempty"`
+
+ // LineItems: The line items that are shipped.
+ LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"`
+
+ // Status: The status of the shipment.
+ Status string `json:"status,omitempty"`
+
+ // TrackingId: The tracking id for the shipment.
+ TrackingId string `json:"trackingId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Carrier") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Carrier") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderShipment) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderShipment
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderShipmentLineItemShipment struct {
+ // LineItemId: The id of the line item that is shipped. Either
+ // lineItemId or productId is required.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // ProductId: The ID of the product to ship. This is the REST ID used in
+ // the products service. Either lineItemId or productId is required.
+ ProductId string `json:"productId,omitempty"`
+
+ // Quantity: The quantity that is shipped.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderShipmentLineItemShipment
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderinvoicesCreateChargeInvoiceRequest struct {
+ // InvoiceId: [required] The ID of the invoice.
+ InvoiceId string `json:"invoiceId,omitempty"`
+
+ // InvoiceSummary: [required] Invoice summary.
+ InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"`
+
+ // LineItemInvoices: [required] Invoice details per line item.
+ LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"`
+
+ // OperationId: [required] The ID of the operation, unique across all
+ // operations for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ShipmentGroupId: [required] ID of the shipment group.
+ ShipmentGroupId string `json:"shipmentGroupId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "InvoiceId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "InvoiceId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderinvoicesCreateChargeInvoiceRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderinvoicesCreateChargeInvoiceResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderinvoicesCreateChargeInvoiceResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderinvoicesCreateChargeInvoiceResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderinvoicesCreateRefundInvoiceRequest struct {
+ // InvoiceId: [required] The ID of the invoice.
+ InvoiceId string `json:"invoiceId,omitempty"`
+
+ // OperationId: [required] The ID of the operation, unique across all
+ // operations for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // RefundOnlyOption: Option to create a refund-only invoice. Exactly one
+ // of refundOnlyOption or returnOption must be provided.
+ RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"`
+
+ // ReturnOption: Option to create an invoice for a refund and mark all
+ // items within the invoice as returned. Exactly one of refundOnlyOption
+ // or returnOption must be provided.
+ ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"`
+
+ // ShipmentInvoices: Invoice details for different shipment groups.
+ ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "InvoiceId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "InvoiceId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderinvoicesCreateRefundInvoiceRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderinvoicesCreateRefundInvoiceResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderinvoicesCreateRefundInvoiceResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderinvoicesCreateRefundInvoiceResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct {
+ // Description: Optional description of the refund reason.
+ Description string `json:"description,omitempty"`
+
+ // Reason: [required] Reason for the refund.
+ Reason string `json:"reason,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Description") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Description") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct {
+ // Description: Optional description of the return reason.
+ Description string `json:"description,omitempty"`
+
+ // Reason: [required] Reason for the return.
+ Reason string `json:"reason,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Description") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Description") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyAuthApprovedRequest struct {
+ AuthAmountPretax *Price `json:"authAmountPretax,omitempty"`
+
+ AuthAmountTax *Price `json:"authAmountTax,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AuthAmountPretax") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AuthAmountPretax") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyAuthApprovedRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyAuthApprovedRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyAuthApprovedResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderpaymentsNotifyAuthApprovedResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyAuthApprovedResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyAuthApprovedResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyAuthDeclinedRequest struct {
+ // DeclineReason: Reason why payment authorization was declined.
+ DeclineReason string `json:"declineReason,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DeclineReason") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DeclineReason") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyAuthDeclinedRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyAuthDeclinedRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyAuthDeclinedResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderpaymentsNotifyAuthDeclinedResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyAuthDeclinedResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyAuthDeclinedResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyChargeRequest struct {
+ // ChargeState: Whether charge was successful.
+ ChargeState string `json:"chargeState,omitempty"`
+
+ // InvoiceIds: Invoice IDs from the orderinvoices service that
+ // correspond to the charge.
+ InvoiceIds []string `json:"invoiceIds,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ChargeState") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ChargeState") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyChargeRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyChargeRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyChargeResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderpaymentsNotifyChargeResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyChargeResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyChargeResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyRefundRequest struct {
+ // InvoiceIds: Invoice IDs from the orderinvoices service that
+ // correspond to the refund.
+ InvoiceIds []string `json:"invoiceIds,omitempty"`
+
+ // RefundState: Whether refund was successful.
+ RefundState string `json:"refundState,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "InvoiceIds") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "InvoiceIds") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyRefundRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyRefundRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderpaymentsNotifyRefundResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderpaymentsNotifyRefundResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderpaymentsNotifyRefundResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderpaymentsNotifyRefundResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderreportsListDisbursementsResponse struct {
+ // Disbursements: The list of disbursements.
+ Disbursements []*OrderReportDisbursement `json:"disbursements,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderreportsListDisbursementsResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // disbursements.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Disbursements") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Disbursements") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderreportsListDisbursementsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderreportsListDisbursementsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderreportsListTransactionsResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderreportsListTransactionsResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // transactions.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // Transactions: The list of transactions.
+ Transactions []*OrderReportTransaction `json:"transactions,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderreportsListTransactionsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderreportsListTransactionsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrderreturnsListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#orderreturnsListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // returns.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*MerchantOrderReturn `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrderreturnsListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrderreturnsListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersAcknowledgeRequest struct {
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "OperationId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "OperationId") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersAcknowledgeRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersAcknowledgeResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersAcknowledgeResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersAcknowledgeResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersAdvanceTestOrderResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersAdvanceTestOrderResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersAdvanceTestOrderResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCancelLineItemRequest struct {
+ // LineItemId: The ID of the line item to cancel. Either lineItemId or
+ // productId is required.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ProductId: The ID of the product to cancel. This is the REST ID used
+ // in the products service. Either lineItemId or productId is required.
+ ProductId string `json:"productId,omitempty"`
+
+ // Quantity: The quantity to cancel.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // Reason: The reason for the cancellation.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCancelLineItemRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCancelLineItemResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersCancelLineItemResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCancelLineItemResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCancelRequest struct {
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // Reason: The reason for the cancellation.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "OperationId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "OperationId") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCancelRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCancelResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersCancelResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCancelResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCancelTestOrderByCustomerRequest struct {
+ // Reason: The reason for the cancellation.
+ Reason string `json:"reason,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Reason") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Reason") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCancelTestOrderByCustomerRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCancelTestOrderByCustomerResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersCancelTestOrderByCustomerResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCancelTestOrderByCustomerResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCreateTestOrderRequest struct {
+ // Country: The CLDR territory code of the country of the test order to
+ // create. Affects the currency and addresses of orders created via
+ // template_name, or the addresses of orders created via
+ // test_order.
+ //
+ // Acceptable values are:
+ // - "US"
+ // - "FR" Defaults to US.
+ Country string `json:"country,omitempty"`
+
+ // TemplateName: The test order template to use. Specify as an
+ // alternative to testOrder as a shortcut for retrieving a template and
+ // then creating an order using that template.
+ TemplateName string `json:"templateName,omitempty"`
+
+ // TestOrder: The test order to create.
+ TestOrder *TestOrder `json:"testOrder,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCreateTestOrderRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCreateTestOrderResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersCreateTestOrderResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // OrderId: The ID of the newly created test order.
+ OrderId string `json:"orderId,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCreateTestOrderResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCreateTestReturnRequest struct {
+ // Items: Returned items.
+ Items []*OrdersCustomBatchRequestEntryCreateTestReturnReturnItem `json:"items,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Items") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Items") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCreateTestReturnRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCreateTestReturnResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersCreateTestReturnResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ReturnId: The ID of the newly created test order return.
+ ReturnId string `json:"returnId,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCreateTestReturnResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCustomBatchRequestEntryCreateTestReturnReturnItem struct {
+ // LineItemId: The ID of the line item to return.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // Quantity: Quantity that is returned.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct {
+ // Carrier: The carrier handling the shipment. See shipments[].carrier
+ // in the Orders resource representation for a list of acceptable
+ // values.
+ Carrier string `json:"carrier,omitempty"`
+
+ // ShipmentId: The ID of the shipment.
+ ShipmentId string `json:"shipmentId,omitempty"`
+
+ // TrackingId: The tracking id for the shipment.
+ TrackingId string `json:"trackingId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Carrier") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Carrier") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersGetByMerchantOrderIdResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersGetByMerchantOrderIdResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // Order: The requested order.
+ Order *Order `json:"order,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersGetByMerchantOrderIdResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersGetTestOrderTemplateResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersGetTestOrderTemplateResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // Template: The requested test order template.
+ Template *TestOrder `json:"template,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersGetTestOrderTemplateResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersInStoreRefundLineItemRequest struct {
+ // LineItemId: The ID of the line item to return. Either lineItemId or
+ // productId is required.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // PriceAmount: The amount to be refunded. This may be pre-tax or
+ // post-tax depending on the location of the order. Required.
+ PriceAmount *Price `json:"priceAmount,omitempty"`
+
+ // ProductId: The ID of the product to return. This is the REST ID used
+ // in the products service. Either lineItemId or productId is required.
+ ProductId string `json:"productId,omitempty"`
+
+ // Quantity: The quantity to return and refund.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // Reason: The reason for the return.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // TaxAmount: The amount of tax to be refunded. Required.
+ TaxAmount *Price `json:"taxAmount,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersInStoreRefundLineItemRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersInStoreRefundLineItemResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersInStoreRefundLineItemResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersInStoreRefundLineItemResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // orders.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*Order `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersRejectReturnLineItemRequest struct {
+ // LineItemId: The ID of the line item to return. Either lineItemId or
+ // productId is required.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ProductId: The ID of the product to return. This is the REST ID used
+ // in the products service. Either lineItemId or productId is required.
+ ProductId string `json:"productId,omitempty"`
+
+ // Quantity: The quantity to return and refund.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // Reason: The reason for the return.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersRejectReturnLineItemRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersRejectReturnLineItemResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersRejectReturnLineItemResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersRejectReturnLineItemResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersReturnRefundLineItemRequest struct {
+ // LineItemId: The ID of the line item to return. Either lineItemId or
+ // productId is required.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // PriceAmount: The amount to be refunded. This may be pre-tax or
+ // post-tax depending on the location of the order. If omitted,
+ // refundless return is assumed. Optional, but if filled then both
+ // priceAmount and taxAmount must be set.
+ PriceAmount *Price `json:"priceAmount,omitempty"`
+
+ // ProductId: The ID of the product to return. This is the REST ID used
+ // in the products service. Either lineItemId or productId is required.
+ ProductId string `json:"productId,omitempty"`
+
+ // Quantity: The quantity to return and refund.
+ Quantity int64 `json:"quantity,omitempty"`
+
+ // Reason: The reason for the return.
+ Reason string `json:"reason,omitempty"`
+
+ // ReasonText: The explanation of the reason.
+ ReasonText string `json:"reasonText,omitempty"`
+
+ // TaxAmount: The amount of tax to be refunded.
+ TaxAmount *Price `json:"taxAmount,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersReturnRefundLineItemRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersReturnRefundLineItemResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersReturnRefundLineItemResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersReturnRefundLineItemResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersSetLineItemMetadataRequest struct {
+ Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"`
+
+ // LineItemId: The ID of the line item to set metadata. Either
+ // lineItemId or productId is required.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ProductId: The ID of the product to set metadata. This is the REST ID
+ // used in the products service. Either lineItemId or productId is
+ // required.
+ ProductId string `json:"productId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Annotations") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Annotations") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersSetLineItemMetadataRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersSetLineItemMetadataResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersSetLineItemMetadataResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersSetLineItemMetadataResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersShipLineItemsRequest struct {
+ // LineItems: Line items to ship.
+ LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ShipmentGroupId: ID of the shipment group. Required for orders that
+ // use the orderinvoices service.
+ ShipmentGroupId string `json:"shipmentGroupId,omitempty"`
+
+ // ShipmentInfos: Shipment information. This field is repeated because a
+ // single line item can be shipped in several packages (and have several
+ // tracking IDs).
+ ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItems") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItems") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersShipLineItemsRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersShipLineItemsResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersShipLineItemsResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersShipLineItemsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersUpdateLineItemShippingDetailsRequest struct {
+ // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not
+ // specified only ship by date is updated.
+ DeliverByDate string `json:"deliverByDate,omitempty"`
+
+ // LineItemId: The ID of the line item to set metadata. Either
+ // lineItemId or productId is required.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ProductId: The ID of the product to set metadata. This is the REST ID
+ // used in the products service. Either lineItemId or productId is
+ // required.
+ ProductId string `json:"productId,omitempty"`
+
+ // ShipByDate: Updated ship by date, in ISO 8601 format. If not
+ // specified only deliver by date is updated.
+ ShipByDate string `json:"shipByDate,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "DeliverByDate") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DeliverByDate") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersUpdateLineItemShippingDetailsRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersUpdateLineItemShippingDetailsResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersUpdateLineItemShippingDetailsResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersUpdateLineItemShippingDetailsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersUpdateMerchantOrderIdRequest struct {
+ // MerchantOrderId: The merchant order id to be assigned to the order.
+ // Must be unique per merchant.
+ MerchantOrderId string `json:"merchantOrderId,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "MerchantOrderId") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersUpdateMerchantOrderIdRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersUpdateMerchantOrderIdResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersUpdateMerchantOrderIdResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersUpdateMerchantOrderIdResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersUpdateShipmentRequest struct {
+ // Carrier: The carrier handling the shipment. Not updated if missing.
+ // See shipments[].carrier in the Orders resource representation for a
+ // list of acceptable values.
+ Carrier string `json:"carrier,omitempty"`
+
+ // DeliveryDate: Date on which the shipment has been delivered, in ISO
+ // 8601 format. Optional and can be provided only if status is
+ // delivered.
+ DeliveryDate string `json:"deliveryDate,omitempty"`
+
+ // OperationId: The ID of the operation. Unique across all operations
+ // for a given order.
+ OperationId string `json:"operationId,omitempty"`
+
+ // ShipmentId: The ID of the shipment.
+ ShipmentId string `json:"shipmentId,omitempty"`
+
+ // Status: New status for the shipment. Not updated if missing.
+ Status string `json:"status,omitempty"`
+
+ // TrackingId: The tracking id for the shipment. Not updated if missing.
+ TrackingId string `json:"trackingId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Carrier") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Carrier") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersUpdateShipmentRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type OrdersUpdateShipmentResponse struct {
+ // ExecutionStatus: The status of the execution.
+ ExecutionStatus string `json:"executionStatus,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#ordersUpdateShipmentResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExecutionStatus") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod OrdersUpdateShipmentResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod PosCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosCustomBatchRequestEntry struct {
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Inventory: The inventory to submit. Set this only if the method is
+ // inventory.
+ Inventory *PosInventory `json:"inventory,omitempty"`
+
+ // MerchantId: The ID of the POS data provider.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // Sale: The sale information to submit. Set this only if the method is
+ // sale.
+ Sale *PosSale `json:"sale,omitempty"`
+
+ // Store: The store information to submit. Set this only if the method
+ // is insert.
+ Store *PosStore `json:"store,omitempty"`
+
+ // StoreCode: The store code. Set this only if the method is delete or
+ // get.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // TargetMerchantId: The ID of the account for which to get/submit data.
+ TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod PosCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod PosCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosCustomBatchResponseEntry struct {
+ // BatchId: The ID of the request entry to which this entry responds.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors defined if, and only if, the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // Inventory: The updated inventory information.
+ Inventory *PosInventory `json:"inventory,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posCustomBatchResponseEntry".
+ Kind string `json:"kind,omitempty"`
+
+ // Sale: The updated sale information.
+ Sale *PosSale `json:"sale,omitempty"`
+
+ // Store: The retrieved or updated store information.
+ Store *PosStore `json:"store,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod PosCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosDataProviders struct {
+ // Country: Country code.
+ Country string `json:"country,omitempty"`
+
+ // PosDataProviders: A list of POS data providers.
+ PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosDataProviders) MarshalJSON() ([]byte, error) {
+ type NoMethod PosDataProviders
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosDataProvidersPosDataProvider struct {
+ // DisplayName: The display name of Pos data Provider.
+ DisplayName string `json:"displayName,omitempty"`
+
+ // FullName: The full name of this POS data Provider.
+ FullName string `json:"fullName,omitempty"`
+
+ // ProviderId: The ID of the account.
+ ProviderId uint64 `json:"providerId,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "DisplayName") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DisplayName") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) {
+ type NoMethod PosDataProvidersPosDataProvider
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PosInventory: The absolute quantity of an item available at the given
+// store.
+type PosInventory struct {
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Gtin: Global Trade Item Number.
+ Gtin string `json:"gtin,omitempty"`
+
+ // ItemId: A unique identifier for the item.
+ ItemId string `json:"itemId,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posInventory".
+ Kind string `json:"kind,omitempty"`
+
+ // Price: The current price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // Quantity: The available quantity of the item.
+ Quantity int64 `json:"quantity,omitempty,string"`
+
+ // StoreCode: The identifier of the merchant's store. Either a storeCode
+ // inserted via the API or the code of the store in Google My Business.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // TargetCountry: The CLDR territory code for the item.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Timestamp: The inventory timestamp, in ISO 8601 format.
+ Timestamp string `json:"timestamp,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ContentLanguage") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosInventory) MarshalJSON() ([]byte, error) {
+ type NoMethod PosInventory
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosInventoryRequest struct {
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Gtin: Global Trade Item Number.
+ Gtin string `json:"gtin,omitempty"`
+
+ // ItemId: A unique identifier for the item.
+ ItemId string `json:"itemId,omitempty"`
+
+ // Price: The current price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // Quantity: The available quantity of the item.
+ Quantity int64 `json:"quantity,omitempty,string"`
+
+ // StoreCode: The identifier of the merchant's store. Either a storeCode
+ // inserted via the API or the code of the store in Google My Business.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // TargetCountry: The CLDR territory code for the item.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Timestamp: The inventory timestamp, in ISO 8601 format.
+ Timestamp string `json:"timestamp,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ContentLanguage") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosInventoryRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod PosInventoryRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosInventoryResponse struct {
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Gtin: Global Trade Item Number.
+ Gtin string `json:"gtin,omitempty"`
+
+ // ItemId: A unique identifier for the item.
+ ItemId string `json:"itemId,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posInventoryResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // Price: The current price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // Quantity: The available quantity of the item.
+ Quantity int64 `json:"quantity,omitempty,string"`
+
+ // StoreCode: The identifier of the merchant's store. Either a storeCode
+ // inserted via the API or the code of the store in Google My Business.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // TargetCountry: The CLDR territory code for the item.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Timestamp: The inventory timestamp, in ISO 8601 format.
+ Timestamp string `json:"timestamp,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ContentLanguage") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosInventoryResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod PosInventoryResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ Resources []*PosStore `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod PosListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PosSale: The change of the available quantity of an item at the given
+// store.
+type PosSale struct {
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Gtin: Global Trade Item Number.
+ Gtin string `json:"gtin,omitempty"`
+
+ // ItemId: A unique identifier for the item.
+ ItemId string `json:"itemId,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posSale".
+ Kind string `json:"kind,omitempty"`
+
+ // Price: The price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // Quantity: The relative change of the available quantity. Negative for
+ // items returned.
+ Quantity int64 `json:"quantity,omitempty,string"`
+
+ // SaleId: A unique ID to group items from the same sale event.
+ SaleId string `json:"saleId,omitempty"`
+
+ // StoreCode: The identifier of the merchant's store. Either a storeCode
+ // inserted via the API or the code of the store in Google My Business.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // TargetCountry: The CLDR territory code for the item.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Timestamp: The inventory timestamp, in ISO 8601 format.
+ Timestamp string `json:"timestamp,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ContentLanguage") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosSale) MarshalJSON() ([]byte, error) {
+ type NoMethod PosSale
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosSaleRequest struct {
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Gtin: Global Trade Item Number.
+ Gtin string `json:"gtin,omitempty"`
+
+ // ItemId: A unique identifier for the item.
+ ItemId string `json:"itemId,omitempty"`
+
+ // Price: The price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // Quantity: The relative change of the available quantity. Negative for
+ // items returned.
+ Quantity int64 `json:"quantity,omitempty,string"`
+
+ // SaleId: A unique ID to group items from the same sale event.
+ SaleId string `json:"saleId,omitempty"`
+
+ // StoreCode: The identifier of the merchant's store. Either a storeCode
+ // inserted via the API or the code of the store in Google My Business.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // TargetCountry: The CLDR territory code for the item.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Timestamp: The inventory timestamp, in ISO 8601 format.
+ Timestamp string `json:"timestamp,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ContentLanguage") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosSaleRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod PosSaleRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PosSaleResponse struct {
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Gtin: Global Trade Item Number.
+ Gtin string `json:"gtin,omitempty"`
+
+ // ItemId: A unique identifier for the item.
+ ItemId string `json:"itemId,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posSaleResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // Price: The price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // Quantity: The relative change of the available quantity. Negative for
+ // items returned.
+ Quantity int64 `json:"quantity,omitempty,string"`
+
+ // SaleId: A unique ID to group items from the same sale event.
+ SaleId string `json:"saleId,omitempty"`
+
+ // StoreCode: The identifier of the merchant's store. Either a storeCode
+ // inserted via the API or the code of the store in Google My Business.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // TargetCountry: The CLDR territory code for the item.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Timestamp: The inventory timestamp, in ISO 8601 format.
+ Timestamp string `json:"timestamp,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ContentLanguage") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosSaleResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod PosSaleResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PosStore: Store resource.
+type PosStore struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#posStore".
+ Kind string `json:"kind,omitempty"`
+
+ // StoreAddress: The street address of the store.
+ StoreAddress string `json:"storeAddress,omitempty"`
+
+ // StoreCode: A store identifier that is unique for the given merchant.
+ StoreCode string `json:"storeCode,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PosStore) MarshalJSON() ([]byte, error) {
+ type NoMethod PosStore
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PostalCodeGroup struct {
+ // Country: The CLDR territory code of the country the postal code group
+ // applies to. Required.
+ Country string `json:"country,omitempty"`
+
+ // Name: The name of the postal code group, referred to in headers.
+ // Required.
+ Name string `json:"name,omitempty"`
+
+ // PostalCodeRanges: A range of postal codes. Required.
+ PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PostalCodeGroup) MarshalJSON() ([]byte, error) {
+ type NoMethod PostalCodeGroup
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PostalCodeRange struct {
+ // PostalCodeRangeBegin: A postal code or a pattern of the form prefix*
+ // denoting the inclusive lower bound of the range defining the area.
+ // Examples values: "94108", "9410*", "9*". Required.
+ PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"`
+
+ // PostalCodeRangeEnd: A postal code or a pattern of the form prefix*
+ // denoting the inclusive upper bound of the range defining the area. It
+ // must have the same length as postalCodeRangeBegin: if
+ // postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be
+ // a postal code too; if postalCodeRangeBegin is a pattern then
+ // postalCodeRangeEnd must be a pattern with the same prefix length.
+ // Optional: if not set, then the area is defined as being all the
+ // postal codes matching postalCodeRangeBegin.
+ PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "PostalCodeRangeBegin") to unconditionally include in API requests.
+ // By default, fields with empty values are omitted from API requests.
+ // However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PostalCodeRange) MarshalJSON() ([]byte, error) {
+ type NoMethod PostalCodeRange
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Price struct {
+ // Currency: The currency of the price.
+ Currency string `json:"currency,omitempty"`
+
+ // Value: The price represented as a number.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Currency") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Currency") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Price) MarshalJSON() ([]byte, error) {
+ type NoMethod Price
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Product: Product data. After inserting, updating, or deleting a
+// product, it may take several minutes before changes take effect.
+type Product struct {
+ // AdditionalImageLinks: Additional URLs of images of the item.
+ AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"`
+
+ // AdsGrouping: Used to group items in an arbitrary way. Only for CPA%,
+ // discouraged otherwise.
+ AdsGrouping string `json:"adsGrouping,omitempty"`
+
+ // AdsLabels: Similar to ads_grouping, but only works on CPC.
+ AdsLabels []string `json:"adsLabels,omitempty"`
+
+ // AdsRedirect: Allows advertisers to override the item URL when the
+ // product is shown within the context of Product Ads.
+ AdsRedirect string `json:"adsRedirect,omitempty"`
+
+ // Adult: Set to true if the item is targeted towards adults.
+ Adult bool `json:"adult,omitempty"`
+
+ // AgeGroup: Target age group of the item.
+ AgeGroup string `json:"ageGroup,omitempty"`
+
+ // Availability: Availability status of the item.
+ Availability string `json:"availability,omitempty"`
+
+ // AvailabilityDate: The day a pre-ordered product becomes available for
+ // delivery, in ISO 8601 format.
+ AvailabilityDate string `json:"availabilityDate,omitempty"`
+
+ // Brand: Brand of the item.
+ Brand string `json:"brand,omitempty"`
+
+ // Channel: The item's channel (online or local).
+ Channel string `json:"channel,omitempty"`
+
+ // Color: Color of the item.
+ Color string `json:"color,omitempty"`
+
+ // Condition: Condition or state of the item.
+ Condition string `json:"condition,omitempty"`
+
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting.
+ CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"`
+
+ // CustomAttributes: A list of custom (merchant-provided) attributes. It
+ // can also be used for submitting any attribute of the feed
+ // specification in its generic form (e.g., { "name": "size type",
+ // "type": "text", "value": "regular" }). This is useful for submitting
+ // attributes not explicitly exposed by the API.
+ CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"`
+
+ // CustomLabel0: Custom label 0 for custom grouping of items in a
+ // Shopping campaign.
+ CustomLabel0 string `json:"customLabel0,omitempty"`
+
+ // CustomLabel1: Custom label 1 for custom grouping of items in a
+ // Shopping campaign.
+ CustomLabel1 string `json:"customLabel1,omitempty"`
+
+ // CustomLabel2: Custom label 2 for custom grouping of items in a
+ // Shopping campaign.
+ CustomLabel2 string `json:"customLabel2,omitempty"`
+
+ // CustomLabel3: Custom label 3 for custom grouping of items in a
+ // Shopping campaign.
+ CustomLabel3 string `json:"customLabel3,omitempty"`
+
+ // CustomLabel4: Custom label 4 for custom grouping of items in a
+ // Shopping campaign.
+ CustomLabel4 string `json:"customLabel4,omitempty"`
+
+ // Description: Description of the item.
+ Description string `json:"description,omitempty"`
+
+ // DisplayAdsId: An identifier for an item for dynamic remarketing
+ // campaigns.
+ DisplayAdsId string `json:"displayAdsId,omitempty"`
+
+ // DisplayAdsLink: URL directly to your item's landing page for dynamic
+ // remarketing campaigns.
+ DisplayAdsLink string `json:"displayAdsLink,omitempty"`
+
+ // DisplayAdsSimilarIds: Advertiser-specified recommendations.
+ DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"`
+
+ // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns.
+ DisplayAdsTitle string `json:"displayAdsTitle,omitempty"`
+
+ // DisplayAdsValue: Offer margin for dynamic remarketing campaigns.
+ DisplayAdsValue float64 `json:"displayAdsValue,omitempty"`
+
+ // EnergyEfficiencyClass: The energy efficiency class as defined in EU
+ // directive 2010/30/EU.
+ EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"`
+
+ // ExcludedDestinations: The list of destinations to exclude for this
+ // target (corresponds to unchecked check boxes in Merchant Center).
+ ExcludedDestinations []string `json:"excludedDestinations,omitempty"`
+
+ // ExpirationDate: Date on which the item should expire, as specified
+ // upon insertion, in ISO 8601 format. The actual expiration date in
+ // Google Shopping is exposed in productstatuses as googleExpirationDate
+ // and might be earlier if expirationDate is too far in the future.
+ ExpirationDate string `json:"expirationDate,omitempty"`
+
+ // Gender: Target gender of the item.
+ Gender string `json:"gender,omitempty"`
+
+ // GoogleProductCategory: Google's category of the item (see Google
+ // product taxonomy).
+ GoogleProductCategory string `json:"googleProductCategory,omitempty"`
+
+ // Gtin: Global Trade Item Number (GTIN) of the item.
+ Gtin string `json:"gtin,omitempty"`
+
+ // Id: The REST id of the product. Content API methods that operate on
+ // products take this as their productId parameter.
+ // The REST id for a product is of the form
+ // channel:contentLanguage:targetCountry:offerId.
+ Id string `json:"id,omitempty"`
+
+ // IdentifierExists: False when the item does not have unique product
+ // identifiers appropriate to its category, such as GTIN, MPN, and
+ // brand. Required according to the Unique Product Identifier Rules for
+ // all target countries except for Canada.
+ IdentifierExists bool `json:"identifierExists,omitempty"`
+
+ // ImageLink: URL of an image of the item.
+ ImageLink string `json:"imageLink,omitempty"`
+
+ // IncludedDestinations: The list of destinations to include for this
+ // target (corresponds to checked check boxes in Merchant Center).
+ // Default destinations are always included unless provided in the
+ // excluded_destination field.
+ IncludedDestinations []string `json:"includedDestinations,omitempty"`
+
+ // Installment: Number and amount of installments to pay for an item.
+ // Brazil only.
+ Installment *Installment `json:"installment,omitempty"`
+
+ // IsBundle: Whether the item is a merchant-defined bundle. A bundle is
+ // a custom grouping of different products sold by a merchant for a
+ // single price.
+ IsBundle bool `json:"isBundle,omitempty"`
+
+ // ItemGroupId: Shared identifier for all variants of the same product.
+ ItemGroupId string `json:"itemGroupId,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#product".
+ Kind string `json:"kind,omitempty"`
+
+ // Link: URL directly linking to your item's page on your website.
+ Link string `json:"link,omitempty"`
+
+ // LoyaltyPoints: Loyalty points that users receive after purchasing the
+ // item. Japan only.
+ LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"`
+
+ // Material: The material of which the item is made.
+ Material string `json:"material,omitempty"`
+
+ // MaxEnergyEfficiencyClass: The energy efficiency class as defined in
+ // EU directive 2010/30/EU.
+ MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"`
+
+ // MaxHandlingTime: Maximal product handling time (in business days).
+ MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"`
+
+ // MinEnergyEfficiencyClass: The energy efficiency class as defined in
+ // EU directive 2010/30/EU.
+ MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"`
+
+ // MinHandlingTime: Minimal product handling time (in business days).
+ MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"`
+
+ // MobileLink: Link to a mobile-optimized version of the landing page.
+ MobileLink string `json:"mobileLink,omitempty"`
+
+ // Mpn: Manufacturer Part Number (MPN) of the item.
+ Mpn string `json:"mpn,omitempty"`
+
+ // Multipack: The number of identical products in a merchant-defined
+ // multipack.
+ Multipack int64 `json:"multipack,omitempty,string"`
+
+ // OfferId: A unique identifier for the item. Leading and trailing
+ // whitespaces are stripped and multiple whitespaces are replaced by a
+ // single whitespace upon submission. Only valid unicode characters are
+ // accepted. See the products feed specification for details.
+ // Note: Content API methods that operate on products take the REST id
+ // of the product, not this identifier.
+ OfferId string `json:"offerId,omitempty"`
+
+ // Pattern: The item's pattern (e.g. polka dots).
+ Pattern string `json:"pattern,omitempty"`
+
+ // Price: Price of the item.
+ Price *Price `json:"price,omitempty"`
+
+ // ProductTypes: Categories of the item (formatted as in products feed
+ // specification).
+ ProductTypes []string `json:"productTypes,omitempty"`
+
+ // PromotionIds: The unique ID of a promotion.
+ PromotionIds []string `json:"promotionIds,omitempty"`
+
+ // SalePrice: Advertised sale price of the item.
+ SalePrice *Price `json:"salePrice,omitempty"`
+
+ // SalePriceEffectiveDate: Date range during which the item is on sale
+ // (see products feed specification).
+ SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"`
+
+ // SellOnGoogleQuantity: The quantity of the product that is available
+ // for selling on Google. Supported only for online products.
+ SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"`
+
+ // Shipping: Shipping rules.
+ Shipping []*ProductShipping `json:"shipping,omitempty"`
+
+ // ShippingHeight: Height of the item for shipping.
+ ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"`
+
+ // ShippingLabel: The shipping label of the product, used to group
+ // product in account-level shipping rules.
+ ShippingLabel string `json:"shippingLabel,omitempty"`
+
+ // ShippingLength: Length of the item for shipping.
+ ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"`
+
+ // ShippingWeight: Weight of the item for shipping.
+ ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"`
+
+ // ShippingWidth: Width of the item for shipping.
+ ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"`
+
+ // SizeSystem: System in which the size is specified. Recommended for
+ // apparel items.
+ SizeSystem string `json:"sizeSystem,omitempty"`
+
+ // SizeType: The cut of the item. Recommended for apparel items.
+ SizeType string `json:"sizeType,omitempty"`
+
+ // Sizes: Size of the item.
+ Sizes []string `json:"sizes,omitempty"`
+
+ // Source: The source of the offer, i.e., how the offer was created.
+ Source string `json:"source,omitempty"`
+
+ // TargetCountry: The CLDR territory code for the item.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Taxes: Tax information.
+ Taxes []*ProductTax `json:"taxes,omitempty"`
+
+ // Title: Title of the item.
+ Title string `json:"title,omitempty"`
+
+ // UnitPricingBaseMeasure: The preference of the denominator of the unit
+ // price.
+ UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"`
+
+ // UnitPricingMeasure: The measure and dimension of an item.
+ UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "AdditionalImageLinks") to unconditionally include in API requests.
+ // By default, fields with empty values are omitted from API requests.
+ // However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AdditionalImageLinks") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Product) MarshalJSON() ([]byte, error) {
+ type NoMethod Product
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *Product) UnmarshalJSON(data []byte) error {
+ type NoMethod Product
+ var s1 struct {
+ DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.DisplayAdsValue = float64(s1.DisplayAdsValue)
+ return nil
+}
+
+type ProductShipping struct {
+ // Country: The CLDR territory code of the country to which an item will
+ // ship.
+ Country string `json:"country,omitempty"`
+
+ // LocationGroupName: The location where the shipping is applicable,
+ // represented by a location group name.
+ LocationGroupName string `json:"locationGroupName,omitempty"`
+
+ // LocationId: The numeric id of a location that the shipping rate
+ // applies to as defined in the AdWords API.
+ LocationId int64 `json:"locationId,omitempty,string"`
+
+ // PostalCode: The postal code range that the shipping rate applies to,
+ // represented by a postal code, a postal code prefix followed by a *
+ // wildcard, a range between two postal codes or two postal code
+ // prefixes of equal length.
+ PostalCode string `json:"postalCode,omitempty"`
+
+ // Price: Fixed shipping price, represented as a number.
+ Price *Price `json:"price,omitempty"`
+
+ // Region: The geographic region to which a shipping rate applies.
+ Region string `json:"region,omitempty"`
+
+ // Service: A free-form description of the service class or delivery
+ // speed.
+ Service string `json:"service,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductShipping) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductShipping
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductShippingDimension struct {
+ // Unit: The unit of value.
+ Unit string `json:"unit,omitempty"`
+
+ // Value: The dimension of the product used to calculate the shipping
+ // cost of the item.
+ Value float64 `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Unit") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Unit") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductShippingDimension) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductShippingDimension
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error {
+ type NoMethod ProductShippingDimension
+ var s1 struct {
+ Value gensupport.JSONFloat64 `json:"value"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Value = float64(s1.Value)
+ return nil
+}
+
+type ProductShippingWeight struct {
+ // Unit: The unit of value.
+ Unit string `json:"unit,omitempty"`
+
+ // Value: The weight of the product used to calculate the shipping cost
+ // of the item.
+ Value float64 `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Unit") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Unit") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductShippingWeight) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductShippingWeight
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error {
+ type NoMethod ProductShippingWeight
+ var s1 struct {
+ Value gensupport.JSONFloat64 `json:"value"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Value = float64(s1.Value)
+ return nil
+}
+
+// ProductStatus: The status of a product, i.e., information about a
+// product computed asynchronously by the data quality analysis.
+type ProductStatus struct {
+ // CreationDate: Date on which the item has been created, in ISO 8601
+ // format.
+ CreationDate string `json:"creationDate,omitempty"`
+
+ // DestinationStatuses: The intended destinations for the product.
+ DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"`
+
+ // GoogleExpirationDate: Date on which the item expires in Google
+ // Shopping, in ISO 8601 format.
+ GoogleExpirationDate string `json:"googleExpirationDate,omitempty"`
+
+ // ItemLevelIssues: A list of all issues associated with the product.
+ ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#productStatus".
+ Kind string `json:"kind,omitempty"`
+
+ // LastUpdateDate: Date on which the item has been last updated, in ISO
+ // 8601 format.
+ LastUpdateDate string `json:"lastUpdateDate,omitempty"`
+
+ // Link: The link to the product.
+ Link string `json:"link,omitempty"`
+
+ // ProductId: The id of the product for which status is reported.
+ ProductId string `json:"productId,omitempty"`
+
+ // Title: The title of the product.
+ Title string `json:"title,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CreationDate") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CreationDate") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductStatus) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductStatus
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductStatusDestinationStatus struct {
+ // Destination: The name of the destination
+ Destination string `json:"destination,omitempty"`
+
+ Status string `json:"status,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Destination") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Destination") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductStatusDestinationStatus
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductStatusItemLevelIssue struct {
+ // AttributeName: The attribute's name, if the issue is caused by a
+ // single attribute.
+ AttributeName string `json:"attributeName,omitempty"`
+
+ // Code: The error code of the issue.
+ Code string `json:"code,omitempty"`
+
+ // Description: A short issue description in English.
+ Description string `json:"description,omitempty"`
+
+ // Destination: The destination the issue applies to.
+ Destination string `json:"destination,omitempty"`
+
+ // Detail: A detailed issue description in English.
+ Detail string `json:"detail,omitempty"`
+
+ // Documentation: The URL of a web page to help with resolving this
+ // issue.
+ Documentation string `json:"documentation,omitempty"`
+
+ // Resolution: Whether the issue can be resolved by the merchant.
+ Resolution string `json:"resolution,omitempty"`
+
+ // Servability: How this issue affects serving of the offer.
+ Servability string `json:"servability,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AttributeName") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AttributeName") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductStatusItemLevelIssue
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductTax struct {
+ // Country: The country within which the item is taxed, specified as a
+ // CLDR territory code.
+ Country string `json:"country,omitempty"`
+
+ // LocationId: The numeric id of a location that the tax rate applies to
+ // as defined in the AdWords API.
+ LocationId int64 `json:"locationId,omitempty,string"`
+
+ // PostalCode: The postal code range that the tax rate applies to,
+ // represented by a ZIP code, a ZIP code prefix using * wildcard, a
+ // range between two ZIP codes or two ZIP code prefixes of equal length.
+ // Examples: 94114, 94*, 94002-95460, 94*-95*.
+ PostalCode string `json:"postalCode,omitempty"`
+
+ // Rate: The percentage of tax rate that applies to the item price.
+ Rate float64 `json:"rate,omitempty"`
+
+ // Region: The geographic region to which the tax rate applies.
+ Region string `json:"region,omitempty"`
+
+ // TaxShip: Set to true if tax is charged on shipping.
+ TaxShip bool `json:"taxShip,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Country") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Country") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductTax) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductTax
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *ProductTax) UnmarshalJSON(data []byte) error {
+ type NoMethod ProductTax
+ var s1 struct {
+ Rate gensupport.JSONFloat64 `json:"rate"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Rate = float64(s1.Rate)
+ return nil
+}
+
+type ProductUnitPricingBaseMeasure struct {
+ // Unit: The unit of the denominator.
+ Unit string `json:"unit,omitempty"`
+
+ // Value: The denominator of the unit price.
+ Value int64 `json:"value,omitempty,string"`
+
+ // ForceSendFields is a list of field names (e.g. "Unit") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Unit") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductUnitPricingBaseMeasure
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductUnitPricingMeasure struct {
+ // Unit: The unit of the measure.
+ Unit string `json:"unit,omitempty"`
+
+ // Value: The measure of an item.
+ Value float64 `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Unit") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Unit") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductUnitPricingMeasure
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error {
+ type NoMethod ProductUnitPricingMeasure
+ var s1 struct {
+ Value gensupport.JSONFloat64 `json:"value"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Value = float64(s1.Value)
+ return nil
+}
+
+type ProductsCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductsCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ProductsCustomBatchRequestEntry: A batch entry encoding a single
+// non-batch products request.
+type ProductsCustomBatchRequestEntry struct {
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // Product: The product to insert. Only required if the method is
+ // insert.
+ Product *Product `json:"product,omitempty"`
+
+ // ProductId: The ID of the product to get or delete. Only defined if
+ // the method is get or delete.
+ ProductId string `json:"productId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductsCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductsCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#productsCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductsCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ProductsCustomBatchResponseEntry: A batch entry encoding a single
+// non-batch products response.
+type ProductsCustomBatchResponseEntry struct {
+ // BatchId: The ID of the request entry this entry responds to.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors defined if and only if the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#productsCustomBatchResponseEntry".
+ Kind string `json:"kind,omitempty"`
+
+ // Product: The inserted product. Only defined if the method is insert
+ // and if the request was successful.
+ Product *Product `json:"product,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductsCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductsListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#productsListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // products.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*Product `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductsListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductsListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductstatusesCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductstatusesCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a
+// single non-batch productstatuses request.
+type ProductstatusesCustomBatchRequestEntry struct {
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Destinations: If set, only issues for the specified destinations are
+ // returned, otherwise only issues for the Shopping destination.
+ Destinations []string `json:"destinations,omitempty"`
+
+ IncludeAttributes bool `json:"includeAttributes,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // ProductId: The ID of the product whose status to get.
+ ProductId string `json:"productId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductstatusesCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductstatusesCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#productstatusesCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductstatusesCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a
+// single non-batch productstatuses response.
+type ProductstatusesCustomBatchResponseEntry struct {
+ // BatchId: The ID of the request entry this entry responds to.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors, if the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#productstatusesCustomBatchResponseEntry".
+ Kind string `json:"kind,omitempty"`
+
+ // ProductStatus: The requested product status. Only defined if the
+ // request was successful.
+ ProductStatus *ProductStatus `json:"productStatus,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductstatusesCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ProductstatusesListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#productstatusesListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // products statuses.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*ProductStatus `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ProductstatusesListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ProductstatusesListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Promotion struct {
+ // PromotionAmount: [required] Amount of the promotion. The values here
+ // are the promotion applied to the unit price pretax and to the total
+ // of the tax amounts.
+ PromotionAmount *Amount `json:"promotionAmount,omitempty"`
+
+ // PromotionId: [required] ID of the promotion.
+ PromotionId string `json:"promotionId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "PromotionAmount") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "PromotionAmount") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Promotion) MarshalJSON() ([]byte, error) {
+ type NoMethod Promotion
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type RateGroup struct {
+ // ApplicableShippingLabels: A list of shipping labels defining the
+ // products to which this rate group applies to. This is a disjunction:
+ // only one of the labels has to match for the rate group to apply. May
+ // only be empty for the last rate group of a service. Required.
+ ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"`
+
+ // CarrierRates: A list of carrier rates that can be referred to by
+ // mainTable or singleValue.
+ CarrierRates []*CarrierRate `json:"carrierRates,omitempty"`
+
+ // MainTable: A table defining the rate group, when singleValue is not
+ // expressive enough. Can only be set if singleValue is not set.
+ MainTable *Table `json:"mainTable,omitempty"`
+
+ // Name: Name of the rate group. Optional. If set has to be unique
+ // within shipping service.
+ Name string `json:"name,omitempty"`
+
+ // SingleValue: The value of the rate group (e.g. flat rate $10). Can
+ // only be set if mainTable and subtables are not set.
+ SingleValue *Value `json:"singleValue,omitempty"`
+
+ // Subtables: A list of subtables referred to by mainTable. Can only be
+ // set if mainTable is set.
+ Subtables []*Table `json:"subtables,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "ApplicableShippingLabels") to unconditionally include in API
+ // requests. By default, fields with empty values are omitted from API
+ // requests. However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ApplicableShippingLabels")
+ // to include in API requests with the JSON null value. By default,
+ // fields with empty values are omitted from API requests. However, any
+ // field with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RateGroup) MarshalJSON() ([]byte, error) {
+ type NoMethod RateGroup
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type RefundReason struct {
+ Description string `json:"description,omitempty"`
+
+ ReasonCode string `json:"reasonCode,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Description") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Description") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RefundReason) MarshalJSON() ([]byte, error) {
+ type NoMethod RefundReason
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ReturnShipment struct {
+ CreationDate string `json:"creationDate,omitempty"`
+
+ ReturnMethodType string `json:"returnMethodType,omitempty"`
+
+ ShipmentId string `json:"shipmentId,omitempty"`
+
+ ShipmentTrackingInfos []*ShipmentTrackingInfo `json:"shipmentTrackingInfos,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CreationDate") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CreationDate") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ReturnShipment) MarshalJSON() ([]byte, error) {
+ type NoMethod ReturnShipment
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Row struct {
+ // Cells: The list of cells that constitute the row. Must have the same
+ // length as columnHeaders for two-dimensional tables, a length of 1 for
+ // one-dimensional tables. Required.
+ Cells []*Value `json:"cells,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Cells") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Cells") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Row) MarshalJSON() ([]byte, error) {
+ type NoMethod Row
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Service struct {
+ // Active: A boolean exposing the active status of the shipping service.
+ // Required.
+ Active bool `json:"active,omitempty"`
+
+ // Currency: The CLDR code of the currency to which this service
+ // applies. Must match that of the prices in rate groups.
+ Currency string `json:"currency,omitempty"`
+
+ // DeliveryCountry: The CLDR territory code of the country to which the
+ // service applies. Required.
+ DeliveryCountry string `json:"deliveryCountry,omitempty"`
+
+ // DeliveryTime: Time spent in various aspects from order to the
+ // delivery of the product. Required.
+ DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"`
+
+ // Eligibility: Eligibility for this service.
+ Eligibility string `json:"eligibility,omitempty"`
+
+ // MinimumOrderValue: Minimum order value for this service. If set,
+ // indicates that customers will have to spend at least this amount. All
+ // prices within a service must have the same currency.
+ MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"`
+
+ // Name: Free-form name of the service. Must be unique within target
+ // account. Required.
+ Name string `json:"name,omitempty"`
+
+ // RateGroups: Shipping rate group definitions. Only the last one is
+ // allowed to have an empty applicableShippingLabels, which means
+ // "everything else". The other applicableShippingLabels must not
+ // overlap.
+ RateGroups []*RateGroup `json:"rateGroups,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Active") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Active") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Service) MarshalJSON() ([]byte, error) {
+ type NoMethod Service
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShipmentInvoice struct {
+ // InvoiceSummary: [required] Invoice summary.
+ InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"`
+
+ // LineItemInvoices: [required] Invoice details per line item.
+ LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"`
+
+ // ShipmentGroupId: [required] ID of the shipment group.
+ ShipmentGroupId string `json:"shipmentGroupId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "InvoiceSummary") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "InvoiceSummary") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShipmentInvoice) MarshalJSON() ([]byte, error) {
+ type NoMethod ShipmentInvoice
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShipmentInvoiceLineItemInvoice struct {
+ // LineItemId: ID of the line item. Either lineItemId or productId must
+ // be set.
+ LineItemId string `json:"lineItemId,omitempty"`
+
+ // ProductId: ID of the product. This is the REST ID used in the
+ // products service. Either lineItemId or productId must be set.
+ ProductId string `json:"productId,omitempty"`
+
+ // ShipmentUnitIds: [required] Unit IDs to define specific units within
+ // the line item.
+ ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"`
+
+ // UnitInvoice: [required] Invoice details for a single unit.
+ UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LineItemId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LineItemId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) {
+ type NoMethod ShipmentInvoiceLineItemInvoice
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShipmentTrackingInfo struct {
+ Carrier string `json:"carrier,omitempty"`
+
+ TrackingNumber string `json:"trackingNumber,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Carrier") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Carrier") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShipmentTrackingInfo) MarshalJSON() ([]byte, error) {
+ type NoMethod ShipmentTrackingInfo
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ShippingSettings: The merchant account's shipping settings. All
+// methods except getsupportedcarriers and getsupportedholidays require
+// the admin role.
+type ShippingSettings struct {
+ // AccountId: The ID of the account to which these account shipping
+ // settings belong. Ignored upon update, always present in get request
+ // responses.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // PostalCodeGroups: A list of postal code groups that can be referred
+ // to in services. Optional.
+ PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"`
+
+ // Services: The target account's list of services. Optional.
+ Services []*Service `json:"services,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingSettings) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingSettings
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShippingsettingsCustomBatchRequest struct {
+ // Entries: The request entries to be processed in the batch.
+ Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingsettingsCustomBatchRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a
+// single non-batch shippingsettings request.
+type ShippingsettingsCustomBatchRequestEntry struct {
+ // AccountId: The ID of the account for which to get/update account
+ // shipping settings.
+ AccountId uint64 `json:"accountId,omitempty,string"`
+
+ // BatchId: An entry ID, unique within the batch request.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // MerchantId: The ID of the managing account.
+ MerchantId uint64 `json:"merchantId,omitempty,string"`
+
+ Method string `json:"method,omitempty"`
+
+ // ShippingSettings: The account shipping settings to update. Only
+ // defined if the method is update.
+ ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AccountId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AccountId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingsettingsCustomBatchRequestEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShippingsettingsCustomBatchResponse struct {
+ // Entries: The result of the execution of the batch requests.
+ Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#shippingsettingsCustomBatchResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Entries") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Entries") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingsettingsCustomBatchResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a
+// single non-batch shipping settings response.
+type ShippingsettingsCustomBatchResponseEntry struct {
+ // BatchId: The ID of the request entry to which this entry responds.
+ BatchId int64 `json:"batchId,omitempty"`
+
+ // Errors: A list of errors defined if, and only if, the request failed.
+ Errors *Errors `json:"errors,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#shippingsettingsCustomBatchResponseEntry".
+ Kind string `json:"kind,omitempty"`
+
+ // ShippingSettings: The retrieved or updated account shipping settings.
+ ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "BatchId") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "BatchId") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingsettingsCustomBatchResponseEntry
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShippingsettingsGetSupportedCarriersResponse struct {
+ // Carriers: A list of supported carriers. May be empty.
+ Carriers []*CarriersCarrier `json:"carriers,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#shippingsettingsGetSupportedCarriersResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Carriers") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Carriers") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingsettingsGetSupportedCarriersResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShippingsettingsGetSupportedHolidaysResponse struct {
+ // Holidays: A list of holidays applicable for delivery guarantees. May
+ // be empty.
+ Holidays []*HolidaysHoliday `json:"holidays,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#shippingsettingsGetSupportedHolidaysResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Holidays") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Holidays") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingsettingsGetSupportedHolidaysResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type ShippingsettingsListResponse struct {
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#shippingsettingsListResponse".
+ Kind string `json:"kind,omitempty"`
+
+ // NextPageToken: The token for the retrieval of the next page of
+ // shipping settings.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ Resources []*ShippingSettings `json:"resources,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Kind") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Kind") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ShippingsettingsListResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ShippingsettingsListResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Table struct {
+ // ColumnHeaders: Headers of the table's columns. Optional: if not set
+ // then the table has only one dimension.
+ ColumnHeaders *Headers `json:"columnHeaders,omitempty"`
+
+ // Name: Name of the table. Required for subtables, ignored for the main
+ // table.
+ Name string `json:"name,omitempty"`
+
+ // RowHeaders: Headers of the table's rows. Required.
+ RowHeaders *Headers `json:"rowHeaders,omitempty"`
+
+ // Rows: The list of rows that constitute the table. Must have the same
+ // length as rowHeaders. Required.
+ Rows []*Row `json:"rows,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ColumnHeaders") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Table) MarshalJSON() ([]byte, error) {
+ type NoMethod Table
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type TestOrder struct {
+ // Customer: The details of the customer who placed the order.
+ Customer *TestOrderCustomer `json:"customer,omitempty"`
+
+ // EnableOrderinvoices: Whether the orderinvoices service should support
+ // this order.
+ EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"`
+
+ // Kind: Identifies what kind of resource this is. Value: the fixed
+ // string "content#testOrder".
+ Kind string `json:"kind,omitempty"`
+
+ // LineItems: Line items that are ordered. At least one line item must
+ // be provided.
+ LineItems []*TestOrderLineItem `json:"lineItems,omitempty"`
+
+ // NotificationMode: Determines if test order must be pulled by merchant
+ // or pushed to merchant via push integration.
+ NotificationMode string `json:"notificationMode,omitempty"`
+
+ // PredefinedBillingAddress: The billing address.
+ PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"`
+
+ // PredefinedDeliveryAddress: Identifier of one of the predefined
+ // delivery addresses for the delivery.
+ PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"`
+
+ // Promotions: Promotions associated with the order.
+ Promotions []*OrderPromotion `json:"promotions,omitempty"`
+
+ // ShippingCost: The total cost of shipping for all items.
+ ShippingCost *Price `json:"shippingCost,omitempty"`
+
+ // ShippingCostTax: The tax for the total shipping cost.
+ ShippingCostTax *Price `json:"shippingCostTax,omitempty"`
+
+ // ShippingOption: The requested shipping option.
+ ShippingOption string `json:"shippingOption,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Customer") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Customer") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TestOrder) MarshalJSON() ([]byte, error) {
+ type NoMethod TestOrder
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type TestOrderCustomer struct {
+ // Email: Deprecated.
+ Email string `json:"email,omitempty"`
+
+ // FullName: Full name of the customer.
+ FullName string `json:"fullName,omitempty"`
+
+ // MarketingRightsInfo: Customer's marketing preferences.
+ MarketingRightsInfo *TestOrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Email") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Email") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) {
+ type NoMethod TestOrderCustomer
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type TestOrderCustomerMarketingRightsInfo struct {
+ // ExplicitMarketingPreference: Last know user use selection regards
+ // marketing preferences. In certain cases selection might not be known,
+ // so this field would be empty.
+ ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"`
+
+ // LastUpdatedTimestamp: Timestamp when last time marketing preference
+ // was updated. Could be empty, if user wasn't offered a selection yet.
+ LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "ExplicitMarketingPreference") to unconditionally include in API
+ // requests. By default, fields with empty values are omitted from API
+ // requests. However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g.
+ // "ExplicitMarketingPreference") to include in API requests with the
+ // JSON null value. By default, fields with empty values are omitted
+ // from API requests. However, any field with an empty value appearing
+ // in NullFields will be sent to the server as null. It is an error if a
+ // field in this list has a non-empty value. This may be used to include
+ // null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) {
+ type NoMethod TestOrderCustomerMarketingRightsInfo
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type TestOrderLineItem struct {
+ // Product: Product data from the time of the order placement.
+ Product *TestOrderLineItemProduct `json:"product,omitempty"`
+
+ // QuantityOrdered: Number of items ordered.
+ QuantityOrdered int64 `json:"quantityOrdered,omitempty"`
+
+ // ReturnInfo: Details of the return policy for the line item.
+ ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"`
+
+ // ShippingDetails: Details of the requested shipping for the line item.
+ ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"`
+
+ // UnitTax: Unit tax for the line item.
+ UnitTax *Price `json:"unitTax,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Product") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Product") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) {
+ type NoMethod TestOrderLineItem
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type TestOrderLineItemProduct struct {
+ // Brand: Brand of the item.
+ Brand string `json:"brand,omitempty"`
+
+ // Channel: The item's channel.
+ Channel string `json:"channel,omitempty"`
+
+ // Condition: Condition or state of the item.
+ Condition string `json:"condition,omitempty"`
+
+ // ContentLanguage: The two-letter ISO 639-1 language code for the item.
+ ContentLanguage string `json:"contentLanguage,omitempty"`
+
+ // Gtin: Global Trade Item Number (GTIN) of the item. Optional.
+ Gtin string `json:"gtin,omitempty"`
+
+ // ImageLink: URL of an image of the item.
+ ImageLink string `json:"imageLink,omitempty"`
+
+ // ItemGroupId: Shared identifier for all variants of the same product.
+ // Optional.
+ ItemGroupId string `json:"itemGroupId,omitempty"`
+
+ // Mpn: Manufacturer Part Number (MPN) of the item. Optional.
+ Mpn string `json:"mpn,omitempty"`
+
+ // OfferId: An identifier of the item.
+ OfferId string `json:"offerId,omitempty"`
+
+ // Price: The price for the product.
+ Price *Price `json:"price,omitempty"`
+
+ // TargetCountry: The CLDR territory code of the target country of the
+ // product.
+ TargetCountry string `json:"targetCountry,omitempty"`
+
+ // Title: The title of the product.
+ Title string `json:"title,omitempty"`
+
+ // VariantAttributes: Variant attributes for the item. Optional.
+ VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Brand") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Brand") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) {
+ type NoMethod TestOrderLineItemProduct
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type UnitInvoice struct {
+ // AdditionalCharges: Additional charges for a unit, e.g. shipping
+ // costs.
+ AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"`
+
+ // Promotions: Promotions applied to a unit.
+ Promotions []*Promotion `json:"promotions,omitempty"`
+
+ // UnitPricePretax: [required] Price of the unit, before applying taxes.
+ UnitPricePretax *Price `json:"unitPricePretax,omitempty"`
+
+ // UnitPriceTaxes: Tax amounts to apply to the unit price.
+ UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AdditionalCharges")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AdditionalCharges") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *UnitInvoice) MarshalJSON() ([]byte, error) {
+ type NoMethod UnitInvoice
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type UnitInvoiceAdditionalCharge struct {
+ // AdditionalChargeAmount: [required] Amount of the additional charge.
+ AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"`
+
+ // AdditionalChargePromotions: Promotions applied to the additional
+ // charge.
+ AdditionalChargePromotions []*Promotion `json:"additionalChargePromotions,omitempty"`
+
+ // Type: [required] Type of the additional charge.
+ Type string `json:"type,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "AdditionalChargeAmount") to unconditionally include in API requests.
+ // By default, fields with empty values are omitted from API requests.
+ // However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AdditionalChargeAmount")
+ // to include in API requests with the JSON null value. By default,
+ // fields with empty values are omitted from API requests. However, any
+ // field with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) {
+ type NoMethod UnitInvoiceAdditionalCharge
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type UnitInvoiceTaxLine struct {
+ // TaxAmount: [required] Tax amount for the tax type.
+ TaxAmount *Price `json:"taxAmount,omitempty"`
+
+ // TaxName: Optional name of the tax type. This should only be provided
+ // if taxType is otherFeeTax.
+ TaxName string `json:"taxName,omitempty"`
+
+ // TaxType: [required] Type of the tax.
+ TaxType string `json:"taxType,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "TaxAmount") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "TaxAmount") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) {
+ type NoMethod UnitInvoiceTaxLine
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Value: The single value of a rate group or the value of a rate group
+// table's cell. Exactly one of noShipping, flatRate, pricePercentage,
+// carrierRateName, subtableName must be set.
+type Value struct {
+ // CarrierRateName: The name of a carrier rate referring to a carrier
+ // rate defined in the same rate group. Can only be set if all other
+ // fields are not set.
+ CarrierRateName string `json:"carrierRateName,omitempty"`
+
+ // FlatRate: A flat rate. Can only be set if all other fields are not
+ // set.
+ FlatRate *Price `json:"flatRate,omitempty"`
+
+ // NoShipping: If true, then the product can't ship. Must be true when
+ // set, can only be set if all other fields are not set.
+ NoShipping bool `json:"noShipping,omitempty"`
+
+ // PricePercentage: A percentage of the price represented as a number in
+ // decimal notation (e.g., "5.4"). Can only be set if all other fields
+ // are not set.
+ PricePercentage string `json:"pricePercentage,omitempty"`
+
+ // SubtableName: The name of a subtable. Can only be set in table cells
+ // (i.e., not for single values), and only if all other fields are not
+ // set.
+ SubtableName string `json:"subtableName,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CarrierRateName") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CarrierRateName") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Value) MarshalJSON() ([]byte, error) {
+ type NoMethod Value
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type Weight struct {
+ // Unit: The weight unit.
+ Unit string `json:"unit,omitempty"`
+
+ // Value: The weight represented as a number.
+ Value string `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Unit") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Unit") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Weight) MarshalJSON() ([]byte, error) {
+ type NoMethod Weight
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// method id "content.accounts.authinfo":
+
+type AccountsAuthinfoCall struct {
+ s *APIService
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Authinfo: Returns information about the authenticated user.
+func (r *AccountsService) Authinfo() *AccountsAuthinfoCall {
+ c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsAuthinfoCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.authinfo" call.
+// Exactly one of *AccountsAuthInfoResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountsAuthInfoResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns information about the authenticated user.",
+ // "httpMethod": "GET",
+ // "id": "content.accounts.authinfo",
+ // "path": "accounts/authinfo",
+ // "response": {
+ // "$ref": "AccountsAuthInfoResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounts.claimwebsite":
+
+type AccountsClaimwebsiteCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Claimwebsite: Claims the website of a Merchant Center sub-account.
+func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall {
+ c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Overwrite sets the optional parameter "overwrite": Only available to
+// selected merchants. When set to True, this flag removes any existing
+// claim on the requested website by another account and replaces it
+// with a claim from this account.
+func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall {
+ c.urlParams_.Set("overwrite", fmt.Sprint(overwrite))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsClaimwebsiteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.claimwebsite" call.
+// Exactly one of *AccountsClaimWebsiteResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountsClaimWebsiteResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Claims the website of a Merchant Center sub-account.",
+ // "httpMethod": "POST",
+ // "id": "content.accounts.claimwebsite",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account whose website is claimed.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "overwrite": {
+ // "description": "Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.",
+ // "location": "query",
+ // "type": "boolean"
+ // }
+ // },
+ // "path": "{merchantId}/accounts/{accountId}/claimwebsite",
+ // "response": {
+ // "$ref": "AccountsClaimWebsiteResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounts.custombatch":
+
+type AccountsCustombatchCall struct {
+ s *APIService
+ accountscustombatchrequest *AccountsCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch: Retrieves, inserts, updates, and deletes multiple
+// Merchant Center (sub-)accounts in a single request.
+func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall {
+ c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.accountscustombatchrequest = accountscustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.custombatch" call.
+// Exactly one of *AccountsCustomBatchResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountsCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.",
+ // "httpMethod": "POST",
+ // "id": "content.accounts.custombatch",
+ // "path": "accounts/batch",
+ // "request": {
+ // "$ref": "AccountsCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "AccountsCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounts.delete":
+
+type AccountsDeleteCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes a Merchant Center sub-account.
+func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall {
+ c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Force sets the optional parameter "force": Flag to delete
+// sub-accounts with products. The default value is false.
+func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall {
+ c.urlParams_.Set("force", fmt.Sprint(force))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.delete" call.
+func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if err != nil {
+ return err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return err
+ }
+ return nil
+ // {
+ // "description": "Deletes a Merchant Center sub-account.",
+ // "httpMethod": "DELETE",
+ // "id": "content.accounts.delete",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "force": {
+ // "default": "false",
+ // "description": "Flag to delete sub-accounts with products. The default value is false.",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounts/{accountId}",
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounts.get":
+
+type AccountsGetCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves a Merchant Center account.
+func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall {
+ c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.get" call.
+// Exactly one of *Account or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Account.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Account{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves a Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.accounts.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounts/{accountId}",
+ // "response": {
+ // "$ref": "Account"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounts.insert":
+
+type AccountsInsertCall struct {
+ s *APIService
+ merchantId uint64
+ account *Account
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Creates a Merchant Center sub-account.
+func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall {
+ c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.account = account
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.insert" call.
+// Exactly one of *Account or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Account.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Account{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a Merchant Center sub-account.",
+ // "httpMethod": "POST",
+ // "id": "content.accounts.insert",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the managing account. This must be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounts",
+ // "request": {
+ // "$ref": "Account"
+ // },
+ // "response": {
+ // "$ref": "Account"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounts.link":
+
+type AccountsLinkCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ accountslinkrequest *AccountsLinkRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Link: Performs an action on a link between a Merchant Center account
+// and another account.
+func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall {
+ c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.accountslinkrequest = accountslinkrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsLinkCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.link" call.
+// Exactly one of *AccountsLinkResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *AccountsLinkResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountsLinkResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Performs an action on a link between a Merchant Center account and another account.",
+ // "httpMethod": "POST",
+ // "id": "content.accounts.link",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account that should be linked.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounts/{accountId}/link",
+ // "request": {
+ // "$ref": "AccountsLinkRequest"
+ // },
+ // "response": {
+ // "$ref": "AccountsLinkResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounts.list":
+
+type AccountsListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the sub-accounts in your Merchant Center account.
+func (r *AccountsService) List(merchantId uint64) *AccountsListCall {
+ c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of accounts to return in the response, used for paging.
+func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.list" call.
+// Exactly one of *AccountsListResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *AccountsListResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountsListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the sub-accounts in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.accounts.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "maxResults": {
+ // "description": "The maximum number of accounts to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. This must be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounts",
+ // "response": {
+ // "$ref": "AccountsListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.accounts.update":
+
+type AccountsUpdateCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ account *Account
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Update: Updates a Merchant Center account.
+func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall {
+ c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.account = account
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountsUpdateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PUT", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounts.update" call.
+// Exactly one of *Account or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Account.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Account{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates a Merchant Center account.",
+ // "httpMethod": "PUT",
+ // "id": "content.accounts.update",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounts/{accountId}",
+ // "request": {
+ // "$ref": "Account"
+ // },
+ // "response": {
+ // "$ref": "Account"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accountstatuses.custombatch":
+
+type AccountstatusesCustombatchCall struct {
+ s *APIService
+ accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch:
+func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall {
+ c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.accountstatusescustombatchrequest = accountstatusescustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountstatusesCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accountstatuses.custombatch" call.
+// Exactly one of *AccountstatusesCustomBatchResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *AccountstatusesCustomBatchResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountstatusesCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "httpMethod": "POST",
+ // "id": "content.accountstatuses.custombatch",
+ // "path": "accountstatuses/batch",
+ // "request": {
+ // "$ref": "AccountstatusesCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "AccountstatusesCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accountstatuses.get":
+
+type AccountstatusesGetCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves the status of a Merchant Center account. Multi-client
+// accounts can only call this method for sub-accounts.
+func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall {
+ c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Destinations sets the optional parameter "destinations": If set, only
+// issues for the specified destinations are returned, otherwise only
+// issues for the Shopping destination.
+func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall {
+ c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountstatusesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accountstatuses.get" call.
+// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *AccountStatus.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountStatus{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the status of a Merchant Center account. Multi-client accounts can only call this method for sub-accounts.",
+ // "httpMethod": "GET",
+ // "id": "content.accountstatuses.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "destinations": {
+ // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accountstatuses/{accountId}",
+ // "response": {
+ // "$ref": "AccountStatus"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accountstatuses.list":
+
+type AccountstatusesListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the statuses of the sub-accounts in your Merchant Center
+// account.
+func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall {
+ c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// Destinations sets the optional parameter "destinations": If set, only
+// issues for the specified destinations are returned, otherwise only
+// issues for the Shopping destination.
+func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall {
+ c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of account statuses to return in the response, used for
+// paging.
+func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccountstatusesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accountstatuses.list" call.
+// Exactly one of *AccountstatusesListResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *AccountstatusesListResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountstatusesListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.accountstatuses.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "destinations": {
+ // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "description": "The maximum number of account statuses to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. This must be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accountstatuses",
+ // "response": {
+ // "$ref": "AccountstatusesListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.accounttax.custombatch":
+
+type AccounttaxCustombatchCall struct {
+ s *APIService
+ accounttaxcustombatchrequest *AccounttaxCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch: Retrieves and updates tax settings of multiple accounts
+// in a single request.
+func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall {
+ c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.accounttaxcustombatchrequest = accounttaxcustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccounttaxCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounttax.custombatch" call.
+// Exactly one of *AccounttaxCustomBatchResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccounttaxCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves and updates tax settings of multiple accounts in a single request.",
+ // "httpMethod": "POST",
+ // "id": "content.accounttax.custombatch",
+ // "path": "accounttax/batch",
+ // "request": {
+ // "$ref": "AccounttaxCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "AccounttaxCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounttax.get":
+
+type AccounttaxGetCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves the tax settings of the account.
+func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall {
+ c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccounttaxGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounttax.get" call.
+// Exactly one of *AccountTax or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *AccountTax.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountTax{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the tax settings of the account.",
+ // "httpMethod": "GET",
+ // "id": "content.accounttax.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to get/update account tax settings.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounttax/{accountId}",
+ // "response": {
+ // "$ref": "AccountTax"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.accounttax.list":
+
+type AccounttaxListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the tax settings of the sub-accounts in your Merchant
+// Center account.
+func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall {
+ c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of tax settings to return in the response, used for paging.
+func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccounttaxListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounttax.list" call.
+// Exactly one of *AccounttaxListResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *AccounttaxListResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccounttaxListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.accounttax.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "maxResults": {
+ // "description": "The maximum number of tax settings to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. This must be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounttax",
+ // "response": {
+ // "$ref": "AccounttaxListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.accounttax.update":
+
+type AccounttaxUpdateCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ accounttax *AccountTax
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Update: Updates the tax settings of the account.
+func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall {
+ c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.accounttax = accounttax
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *AccounttaxUpdateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PUT", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.accounttax.update" call.
+// Exactly one of *AccountTax or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *AccountTax.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &AccountTax{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates the tax settings of the account.",
+ // "httpMethod": "PUT",
+ // "id": "content.accounttax.update",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to get/update account tax settings.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/accounttax/{accountId}",
+ // "request": {
+ // "$ref": "AccountTax"
+ // },
+ // "response": {
+ // "$ref": "AccountTax"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeeds.custombatch":
+
+type DatafeedsCustombatchCall struct {
+ s *APIService
+ datafeedscustombatchrequest *DatafeedsCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch:
+func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall {
+ c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.datafeedscustombatchrequest = datafeedscustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedsCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeeds.custombatch" call.
+// Exactly one of *DatafeedsCustomBatchResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &DatafeedsCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "httpMethod": "POST",
+ // "id": "content.datafeeds.custombatch",
+ // "path": "datafeeds/batch",
+ // "request": {
+ // "$ref": "DatafeedsCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "DatafeedsCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeeds.delete":
+
+type DatafeedsDeleteCall struct {
+ s *APIService
+ merchantId uint64
+ datafeedId uint64
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes a datafeed configuration from your Merchant Center
+// account.
+func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall {
+ c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.datafeedId = datafeedId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "datafeedId": strconv.FormatUint(c.datafeedId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeeds.delete" call.
+func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if err != nil {
+ return err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return err
+ }
+ return nil
+ // {
+ // "description": "Deletes a datafeed configuration from your Merchant Center account.",
+ // "httpMethod": "DELETE",
+ // "id": "content.datafeeds.delete",
+ // "parameterOrder": [
+ // "merchantId",
+ // "datafeedId"
+ // ],
+ // "parameters": {
+ // "datafeedId": {
+ // "description": "The ID of the datafeed.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeeds/{datafeedId}",
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeeds.fetchnow":
+
+type DatafeedsFetchnowCall struct {
+ s *APIService
+ merchantId uint64
+ datafeedId uint64
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center
+// account.
+func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall {
+ c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.datafeedId = datafeedId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedsFetchnowCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "datafeedId": strconv.FormatUint(c.datafeedId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeeds.fetchnow" call.
+// Exactly one of *DatafeedsFetchNowResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &DatafeedsFetchNowResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Invokes a fetch for the datafeed in your Merchant Center account.",
+ // "httpMethod": "POST",
+ // "id": "content.datafeeds.fetchnow",
+ // "parameterOrder": [
+ // "merchantId",
+ // "datafeedId"
+ // ],
+ // "parameters": {
+ // "datafeedId": {
+ // "description": "The ID of the datafeed to be fetched.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow",
+ // "response": {
+ // "$ref": "DatafeedsFetchNowResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeeds.get":
+
+type DatafeedsGetCall struct {
+ s *APIService
+ merchantId uint64
+ datafeedId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves a datafeed configuration from your Merchant Center
+// account.
+func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall {
+ c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.datafeedId = datafeedId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "datafeedId": strconv.FormatUint(c.datafeedId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeeds.get" call.
+// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Datafeed.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Datafeed{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves a datafeed configuration from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.datafeeds.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "datafeedId"
+ // ],
+ // "parameters": {
+ // "datafeedId": {
+ // "description": "The ID of the datafeed.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeeds/{datafeedId}",
+ // "response": {
+ // "$ref": "Datafeed"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeeds.insert":
+
+type DatafeedsInsertCall struct {
+ s *APIService
+ merchantId uint64
+ datafeed *Datafeed
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Registers a datafeed configuration with your Merchant Center
+// account.
+func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall {
+ c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.datafeed = datafeed
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedsInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeeds.insert" call.
+// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Datafeed.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Datafeed{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Registers a datafeed configuration with your Merchant Center account.",
+ // "httpMethod": "POST",
+ // "id": "content.datafeeds.insert",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeeds",
+ // "request": {
+ // "$ref": "Datafeed"
+ // },
+ // "response": {
+ // "$ref": "Datafeed"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeeds.list":
+
+type DatafeedsListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the configurations for datafeeds in your Merchant Center
+// account.
+func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall {
+ c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of products to return in the response, used for paging.
+func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeeds.list" call.
+// Exactly one of *DatafeedsListResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *DatafeedsListResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &DatafeedsListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the configurations for datafeeds in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.datafeeds.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "maxResults": {
+ // "description": "The maximum number of products to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeeds",
+ // "response": {
+ // "$ref": "DatafeedsListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.datafeeds.update":
+
+type DatafeedsUpdateCall struct {
+ s *APIService
+ merchantId uint64
+ datafeedId uint64
+ datafeed *Datafeed
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Update: Updates a datafeed configuration of your Merchant Center
+// account.
+func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall {
+ c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.datafeedId = datafeedId
+ c.datafeed = datafeed
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedsUpdateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PUT", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "datafeedId": strconv.FormatUint(c.datafeedId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeeds.update" call.
+// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Datafeed.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Datafeed{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates a datafeed configuration of your Merchant Center account.",
+ // "httpMethod": "PUT",
+ // "id": "content.datafeeds.update",
+ // "parameterOrder": [
+ // "merchantId",
+ // "datafeedId"
+ // ],
+ // "parameters": {
+ // "datafeedId": {
+ // "description": "The ID of the datafeed.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeeds/{datafeedId}",
+ // "request": {
+ // "$ref": "Datafeed"
+ // },
+ // "response": {
+ // "$ref": "Datafeed"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeedstatuses.custombatch":
+
+type DatafeedstatusesCustombatchCall struct {
+ s *APIService
+ datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch:
+func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall {
+ c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedstatusesCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeedstatuses.custombatch" call.
+// Exactly one of *DatafeedstatusesCustomBatchResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &DatafeedstatusesCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "httpMethod": "POST",
+ // "id": "content.datafeedstatuses.custombatch",
+ // "path": "datafeedstatuses/batch",
+ // "request": {
+ // "$ref": "DatafeedstatusesCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "DatafeedstatusesCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeedstatuses.get":
+
+type DatafeedstatusesGetCall struct {
+ s *APIService
+ merchantId uint64
+ datafeedId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves the status of a datafeed from your Merchant Center
+// account.
+func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall {
+ c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.datafeedId = datafeedId
+ return c
+}
+
+// Country sets the optional parameter "country": The country for which
+// to get the datafeed status. If this parameter is provided then
+// language must also be provided. Note that this parameter is required
+// for feeds targeting multiple countries and languages, since a feed
+// may have a different status for each target.
+func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall {
+ c.urlParams_.Set("country", country)
+ return c
+}
+
+// Language sets the optional parameter "language": The language for
+// which to get the datafeed status. If this parameter is provided then
+// country must also be provided. Note that this parameter is required
+// for feeds targeting multiple countries and languages, since a feed
+// may have a different status for each target.
+func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall {
+ c.urlParams_.Set("language", language)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedstatusesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "datafeedId": strconv.FormatUint(c.datafeedId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeedstatuses.get" call.
+// Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *DatafeedStatus.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &DatafeedStatus{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the status of a datafeed from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.datafeedstatuses.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "datafeedId"
+ // ],
+ // "parameters": {
+ // "country": {
+ // "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "datafeedId": {
+ // "description": "The ID of the datafeed.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "language": {
+ // "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeedstatuses/{datafeedId}",
+ // "response": {
+ // "$ref": "DatafeedStatus"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.datafeedstatuses.list":
+
+type DatafeedstatusesListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the statuses of the datafeeds in your Merchant Center
+// account.
+func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall {
+ c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of products to return in the response, used for paging.
+func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *DatafeedstatusesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.datafeedstatuses.list" call.
+// Exactly one of *DatafeedstatusesListResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *DatafeedstatusesListResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &DatafeedstatusesListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the statuses of the datafeeds in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.datafeedstatuses.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "maxResults": {
+ // "description": "The maximum number of products to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/datafeedstatuses",
+ // "response": {
+ // "$ref": "DatafeedstatusesListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.liasettings.custombatch":
+
+type LiasettingsCustombatchCall struct {
+ s *APIService
+ liasettingscustombatchrequest *LiasettingsCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch: Retrieves and/or updates the LIA settings of multiple
+// accounts in a single request.
+func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall {
+ c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.liasettingscustombatchrequest = liasettingscustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.custombatch" call.
+// Exactly one of *LiasettingsCustomBatchResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.",
+ // "httpMethod": "POST",
+ // "id": "content.liasettings.custombatch",
+ // "path": "liasettings/batch",
+ // "request": {
+ // "$ref": "LiasettingsCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "LiasettingsCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.get":
+
+type LiasettingsGetCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves the LIA settings of the account.
+func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall {
+ c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.get" call.
+// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *LiaSettings.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiaSettings{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the LIA settings of the account.",
+ // "httpMethod": "GET",
+ // "id": "content.liasettings.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to get or update LIA settings.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings/{accountId}",
+ // "response": {
+ // "$ref": "LiaSettings"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.getaccessiblegmbaccounts":
+
+type LiasettingsGetaccessiblegmbaccountsCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Getaccessiblegmbaccounts: Retrieves the list of accessible Google My
+// Business accounts.
+func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall {
+ c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.getaccessiblegmbaccounts" call.
+// Exactly one of *LiasettingsGetAccessibleGmbAccountsResponse or error
+// will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsGetAccessibleGmbAccountsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the list of accessible Google My Business accounts.",
+ // "httpMethod": "GET",
+ // "id": "content.liasettings.getaccessiblegmbaccounts",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts",
+ // "response": {
+ // "$ref": "LiasettingsGetAccessibleGmbAccountsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.list":
+
+type LiasettingsListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the LIA settings of the sub-accounts in your Merchant
+// Center account.
+func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall {
+ c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of LIA settings to return in the response, used for paging.
+func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.list" call.
+// Exactly one of *LiasettingsListResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *LiasettingsListResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.liasettings.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "maxResults": {
+ // "description": "The maximum number of LIA settings to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. This must be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings",
+ // "response": {
+ // "$ref": "LiasettingsListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.liasettings.listposdataproviders":
+
+type LiasettingsListposdataprovidersCall struct {
+ s *APIService
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Listposdataproviders: Retrieves the list of POS data providers that
+// have active settings for the all eiligible countries.
+func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall {
+ c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsListposdataprovidersCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.listposdataproviders" call.
+// Exactly one of *LiasettingsListPosDataProvidersResponse or error will
+// be non-nil. Any non-2xx status code is an error. Response headers are
+// in either
+// *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if
+// a response was returned at all) in error.(*googleapi.Error).Header.
+// Use googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsListPosDataProvidersResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.",
+ // "httpMethod": "GET",
+ // "id": "content.liasettings.listposdataproviders",
+ // "path": "liasettings/posdataproviders",
+ // "response": {
+ // "$ref": "LiasettingsListPosDataProvidersResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.requestgmbaccess":
+
+type LiasettingsRequestgmbaccessCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Requestgmbaccess: Requests access to a specified Google My Business
+// account.
+func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall {
+ c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.urlParams_.Set("gmbEmail", gmbEmail)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsRequestgmbaccessCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.requestgmbaccess" call.
+// Exactly one of *LiasettingsRequestGmbAccessResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsRequestGmbAccessResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Requests access to a specified Google My Business account.",
+ // "httpMethod": "POST",
+ // "id": "content.liasettings.requestgmbaccess",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId",
+ // "gmbEmail"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which GMB access is requested.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "gmbEmail": {
+ // "description": "The email of the Google My Business account.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess",
+ // "response": {
+ // "$ref": "LiasettingsRequestGmbAccessResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.requestinventoryverification":
+
+type LiasettingsRequestinventoryverificationCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ country string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Requestinventoryverification: Requests inventory validation for the
+// specified country.
+func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall {
+ c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.country = country
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ "country": c.country,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.requestinventoryverification" call.
+// Exactly one of *LiasettingsRequestInventoryVerificationResponse or
+// error will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header
+// or (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsRequestInventoryVerificationResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Requests inventory validation for the specified country.",
+ // "httpMethod": "POST",
+ // "id": "content.liasettings.requestinventoryverification",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId",
+ // "country"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "country": {
+ // "description": "The country for which inventory validation is requested.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}",
+ // "response": {
+ // "$ref": "LiasettingsRequestInventoryVerificationResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.setinventoryverificationcontact":
+
+type LiasettingsSetinventoryverificationcontactCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Setinventoryverificationcontact: Sets the inventory verification
+// contract for the specified country.
+func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, contactEmail string, contactName string, country string, language string) *LiasettingsSetinventoryverificationcontactCall {
+ c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.urlParams_.Set("contactEmail", contactEmail)
+ c.urlParams_.Set("contactName", contactName)
+ c.urlParams_.Set("country", country)
+ c.urlParams_.Set("language", language)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.setinventoryverificationcontact" call.
+// Exactly one of *LiasettingsSetInventoryVerificationContactResponse or
+// error will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Hea
+// der or (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsSetInventoryVerificationContactResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the inventory verification contract for the specified country.",
+ // "httpMethod": "POST",
+ // "id": "content.liasettings.setinventoryverificationcontact",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId",
+ // "contactEmail",
+ // "contactName",
+ // "country",
+ // "language"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "contactEmail": {
+ // "description": "The email of the inventory verification contact.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "contactName": {
+ // "description": "The name of the inventory verification contact.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "country": {
+ // "description": "The country for which inventory verification is requested.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "language": {
+ // "description": "The language for which inventory verification is requested.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact",
+ // "response": {
+ // "$ref": "LiasettingsSetInventoryVerificationContactResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.setposdataprovider":
+
+type LiasettingsSetposdataproviderCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Setposdataprovider: Sets the POS data provider for the specified
+// country.
+func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall {
+ c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.urlParams_.Set("country", country)
+ return c
+}
+
+// PosDataProviderId sets the optional parameter "posDataProviderId":
+// The ID of POS data provider.
+func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall {
+ c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId))
+ return c
+}
+
+// PosExternalAccountId sets the optional parameter
+// "posExternalAccountId": The account ID by which this merchant is
+// known to the POS data provider.
+func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall {
+ c.urlParams_.Set("posExternalAccountId", posExternalAccountId)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsSetposdataproviderCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.setposdataprovider" call.
+// Exactly one of *LiasettingsSetPosDataProviderResponse or error will
+// be non-nil. Any non-2xx status code is an error. Response headers are
+// in either
+// *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiasettingsSetPosDataProviderResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the POS data provider for the specified country.",
+ // "httpMethod": "POST",
+ // "id": "content.liasettings.setposdataprovider",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId",
+ // "country"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "country": {
+ // "description": "The country for which the POS data provider is selected.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "posDataProviderId": {
+ // "description": "The ID of POS data provider.",
+ // "format": "uint64",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "posExternalAccountId": {
+ // "description": "The account ID by which this merchant is known to the POS data provider.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings/{accountId}/setposdataprovider",
+ // "response": {
+ // "$ref": "LiasettingsSetPosDataProviderResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.liasettings.update":
+
+type LiasettingsUpdateCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ liasettings *LiaSettings
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Update: Updates the LIA settings of the account.
+func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall {
+ c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.liasettings = liasettings
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *LiasettingsUpdateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PUT", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.liasettings.update" call.
+// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *LiaSettings.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &LiaSettings{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates the LIA settings of the account.",
+ // "httpMethod": "PUT",
+ // "id": "content.liasettings.update",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to get or update LIA settings.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/liasettings/{accountId}",
+ // "request": {
+ // "$ref": "LiaSettings"
+ // },
+ // "response": {
+ // "$ref": "LiaSettings"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderinvoices.createchargeinvoice":
+
+type OrderinvoicesCreatechargeinvoiceCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Createchargeinvoice: Creates a charge invoice for a shipment group,
+// and triggers a charge capture for non-facilitated payment orders.
+func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall {
+ c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderinvoicesCreatechargeinvoiceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreatechargeinvoicerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderinvoices.createchargeinvoice" call.
+// Exactly one of *OrderinvoicesCreateChargeInvoiceResponse or error
+// will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *OrderinvoicesCreateChargeInvoiceResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderinvoicesCreateChargeInvoiceResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for non-facilitated payment orders.",
+ // "httpMethod": "POST",
+ // "id": "content.orderinvoices.createchargeinvoice",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice",
+ // "request": {
+ // "$ref": "OrderinvoicesCreateChargeInvoiceRequest"
+ // },
+ // "response": {
+ // "$ref": "OrderinvoicesCreateChargeInvoiceResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderinvoices.createrefundinvoice":
+
+type OrderinvoicesCreaterefundinvoiceCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Createrefundinvoice: Creates a refund invoice for one or more
+// shipment groups, and triggers a refund for non-facilitated payment
+// orders. This can only be used for line items that have previously
+// been charged using createChargeInvoice. All amounts (except for the
+// summary) are incremental with respect to the previous invoice.
+func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall {
+ c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderinvoices.createrefundinvoice" call.
+// Exactly one of *OrderinvoicesCreateRefundInvoiceResponse or error
+// will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *OrderinvoicesCreateRefundInvoiceResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderinvoicesCreateRefundInvoiceResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for non-facilitated payment orders. This can only be used for line items that have previously been charged using createChargeInvoice. All amounts (except for the summary) are incremental with respect to the previous invoice.",
+ // "httpMethod": "POST",
+ // "id": "content.orderinvoices.createrefundinvoice",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice",
+ // "request": {
+ // "$ref": "OrderinvoicesCreateRefundInvoiceRequest"
+ // },
+ // "response": {
+ // "$ref": "OrderinvoicesCreateRefundInvoiceResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderpayments.notifyauthapproved":
+
+type OrderpaymentsNotifyauthapprovedCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderpaymentsnotifyauthapprovedrequest *OrderpaymentsNotifyAuthApprovedRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Notifyauthapproved: Notify about successfully authorizing user's
+// payment method for a given amount.
+func (r *OrderpaymentsService) Notifyauthapproved(merchantId uint64, orderId string, orderpaymentsnotifyauthapprovedrequest *OrderpaymentsNotifyAuthApprovedRequest) *OrderpaymentsNotifyauthapprovedCall {
+ c := &OrderpaymentsNotifyauthapprovedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderpaymentsnotifyauthapprovedrequest = orderpaymentsnotifyauthapprovedrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderpaymentsNotifyauthapprovedCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyauthapprovedCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderpaymentsNotifyauthapprovedCall) Context(ctx context.Context) *OrderpaymentsNotifyauthapprovedCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderpaymentsNotifyauthapprovedCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderpaymentsNotifyauthapprovedCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyauthapprovedrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyAuthApproved")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderpayments.notifyauthapproved" call.
+// Exactly one of *OrderpaymentsNotifyAuthApprovedResponse or error will
+// be non-nil. Any non-2xx status code is an error. Response headers are
+// in either
+// *OrderpaymentsNotifyAuthApprovedResponse.ServerResponse.Header or (if
+// a response was returned at all) in error.(*googleapi.Error).Header.
+// Use googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrderpaymentsNotifyauthapprovedCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyAuthApprovedResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderpaymentsNotifyAuthApprovedResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Notify about successfully authorizing user's payment method for a given amount.",
+ // "httpMethod": "POST",
+ // "id": "content.orderpayments.notifyauthapproved",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order for for which payment authorization is happening.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderpayments/{orderId}/notifyAuthApproved",
+ // "request": {
+ // "$ref": "OrderpaymentsNotifyAuthApprovedRequest"
+ // },
+ // "response": {
+ // "$ref": "OrderpaymentsNotifyAuthApprovedResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderpayments.notifyauthdeclined":
+
+type OrderpaymentsNotifyauthdeclinedCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderpaymentsnotifyauthdeclinedrequest *OrderpaymentsNotifyAuthDeclinedRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Notifyauthdeclined: Notify about failure to authorize user's payment
+// method.
+func (r *OrderpaymentsService) Notifyauthdeclined(merchantId uint64, orderId string, orderpaymentsnotifyauthdeclinedrequest *OrderpaymentsNotifyAuthDeclinedRequest) *OrderpaymentsNotifyauthdeclinedCall {
+ c := &OrderpaymentsNotifyauthdeclinedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderpaymentsnotifyauthdeclinedrequest = orderpaymentsnotifyauthdeclinedrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderpaymentsNotifyauthdeclinedCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyauthdeclinedCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderpaymentsNotifyauthdeclinedCall) Context(ctx context.Context) *OrderpaymentsNotifyauthdeclinedCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderpaymentsNotifyauthdeclinedCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderpaymentsNotifyauthdeclinedCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyauthdeclinedrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyAuthDeclined")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderpayments.notifyauthdeclined" call.
+// Exactly one of *OrderpaymentsNotifyAuthDeclinedResponse or error will
+// be non-nil. Any non-2xx status code is an error. Response headers are
+// in either
+// *OrderpaymentsNotifyAuthDeclinedResponse.ServerResponse.Header or (if
+// a response was returned at all) in error.(*googleapi.Error).Header.
+// Use googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrderpaymentsNotifyauthdeclinedCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyAuthDeclinedResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderpaymentsNotifyAuthDeclinedResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Notify about failure to authorize user's payment method.",
+ // "httpMethod": "POST",
+ // "id": "content.orderpayments.notifyauthdeclined",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order for which payment authorization was declined.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderpayments/{orderId}/notifyAuthDeclined",
+ // "request": {
+ // "$ref": "OrderpaymentsNotifyAuthDeclinedRequest"
+ // },
+ // "response": {
+ // "$ref": "OrderpaymentsNotifyAuthDeclinedResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderpayments.notifycharge":
+
+type OrderpaymentsNotifychargeCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderpaymentsnotifychargerequest *OrderpaymentsNotifyChargeRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Notifycharge: Notify about charge on user's selected payments method.
+func (r *OrderpaymentsService) Notifycharge(merchantId uint64, orderId string, orderpaymentsnotifychargerequest *OrderpaymentsNotifyChargeRequest) *OrderpaymentsNotifychargeCall {
+ c := &OrderpaymentsNotifychargeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderpaymentsnotifychargerequest = orderpaymentsnotifychargerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderpaymentsNotifychargeCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifychargeCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderpaymentsNotifychargeCall) Context(ctx context.Context) *OrderpaymentsNotifychargeCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderpaymentsNotifychargeCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderpaymentsNotifychargeCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifychargerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyCharge")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderpayments.notifycharge" call.
+// Exactly one of *OrderpaymentsNotifyChargeResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrderpaymentsNotifyChargeResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrderpaymentsNotifychargeCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyChargeResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderpaymentsNotifyChargeResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Notify about charge on user's selected payments method.",
+ // "httpMethod": "POST",
+ // "id": "content.orderpayments.notifycharge",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order for which charge is happening.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderpayments/{orderId}/notifyCharge",
+ // "request": {
+ // "$ref": "OrderpaymentsNotifyChargeRequest"
+ // },
+ // "response": {
+ // "$ref": "OrderpaymentsNotifyChargeResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderpayments.notifyrefund":
+
+type OrderpaymentsNotifyrefundCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderpaymentsnotifyrefundrequest *OrderpaymentsNotifyRefundRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Notifyrefund: Notify about refund on user's selected payments method.
+func (r *OrderpaymentsService) Notifyrefund(merchantId uint64, orderId string, orderpaymentsnotifyrefundrequest *OrderpaymentsNotifyRefundRequest) *OrderpaymentsNotifyrefundCall {
+ c := &OrderpaymentsNotifyrefundCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderpaymentsnotifyrefundrequest = orderpaymentsnotifyrefundrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderpaymentsNotifyrefundCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyrefundCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderpaymentsNotifyrefundCall) Context(ctx context.Context) *OrderpaymentsNotifyrefundCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderpaymentsNotifyrefundCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderpaymentsNotifyrefundCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyrefundrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyRefund")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderpayments.notifyrefund" call.
+// Exactly one of *OrderpaymentsNotifyRefundResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrderpaymentsNotifyRefundResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrderpaymentsNotifyrefundCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyRefundResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderpaymentsNotifyRefundResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Notify about refund on user's selected payments method.",
+ // "httpMethod": "POST",
+ // "id": "content.orderpayments.notifyrefund",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order for which charge is happening.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderpayments/{orderId}/notifyRefund",
+ // "request": {
+ // "$ref": "OrderpaymentsNotifyRefundRequest"
+ // },
+ // "response": {
+ // "$ref": "OrderpaymentsNotifyRefundResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderreports.listdisbursements":
+
+type OrderreportsListdisbursementsCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Listdisbursements: Retrieves a report for disbursements from your
+// Merchant Center account.
+func (r *OrderreportsService) Listdisbursements(merchantId uint64, disbursementStartDate string) *OrderreportsListdisbursementsCall {
+ c := &OrderreportsListdisbursementsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.urlParams_.Set("disbursementStartDate", disbursementStartDate)
+ return c
+}
+
+// DisbursementEndDate sets the optional parameter
+// "disbursementEndDate": The last date which disbursements occurred. In
+// ISO 8601 format. Default: current date.
+func (c *OrderreportsListdisbursementsCall) DisbursementEndDate(disbursementEndDate string) *OrderreportsListdisbursementsCall {
+ c.urlParams_.Set("disbursementEndDate", disbursementEndDate)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of disbursements to return in the response, used for paging.
+func (c *OrderreportsListdisbursementsCall) MaxResults(maxResults int64) *OrderreportsListdisbursementsCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *OrderreportsListdisbursementsCall) PageToken(pageToken string) *OrderreportsListdisbursementsCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderreportsListdisbursementsCall) Fields(s ...googleapi.Field) *OrderreportsListdisbursementsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrderreportsListdisbursementsCall) IfNoneMatch(entityTag string) *OrderreportsListdisbursementsCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderreportsListdisbursementsCall) Context(ctx context.Context) *OrderreportsListdisbursementsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderreportsListdisbursementsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderreportsListdisbursementsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderreports.listdisbursements" call.
+// Exactly one of *OrderreportsListDisbursementsResponse or error will
+// be non-nil. Any non-2xx status code is an error. Response headers are
+// in either
+// *OrderreportsListDisbursementsResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListDisbursementsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderreportsListDisbursementsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves a report for disbursements from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.orderreports.listdisbursements",
+ // "parameterOrder": [
+ // "merchantId",
+ // "disbursementStartDate"
+ // ],
+ // "parameters": {
+ // "disbursementEndDate": {
+ // "description": "The last date which disbursements occurred. In ISO 8601 format. Default: current date.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "disbursementStartDate": {
+ // "description": "The first date which disbursements occurred. In ISO 8601 format.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "description": "The maximum number of disbursements to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderreports/disbursements",
+ // "response": {
+ // "$ref": "OrderreportsListDisbursementsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *OrderreportsListdisbursementsCall) Pages(ctx context.Context, f func(*OrderreportsListDisbursementsResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.orderreports.listtransactions":
+
+type OrderreportsListtransactionsCall struct {
+ s *APIService
+ merchantId uint64
+ disbursementId string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Listtransactions: Retrieves a list of transactions for a disbursement
+// from your Merchant Center account.
+func (r *OrderreportsService) Listtransactions(merchantId uint64, disbursementId string, transactionStartDate string) *OrderreportsListtransactionsCall {
+ c := &OrderreportsListtransactionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.disbursementId = disbursementId
+ c.urlParams_.Set("transactionStartDate", transactionStartDate)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of disbursements to return in the response, used for paging.
+func (c *OrderreportsListtransactionsCall) MaxResults(maxResults int64) *OrderreportsListtransactionsCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *OrderreportsListtransactionsCall) PageToken(pageToken string) *OrderreportsListtransactionsCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// TransactionEndDate sets the optional parameter "transactionEndDate":
+// The last date in which transaction occurred. In ISO 8601 format.
+// Default: current date.
+func (c *OrderreportsListtransactionsCall) TransactionEndDate(transactionEndDate string) *OrderreportsListtransactionsCall {
+ c.urlParams_.Set("transactionEndDate", transactionEndDate)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderreportsListtransactionsCall) Fields(s ...googleapi.Field) *OrderreportsListtransactionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrderreportsListtransactionsCall) IfNoneMatch(entityTag string) *OrderreportsListtransactionsCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderreportsListtransactionsCall) Context(ctx context.Context) *OrderreportsListtransactionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderreportsListtransactionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderreportsListtransactionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements/{disbursementId}/transactions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "disbursementId": c.disbursementId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderreports.listtransactions" call.
+// Exactly one of *OrderreportsListTransactionsResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrderreportsListTransactionsResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrderreportsListtransactionsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListTransactionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderreportsListTransactionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.orderreports.listtransactions",
+ // "parameterOrder": [
+ // "merchantId",
+ // "disbursementId",
+ // "transactionStartDate"
+ // ],
+ // "parameters": {
+ // "disbursementId": {
+ // "description": "The Google-provided ID of the disbursement (found in Wallet).",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "description": "The maximum number of disbursements to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "transactionEndDate": {
+ // "description": "The last date in which transaction occurred. In ISO 8601 format. Default: current date.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "transactionStartDate": {
+ // "description": "The first date in which transaction occurred. In ISO 8601 format.",
+ // "location": "query",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions",
+ // "response": {
+ // "$ref": "OrderreportsListTransactionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *OrderreportsListtransactionsCall) Pages(ctx context.Context, f func(*OrderreportsListTransactionsResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.orderreturns.get":
+
+type OrderreturnsGetCall struct {
+ s *APIService
+ merchantId uint64
+ returnId string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves an order return from your Merchant Center account.
+func (r *OrderreturnsService) Get(merchantId uint64, returnId string) *OrderreturnsGetCall {
+ c := &OrderreturnsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.returnId = returnId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderreturnsGetCall) Fields(s ...googleapi.Field) *OrderreturnsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrderreturnsGetCall) IfNoneMatch(entityTag string) *OrderreturnsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderreturnsGetCall) Context(ctx context.Context) *OrderreturnsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderreturnsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderreturnsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "returnId": c.returnId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderreturns.get" call.
+// Exactly one of *MerchantOrderReturn or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *MerchantOrderReturn.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderReturn, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &MerchantOrderReturn{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves an order return from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.orderreturns.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "returnId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "returnId": {
+ // "description": "Merchant order return ID generated by Google.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderreturns/{returnId}",
+ // "response": {
+ // "$ref": "MerchantOrderReturn"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orderreturns.list":
+
+type OrderreturnsListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists order returns in your Merchant Center account.
+func (r *OrderreturnsService) List(merchantId uint64) *OrderreturnsListCall {
+ c := &OrderreturnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// CreatedEndDate sets the optional parameter "createdEndDate": Obtains
+// order returns created before this date (inclusively), in ISO 8601
+// format.
+func (c *OrderreturnsListCall) CreatedEndDate(createdEndDate string) *OrderreturnsListCall {
+ c.urlParams_.Set("createdEndDate", createdEndDate)
+ return c
+}
+
+// CreatedStartDate sets the optional parameter "createdStartDate":
+// Obtains order returns created after this date (inclusively), in ISO
+// 8601 format.
+func (c *OrderreturnsListCall) CreatedStartDate(createdStartDate string) *OrderreturnsListCall {
+ c.urlParams_.Set("createdStartDate", createdStartDate)
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of order returns to return in the response, used for paging.
+// The default value is 25 returns per page, and the maximum allowed
+// value is 250 returns per page.
+func (c *OrderreturnsListCall) MaxResults(maxResults int64) *OrderreturnsListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": Return the results in
+// the specified order.
+//
+// Possible values:
+// "returnCreationTimeAsc"
+// "returnCreationTimeDesc"
+func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrderreturnsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orderreturns.list" call.
+// Exactly one of *OrderreturnsListResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *OrderreturnsListResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrderreturnsListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists order returns in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.orderreturns.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "createdEndDate": {
+ // "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "createdStartDate": {
+ // "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "description": "The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderBy": {
+ // "description": "Return the results in the specified order.",
+ // "enum": [
+ // "returnCreationTimeAsc",
+ // "returnCreationTimeDesc"
+ // ],
+ // "enumDescriptions": [
+ // "",
+ // ""
+ // ],
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orderreturns",
+ // "response": {
+ // "$ref": "OrderreturnsListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.orders.acknowledge":
+
+type OrdersAcknowledgeCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersacknowledgerequest *OrdersAcknowledgeRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Acknowledge: Marks an order as acknowledged.
+func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall {
+ c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersacknowledgerequest = ordersacknowledgerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersAcknowledgeCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.acknowledge" call.
+// Exactly one of *OrdersAcknowledgeResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersAcknowledgeResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Marks an order as acknowledged.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.acknowledge",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/acknowledge",
+ // "request": {
+ // "$ref": "OrdersAcknowledgeRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersAcknowledgeResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.advancetestorder":
+
+type OrdersAdvancetestorderCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Advancetestorder: Sandbox only. Moves a test order from state
+// "inProgress" to state "pendingShipment".
+func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall {
+ c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersAdvancetestorderCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.advancetestorder" call.
+// Exactly one of *OrdersAdvanceTestOrderResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersAdvanceTestOrderResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sandbox only. Moves a test order from state \"inProgress\" to state \"pendingShipment\".",
+ // "httpMethod": "POST",
+ // "id": "content.orders.advancetestorder",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the test order to modify.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/testorders/{orderId}/advance",
+ // "response": {
+ // "$ref": "OrdersAdvanceTestOrderResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.cancel":
+
+type OrdersCancelCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderscancelrequest *OrdersCancelRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Cancel: Cancels all line items in an order, making a full refund.
+func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall {
+ c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderscancelrequest = orderscancelrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersCancelCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.cancel" call.
+// Exactly one of *OrdersCancelResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *OrdersCancelResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersCancelResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Cancels all line items in an order, making a full refund.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.cancel",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order to cancel.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/cancel",
+ // "request": {
+ // "$ref": "OrdersCancelRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersCancelResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.cancellineitem":
+
+type OrdersCancellineitemCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderscancellineitemrequest *OrdersCancelLineItemRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Cancellineitem: Cancels a line item, making a full refund.
+func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall {
+ c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderscancellineitemrequest = orderscancellineitemrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersCancellineitemCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.cancellineitem" call.
+// Exactly one of *OrdersCancelLineItemResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersCancelLineItemResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Cancels a line item, making a full refund.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.cancellineitem",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/cancelLineItem",
+ // "request": {
+ // "$ref": "OrdersCancelLineItemRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersCancelLineItemResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.canceltestorderbycustomer":
+
+type OrdersCanceltestorderbycustomerCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Canceltestorderbycustomer: Sandbox only. Cancels a test order for
+// customer-initiated cancellation.
+func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall {
+ c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersCanceltestorderbycustomerCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.canceltestorderbycustomer" call.
+// Exactly one of *OrdersCancelTestOrderByCustomerResponse or error will
+// be non-nil. Any non-2xx status code is an error. Response headers are
+// in either
+// *OrdersCancelTestOrderByCustomerResponse.ServerResponse.Header or (if
+// a response was returned at all) in error.(*googleapi.Error).Header.
+// Use googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersCancelTestOrderByCustomerResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.canceltestorderbycustomer",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the test order to cancel.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/testorders/{orderId}/cancelByCustomer",
+ // "request": {
+ // "$ref": "OrdersCancelTestOrderByCustomerRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersCancelTestOrderByCustomerResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.createtestorder":
+
+type OrdersCreatetestorderCall struct {
+ s *APIService
+ merchantId uint64
+ orderscreatetestorderrequest *OrdersCreateTestOrderRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Createtestorder: Sandbox only. Creates a test order.
+func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall {
+ c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderscreatetestorderrequest = orderscreatetestorderrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersCreatetestorderCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.createtestorder" call.
+// Exactly one of *OrdersCreateTestOrderResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersCreateTestOrderResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sandbox only. Creates a test order.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.createtestorder",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/testorders",
+ // "request": {
+ // "$ref": "OrdersCreateTestOrderRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersCreateTestOrderResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.createtestreturn":
+
+type OrdersCreatetestreturnCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderscreatetestreturnrequest *OrdersCreateTestReturnRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Createtestreturn: Sandbox only. Creates a test return.
+func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall {
+ c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderscreatetestreturnrequest = orderscreatetestreturnrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersCreatetestreturnCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestreturnrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.createtestreturn" call.
+// Exactly one of *OrdersCreateTestReturnResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersCreateTestReturnResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sandbox only. Creates a test return.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.createtestreturn",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/testreturn",
+ // "request": {
+ // "$ref": "OrdersCreateTestReturnRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersCreateTestReturnResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.get":
+
+type OrdersGetCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves an order from your Merchant Center account.
+func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall {
+ c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.get" call.
+// Exactly one of *Order or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Order.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Order{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves an order from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.orders.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}",
+ // "response": {
+ // "$ref": "Order"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.getbymerchantorderid":
+
+type OrdersGetbymerchantorderidCall struct {
+ s *APIService
+ merchantId uint64
+ merchantOrderId string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Getbymerchantorderid: Retrieves an order using merchant order id.
+func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall {
+ c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.merchantOrderId = merchantOrderId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersGetbymerchantorderidCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "merchantOrderId": c.merchantOrderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.getbymerchantorderid" call.
+// Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersGetByMerchantOrderIdResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves an order using merchant order id.",
+ // "httpMethod": "GET",
+ // "id": "content.orders.getbymerchantorderid",
+ // "parameterOrder": [
+ // "merchantId",
+ // "merchantOrderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantOrderId": {
+ // "description": "The merchant order id to be looked for.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}",
+ // "response": {
+ // "$ref": "OrdersGetByMerchantOrderIdResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.gettestordertemplate":
+
+type OrdersGettestordertemplateCall struct {
+ s *APIService
+ merchantId uint64
+ templateName string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Gettestordertemplate: Sandbox only. Retrieves an order template that
+// can be used to quickly create a new order in sandbox.
+func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall {
+ c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.templateName = templateName
+ return c
+}
+
+// Country sets the optional parameter "country": The country of the
+// template to retrieve. Defaults to US.
+func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall {
+ c.urlParams_.Set("country", country)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersGettestordertemplateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "templateName": c.templateName,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.gettestordertemplate" call.
+// Exactly one of *OrdersGetTestOrderTemplateResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersGetTestOrderTemplateResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.",
+ // "httpMethod": "GET",
+ // "id": "content.orders.gettestordertemplate",
+ // "parameterOrder": [
+ // "merchantId",
+ // "templateName"
+ // ],
+ // "parameters": {
+ // "country": {
+ // "description": "The country of the template to retrieve. Defaults to US.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "templateName": {
+ // "description": "The name of the template to retrieve.",
+ // "enum": [
+ // "template1",
+ // "template1a",
+ // "template1b",
+ // "template2"
+ // ],
+ // "enumDescriptions": [
+ // "",
+ // "",
+ // "",
+ // ""
+ // ],
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/testordertemplates/{templateName}",
+ // "response": {
+ // "$ref": "OrdersGetTestOrderTemplateResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.instorerefundlineitem":
+
+type OrdersInstorerefundlineitemCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Instorerefundlineitem: Notifies that item return and refund was
+// handled directly by merchant outside of Google payments processing
+// (e.g. cash refund done in store).
+func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall {
+ c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersInstorerefundlineitemCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.instorerefundlineitem" call.
+// Exactly one of *OrdersInStoreRefundLineItemResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersInStoreRefundLineItemResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store).",
+ // "httpMethod": "POST",
+ // "id": "content.orders.instorerefundlineitem",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem",
+ // "request": {
+ // "$ref": "OrdersInStoreRefundLineItemRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersInStoreRefundLineItemResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.list":
+
+type OrdersListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the orders in your Merchant Center account.
+func (r *OrdersService) List(merchantId uint64) *OrdersListCall {
+ c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// Acknowledged sets the optional parameter "acknowledged": Obtains
+// orders that match the acknowledgement status. When set to true,
+// obtains orders that have been acknowledged. When false, obtains
+// orders that have not been acknowledged.
+// We recommend using this filter set to false, in conjunction with the
+// acknowledge call, such that only un-acknowledged orders are returned.
+func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall {
+ c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged))
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of orders to return in the response, used for paging. The
+// default value is 25 orders per page, and the maximum allowed value is
+// 250 orders per page.
+// Known issue: All List calls will return all Orders without limit
+// regardless of the value of this field.
+func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": The ordering of the
+// returned list. The only supported value are placedDate desc and
+// placedDate asc for now, which returns orders sorted by placement
+// date. "placedDate desc" stands for listing orders by placement date,
+// from oldest to most recent. "placedDate asc" stands for listing
+// orders by placement date, from most recent to oldest. In future
+// releases we'll support other sorting criteria.
+//
+// Possible values:
+// "placedDate asc"
+// "placedDate desc"
+func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains
+// orders placed before this date (exclusively), in ISO 8601 format.
+func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall {
+ c.urlParams_.Set("placedDateEnd", placedDateEnd)
+ return c
+}
+
+// PlacedDateStart sets the optional parameter "placedDateStart":
+// Obtains orders placed after this date (inclusively), in ISO 8601
+// format.
+func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall {
+ c.urlParams_.Set("placedDateStart", placedDateStart)
+ return c
+}
+
+// Statuses sets the optional parameter "statuses": Obtains orders that
+// match any of the specified statuses. Multiple values can be specified
+// with comma separation. Additionally, please note that active is a
+// shortcut for pendingShipment and partiallyShipped, and completed is a
+// shortcut for shipped , partiallyDelivered, delivered,
+// partiallyReturned, returned, and canceled.
+//
+// Possible values:
+// "active"
+// "canceled"
+// "completed"
+// "delivered"
+// "inProgress"
+// "partiallyDelivered"
+// "partiallyReturned"
+// "partiallyShipped"
+// "pendingShipment"
+// "returned"
+// "shipped"
+func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall {
+ c.urlParams_.SetMulti("statuses", append([]string{}, statuses...))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.list" call.
+// Exactly one of *OrdersListResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *OrdersListResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the orders in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.orders.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "acknowledged": {
+ // "description": "Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged.\nWe recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned.",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "maxResults": {
+ // "description": "The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.\nKnown issue: All List calls will return all Orders without limit regardless of the value of this field.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderBy": {
+ // "description": "The ordering of the returned list. The only supported value are placedDate desc and placedDate asc for now, which returns orders sorted by placement date. \"placedDate desc\" stands for listing orders by placement date, from oldest to most recent. \"placedDate asc\" stands for listing orders by placement date, from most recent to oldest. In future releases we'll support other sorting criteria.",
+ // "enum": [
+ // "placedDate asc",
+ // "placedDate desc"
+ // ],
+ // "enumDescriptions": [
+ // "",
+ // ""
+ // ],
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "placedDateEnd": {
+ // "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "placedDateStart": {
+ // "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "statuses": {
+ // "description": "Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, please note that active is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered, partiallyReturned, returned, and canceled.",
+ // "enum": [
+ // "active",
+ // "canceled",
+ // "completed",
+ // "delivered",
+ // "inProgress",
+ // "partiallyDelivered",
+ // "partiallyReturned",
+ // "partiallyShipped",
+ // "pendingShipment",
+ // "returned",
+ // "shipped"
+ // ],
+ // "enumDescriptions": [
+ // "",
+ // "",
+ // "",
+ // "",
+ // "",
+ // "",
+ // "",
+ // "",
+ // "",
+ // "",
+ // ""
+ // ],
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders",
+ // "response": {
+ // "$ref": "OrdersListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.orders.rejectreturnlineitem":
+
+type OrdersRejectreturnlineitemCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Rejectreturnlineitem: Rejects return on an line item.
+func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall {
+ c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersRejectreturnlineitemCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.rejectreturnlineitem" call.
+// Exactly one of *OrdersRejectReturnLineItemResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersRejectReturnLineItemResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Rejects return on an line item.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.rejectreturnlineitem",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem",
+ // "request": {
+ // "$ref": "OrdersRejectReturnLineItemRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersRejectReturnLineItemResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.returnrefundlineitem":
+
+type OrdersReturnrefundlineitemCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Returnrefundlineitem: Returns and refunds a line item. Note that this
+// method can only be called on fully shipped orders.
+func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall {
+ c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersReturnrefundlineitemCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.returnrefundlineitem" call.
+// Exactly one of *OrdersReturnRefundLineItemResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersReturnRefundLineItemResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.returnrefundlineitem",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/returnRefundLineItem",
+ // "request": {
+ // "$ref": "OrdersReturnRefundLineItemRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersReturnRefundLineItemResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.setlineitemmetadata":
+
+type OrdersSetlineitemmetadataCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Setlineitemmetadata: Sets (overrides) merchant provided annotations
+// on the line item.
+func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall {
+ c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersSetlineitemmetadataCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.setlineitemmetadata" call.
+// Exactly one of *OrdersSetLineItemMetadataResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersSetLineItemMetadataResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets (overrides) merchant provided annotations on the line item.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.setlineitemmetadata",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/setLineItemMetadata",
+ // "request": {
+ // "$ref": "OrdersSetLineItemMetadataRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersSetLineItemMetadataResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.shiplineitems":
+
+type OrdersShiplineitemsCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersshiplineitemsrequest *OrdersShipLineItemsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Shiplineitems: Marks line item(s) as shipped.
+func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall {
+ c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersshiplineitemsrequest = ordersshiplineitemsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersShiplineitemsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.shiplineitems" call.
+// Exactly one of *OrdersShipLineItemsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersShipLineItemsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Marks line item(s) as shipped.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.shiplineitems",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/shipLineItems",
+ // "request": {
+ // "$ref": "OrdersShipLineItemsRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersShipLineItemsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.updatelineitemshippingdetails":
+
+type OrdersUpdatelineitemshippingdetailsCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Updatelineitemshippingdetails: Updates ship by and delivery by dates
+// for a line item.
+func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall {
+ c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.updatelineitemshippingdetails" call.
+// Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error
+// will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersUpdateLineItemShippingDetailsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates ship by and delivery by dates for a line item.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.updatelineitemshippingdetails",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails",
+ // "request": {
+ // "$ref": "OrdersUpdateLineItemShippingDetailsRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersUpdateLineItemShippingDetailsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.updatemerchantorderid":
+
+type OrdersUpdatemerchantorderidCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Updatemerchantorderid: Updates the merchant order ID for a given
+// order.
+func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall {
+ c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersUpdatemerchantorderidCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.updatemerchantorderid" call.
+// Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersUpdateMerchantOrderIdResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates the merchant order ID for a given order.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.updatemerchantorderid",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId",
+ // "request": {
+ // "$ref": "OrdersUpdateMerchantOrderIdRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersUpdateMerchantOrderIdResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.orders.updateshipment":
+
+type OrdersUpdateshipmentCall struct {
+ s *APIService
+ merchantId uint64
+ orderId string
+ ordersupdateshipmentrequest *OrdersUpdateShipmentRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Updateshipment: Updates a shipment's status, carrier, and/or tracking
+// ID.
+func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall {
+ c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.orderId = orderId
+ c.ordersupdateshipmentrequest = ordersupdateshipmentrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *OrdersUpdateshipmentCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "orderId": c.orderId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.orders.updateshipment" call.
+// Exactly one of *OrdersUpdateShipmentResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &OrdersUpdateShipmentResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates a shipment's status, carrier, and/or tracking ID.",
+ // "httpMethod": "POST",
+ // "id": "content.orders.updateshipment",
+ // "parameterOrder": [
+ // "merchantId",
+ // "orderId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderId": {
+ // "description": "The ID of the order.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/orders/{orderId}/updateShipment",
+ // "request": {
+ // "$ref": "OrdersUpdateShipmentRequest"
+ // },
+ // "response": {
+ // "$ref": "OrdersUpdateShipmentResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.pos.custombatch":
+
+type PosCustombatchCall struct {
+ s *APIService
+ poscustombatchrequest *PosCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch: Batches multiple POS-related calls in a single request.
+func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall {
+ c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.poscustombatchrequest = poscustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *PosCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.poscustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.pos.custombatch" call.
+// Exactly one of *PosCustomBatchResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *PosCustomBatchResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &PosCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Batches multiple POS-related calls in a single request.",
+ // "httpMethod": "POST",
+ // "id": "content.pos.custombatch",
+ // "path": "pos/batch",
+ // "request": {
+ // "$ref": "PosCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "PosCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.pos.delete":
+
+type PosDeleteCall struct {
+ s *APIService
+ merchantId uint64
+ targetMerchantId uint64
+ storeCode string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes a store for the given merchant.
+func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall {
+ c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.targetMerchantId = targetMerchantId
+ c.storeCode = storeCode
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *PosDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
+ "storeCode": c.storeCode,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.pos.delete" call.
+func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if err != nil {
+ return err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return err
+ }
+ return nil
+ // {
+ // "description": "Deletes a store for the given merchant.",
+ // "httpMethod": "DELETE",
+ // "id": "content.pos.delete",
+ // "parameterOrder": [
+ // "merchantId",
+ // "targetMerchantId",
+ // "storeCode"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the POS or inventory data provider.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "storeCode": {
+ // "description": "A store code that is unique per merchant.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetMerchantId": {
+ // "description": "The ID of the target merchant.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}",
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.pos.get":
+
+type PosGetCall struct {
+ s *APIService
+ merchantId uint64
+ targetMerchantId uint64
+ storeCode string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves information about the given store.
+func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall {
+ c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.targetMerchantId = targetMerchantId
+ c.storeCode = storeCode
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *PosGetCall) Context(ctx context.Context) *PosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *PosGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PosGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
+ "storeCode": c.storeCode,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.pos.get" call.
+// Exactly one of *PosStore or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *PosStore.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &PosStore{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves information about the given store.",
+ // "httpMethod": "GET",
+ // "id": "content.pos.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "targetMerchantId",
+ // "storeCode"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the POS or inventory data provider.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "storeCode": {
+ // "description": "A store code that is unique per merchant.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetMerchantId": {
+ // "description": "The ID of the target merchant.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}",
+ // "response": {
+ // "$ref": "PosStore"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.pos.insert":
+
+type PosInsertCall struct {
+ s *APIService
+ merchantId uint64
+ targetMerchantId uint64
+ posstore *PosStore
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Creates a store for the given merchant.
+func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall {
+ c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.targetMerchantId = targetMerchantId
+ c.posstore = posstore
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *PosInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.posstore)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.pos.insert" call.
+// Exactly one of *PosStore or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *PosStore.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &PosStore{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a store for the given merchant.",
+ // "httpMethod": "POST",
+ // "id": "content.pos.insert",
+ // "parameterOrder": [
+ // "merchantId",
+ // "targetMerchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the POS or inventory data provider.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetMerchantId": {
+ // "description": "The ID of the target merchant.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/pos/{targetMerchantId}/store",
+ // "request": {
+ // "$ref": "PosStore"
+ // },
+ // "response": {
+ // "$ref": "PosStore"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.pos.inventory":
+
+type PosInventoryCall struct {
+ s *APIService
+ merchantId uint64
+ targetMerchantId uint64
+ posinventoryrequest *PosInventoryRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Inventory: Submit inventory for the given merchant.
+func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall {
+ c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.targetMerchantId = targetMerchantId
+ c.posinventoryrequest = posinventoryrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *PosInventoryCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.posinventoryrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.pos.inventory" call.
+// Exactly one of *PosInventoryResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *PosInventoryResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &PosInventoryResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Submit inventory for the given merchant.",
+ // "httpMethod": "POST",
+ // "id": "content.pos.inventory",
+ // "parameterOrder": [
+ // "merchantId",
+ // "targetMerchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the POS or inventory data provider.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetMerchantId": {
+ // "description": "The ID of the target merchant.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/pos/{targetMerchantId}/inventory",
+ // "request": {
+ // "$ref": "PosInventoryRequest"
+ // },
+ // "response": {
+ // "$ref": "PosInventoryResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.pos.list":
+
+type PosListCall struct {
+ s *APIService
+ merchantId uint64
+ targetMerchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the stores of the target merchant.
+func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall {
+ c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.targetMerchantId = targetMerchantId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *PosListCall) Context(ctx context.Context) *PosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *PosListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PosListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.pos.list" call.
+// Exactly one of *PosListResponse or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *PosListResponse.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &PosListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the stores of the target merchant.",
+ // "httpMethod": "GET",
+ // "id": "content.pos.list",
+ // "parameterOrder": [
+ // "merchantId",
+ // "targetMerchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the POS or inventory data provider.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetMerchantId": {
+ // "description": "The ID of the target merchant.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/pos/{targetMerchantId}/store",
+ // "response": {
+ // "$ref": "PosListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.pos.sale":
+
+type PosSaleCall struct {
+ s *APIService
+ merchantId uint64
+ targetMerchantId uint64
+ possalerequest *PosSaleRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Sale: Submit a sale event for the given merchant.
+func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall {
+ c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.targetMerchantId = targetMerchantId
+ c.possalerequest = possalerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *PosSaleCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.possalerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.pos.sale" call.
+// Exactly one of *PosSaleResponse or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *PosSaleResponse.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &PosSaleResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Submit a sale event for the given merchant.",
+ // "httpMethod": "POST",
+ // "id": "content.pos.sale",
+ // "parameterOrder": [
+ // "merchantId",
+ // "targetMerchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the POS or inventory data provider.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "targetMerchantId": {
+ // "description": "The ID of the target merchant.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/pos/{targetMerchantId}/sale",
+ // "request": {
+ // "$ref": "PosSaleRequest"
+ // },
+ // "response": {
+ // "$ref": "PosSaleResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.products.custombatch":
+
+type ProductsCustombatchCall struct {
+ s *APIService
+ productscustombatchrequest *ProductsCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch: Retrieves, inserts, and deletes multiple products in a
+// single request.
+func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall {
+ c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.productscustombatchrequest = productscustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductsCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.productscustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.products.custombatch" call.
+// Exactly one of *ProductsCustomBatchResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *ProductsCustomBatchResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ProductsCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves, inserts, and deletes multiple products in a single request.",
+ // "httpMethod": "POST",
+ // "id": "content.products.custombatch",
+ // "path": "products/batch",
+ // "request": {
+ // "$ref": "ProductsCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "ProductsCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.products.delete":
+
+type ProductsDeleteCall struct {
+ s *APIService
+ merchantId uint64
+ productId string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes a product from your Merchant Center account.
+func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall {
+ c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.productId = productId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "productId": c.productId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.products.delete" call.
+func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if err != nil {
+ return err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return err
+ }
+ return nil
+ // {
+ // "description": "Deletes a product from your Merchant Center account.",
+ // "httpMethod": "DELETE",
+ // "id": "content.products.delete",
+ // "parameterOrder": [
+ // "merchantId",
+ // "productId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "productId": {
+ // "description": "The REST id of the product.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/products/{productId}",
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.products.get":
+
+type ProductsGetCall struct {
+ s *APIService
+ merchantId uint64
+ productId string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves a product from your Merchant Center account.
+func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall {
+ c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.productId = productId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "productId": c.productId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.products.get" call.
+// Exactly one of *Product or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Product.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Product{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves a product from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.products.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "productId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "productId": {
+ // "description": "The REST id of the product.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/products/{productId}",
+ // "response": {
+ // "$ref": "Product"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.products.insert":
+
+type ProductsInsertCall struct {
+ s *APIService
+ merchantId uint64
+ product *Product
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Insert: Uploads a product to your Merchant Center account. If an item
+// with the same channel, contentLanguage, offerId, and targetCountry
+// already exists, this method updates that entry.
+func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall {
+ c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.product = product
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductsInsertCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.product)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.products.insert" call.
+// Exactly one of *Product or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Product.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Product{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.",
+ // "httpMethod": "POST",
+ // "id": "content.products.insert",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/products",
+ // "request": {
+ // "$ref": "Product"
+ // },
+ // "response": {
+ // "$ref": "Product"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.products.list":
+
+type ProductsListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the products in your Merchant Center account.
+func (r *ProductsService) List(merchantId uint64) *ProductsListCall {
+ c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of products to return in the response, used for paging.
+func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.products.list" call.
+// Exactly one of *ProductsListResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *ProductsListResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ProductsListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the products in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.products.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "maxResults": {
+ // "description": "The maximum number of products to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/products",
+ // "response": {
+ // "$ref": "ProductsListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.productstatuses.custombatch":
+
+type ProductstatusesCustombatchCall struct {
+ s *APIService
+ productstatusescustombatchrequest *ProductstatusesCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch: Gets the statuses of multiple products in a single
+// request.
+func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall {
+ c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.productstatusescustombatchrequest = productstatusescustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductstatusesCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.productstatusescustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.productstatuses.custombatch" call.
+// Exactly one of *ProductstatusesCustomBatchResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *ProductstatusesCustomBatchResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ProductstatusesCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the statuses of multiple products in a single request.",
+ // "httpMethod": "POST",
+ // "id": "content.productstatuses.custombatch",
+ // "path": "productstatuses/batch",
+ // "request": {
+ // "$ref": "ProductstatusesCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "ProductstatusesCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.productstatuses.get":
+
+type ProductstatusesGetCall struct {
+ s *APIService
+ merchantId uint64
+ productId string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Gets the status of a product from your Merchant Center account.
+func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall {
+ c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.productId = productId
+ return c
+}
+
+// Destinations sets the optional parameter "destinations": If set, only
+// issues for the specified destinations are returned, otherwise only
+// issues for the Shopping destination.
+func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall {
+ c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductstatusesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "productId": c.productId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.productstatuses.get" call.
+// Exactly one of *ProductStatus or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *ProductStatus.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ProductStatus{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the status of a product from your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.productstatuses.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "productId"
+ // ],
+ // "parameters": {
+ // "destinations": {
+ // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "productId": {
+ // "description": "The REST id of the product.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/productstatuses/{productId}",
+ // "response": {
+ // "$ref": "ProductStatus"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.productstatuses.list":
+
+type ProductstatusesListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the statuses of the products in your Merchant Center
+// account.
+func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall {
+ c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// Destinations sets the optional parameter "destinations": If set, only
+// issues for the specified destinations are returned, otherwise only
+// issues for the Shopping destination.
+func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall {
+ c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of product statuses to return in the response, used for
+// paging.
+func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProductstatusesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.productstatuses.list" call.
+// Exactly one of *ProductstatusesListResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *ProductstatusesListResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ProductstatusesListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the statuses of the products in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.productstatuses.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "destinations": {
+ // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "maxResults": {
+ // "description": "The maximum number of product statuses to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/productstatuses",
+ // "response": {
+ // "$ref": "ProductstatusesListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.shippingsettings.custombatch":
+
+type ShippingsettingsCustombatchCall struct {
+ s *APIService
+ shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Custombatch: Retrieves and updates the shipping settings of multiple
+// accounts in a single request.
+func (r *ShippingsettingsService) Custombatch(shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest) *ShippingsettingsCustombatchCall {
+ c := &ShippingsettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.shippingsettingscustombatchrequest = shippingsettingscustombatchrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ShippingsettingsCustombatchCall) Fields(s ...googleapi.Field) *ShippingsettingsCustombatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ShippingsettingsCustombatchCall) Context(ctx context.Context) *ShippingsettingsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ShippingsettingsCustombatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ShippingsettingsCustombatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettingscustombatchrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "shippingsettings/batch")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.shippingsettings.custombatch" call.
+// Exactly one of *ShippingsettingsCustomBatchResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *ShippingsettingsCustomBatchResponse.ServerResponse.Header or
+// (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *ShippingsettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsCustomBatchResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ShippingsettingsCustomBatchResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.",
+ // "httpMethod": "POST",
+ // "id": "content.shippingsettings.custombatch",
+ // "path": "shippingsettings/batch",
+ // "request": {
+ // "$ref": "ShippingsettingsCustomBatchRequest"
+ // },
+ // "response": {
+ // "$ref": "ShippingsettingsCustomBatchResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.shippingsettings.get":
+
+type ShippingsettingsGetCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Retrieves the shipping settings of the account.
+func (r *ShippingsettingsService) Get(merchantId uint64, accountId uint64) *ShippingsettingsGetCall {
+ c := &ShippingsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ShippingsettingsGetCall) Fields(s ...googleapi.Field) *ShippingsettingsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ShippingsettingsGetCall) IfNoneMatch(entityTag string) *ShippingsettingsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ShippingsettingsGetCall) Context(ctx context.Context) *ShippingsettingsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ShippingsettingsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ShippingsettingsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.shippingsettings.get" call.
+// Exactly one of *ShippingSettings or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *ShippingSettings.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ShippingsettingsGetCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ShippingSettings{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves the shipping settings of the account.",
+ // "httpMethod": "GET",
+ // "id": "content.shippingsettings.get",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to get/update shipping settings.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/shippingsettings/{accountId}",
+ // "response": {
+ // "$ref": "ShippingSettings"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.shippingsettings.getsupportedcarriers":
+
+type ShippingsettingsGetsupportedcarriersCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Getsupportedcarriers: Retrieves supported carriers and carrier
+// services for an account.
+func (r *ShippingsettingsService) Getsupportedcarriers(merchantId uint64) *ShippingsettingsGetsupportedcarriersCall {
+ c := &ShippingsettingsGetsupportedcarriersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ShippingsettingsGetsupportedcarriersCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedcarriersCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ShippingsettingsGetsupportedcarriersCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedcarriersCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ShippingsettingsGetsupportedcarriersCall) Context(ctx context.Context) *ShippingsettingsGetsupportedcarriersCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ShippingsettingsGetsupportedcarriersCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ShippingsettingsGetsupportedcarriersCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedCarriers")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.shippingsettings.getsupportedcarriers" call.
+// Exactly one of *ShippingsettingsGetSupportedCarriersResponse or error
+// will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *ShippingsettingsGetSupportedCarriersResponse.ServerResponse.Header
+// or (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *ShippingsettingsGetsupportedcarriersCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedCarriersResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ShippingsettingsGetSupportedCarriersResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves supported carriers and carrier services for an account.",
+ // "httpMethod": "GET",
+ // "id": "content.shippingsettings.getsupportedcarriers",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account for which to retrieve the supported carriers.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/supportedCarriers",
+ // "response": {
+ // "$ref": "ShippingsettingsGetSupportedCarriersResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.shippingsettings.getsupportedholidays":
+
+type ShippingsettingsGetsupportedholidaysCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Getsupportedholidays: Retrieves supported holidays for an account.
+func (r *ShippingsettingsService) Getsupportedholidays(merchantId uint64) *ShippingsettingsGetsupportedholidaysCall {
+ c := &ShippingsettingsGetsupportedholidaysCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ShippingsettingsGetsupportedholidaysCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedholidaysCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ShippingsettingsGetsupportedholidaysCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedholidaysCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ShippingsettingsGetsupportedholidaysCall) Context(ctx context.Context) *ShippingsettingsGetsupportedholidaysCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ShippingsettingsGetsupportedholidaysCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ShippingsettingsGetsupportedholidaysCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedHolidays")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.shippingsettings.getsupportedholidays" call.
+// Exactly one of *ShippingsettingsGetSupportedHolidaysResponse or error
+// will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *ShippingsettingsGetSupportedHolidaysResponse.ServerResponse.Header
+// or (if a response was returned at all) in
+// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
+// whether the returned error was because http.StatusNotModified was
+// returned.
+func (c *ShippingsettingsGetsupportedholidaysCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedHolidaysResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ShippingsettingsGetSupportedHolidaysResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Retrieves supported holidays for an account.",
+ // "httpMethod": "GET",
+ // "id": "content.shippingsettings.getsupportedholidays",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "merchantId": {
+ // "description": "The ID of the account for which to retrieve the supported holidays.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/supportedHolidays",
+ // "response": {
+ // "$ref": "ShippingsettingsGetSupportedHolidaysResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// method id "content.shippingsettings.list":
+
+type ShippingsettingsListCall struct {
+ s *APIService
+ merchantId uint64
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the shipping settings of the sub-accounts in your
+// Merchant Center account.
+func (r *ShippingsettingsService) List(merchantId uint64) *ShippingsettingsListCall {
+ c := &ShippingsettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ return c
+}
+
+// MaxResults sets the optional parameter "maxResults": The maximum
+// number of shipping settings to return in the response, used for
+// paging.
+func (c *ShippingsettingsListCall) MaxResults(maxResults int64) *ShippingsettingsListCall {
+ c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The token returned
+// by the previous request.
+func (c *ShippingsettingsListCall) PageToken(pageToken string) *ShippingsettingsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ShippingsettingsListCall) Fields(s ...googleapi.Field) *ShippingsettingsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ShippingsettingsListCall) IfNoneMatch(entityTag string) *ShippingsettingsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ShippingsettingsListCall) Context(ctx context.Context) *ShippingsettingsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ShippingsettingsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ShippingsettingsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.shippingsettings.list" call.
+// Exactly one of *ShippingsettingsListResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *ShippingsettingsListResponse.ServerResponse.Header or (if a
+// response was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ShippingsettingsListCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsListResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ShippingsettingsListResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.",
+ // "httpMethod": "GET",
+ // "id": "content.shippingsettings.list",
+ // "parameterOrder": [
+ // "merchantId"
+ // ],
+ // "parameters": {
+ // "maxResults": {
+ // "description": "The maximum number of shipping settings to return in the response, used for paging.",
+ // "format": "uint32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. This must be a multi-client account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageToken": {
+ // "description": "The token returned by the previous request.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/shippingsettings",
+ // "response": {
+ // "$ref": "ShippingsettingsListResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *ShippingsettingsListCall) Pages(ctx context.Context, f func(*ShippingsettingsListResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "content.shippingsettings.update":
+
+type ShippingsettingsUpdateCall struct {
+ s *APIService
+ merchantId uint64
+ accountId uint64
+ shippingsettings *ShippingSettings
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Update: Updates the shipping settings of the account.
+func (r *ShippingsettingsService) Update(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsUpdateCall {
+ c := &ShippingsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.merchantId = merchantId
+ c.accountId = accountId
+ c.shippingsettings = shippingsettings
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ShippingsettingsUpdateCall) Fields(s ...googleapi.Field) *ShippingsettingsUpdateCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ShippingsettingsUpdateCall) Context(ctx context.Context) *ShippingsettingsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ShippingsettingsUpdateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ShippingsettingsUpdateCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PUT", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "merchantId": strconv.FormatUint(c.merchantId, 10),
+ "accountId": strconv.FormatUint(c.accountId, 10),
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "content.shippingsettings.update" call.
+// Exactly one of *ShippingSettings or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *ShippingSettings.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ShippingsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ShippingSettings{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates the shipping settings of the account.",
+ // "httpMethod": "PUT",
+ // "id": "content.shippingsettings.update",
+ // "parameterOrder": [
+ // "merchantId",
+ // "accountId"
+ // ],
+ // "parameters": {
+ // "accountId": {
+ // "description": "The ID of the account for which to get/update shipping settings.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "merchantId": {
+ // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.",
+ // "format": "uint64",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "{merchantId}/shippingsettings/{accountId}",
+ // "request": {
+ // "$ref": "ShippingSettings"
+ // },
+ // "response": {
+ // "$ref": "ShippingSettings"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/content"
+ // ]
+ // }
+
+}
diff --git a/content/v2/content-api.json b/content/v2/content-api.json
index 1b5caa4..c919e63 100644
--- a/content/v2/content-api.json
+++ b/content/v2/content-api.json
@@ -15,7 +15,7 @@
"description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/shopping-content",
- "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/PNLk-OC6JYKJ3ygPuumcyHEfVVQ\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/tMaVzrS3bfofushgFgZQxWOjUOk\"",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
@@ -3481,11 +3481,11 @@
}
}
},
- "revision": "20181129",
+ "revision": "20181203",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"Account": {
- "description": "Account data. After the creation of a new account it may take a few minutes before it is fully operational.",
+ "description": "Account data. After the creation of a new account it may take a few minutes before it is fully operational. The methods delete, insert, patch, and update require the admin role.",
"id": "Account",
"properties": {
"adultContent": {
@@ -3919,7 +3919,7 @@
"type": "object"
},
"AccountTax": {
- "description": "The tax settings of a merchant account.",
+ "description": "The tax settings of a merchant account. All methods require the admin role.",
"id": "AccountTax",
"properties": {
"accountId": {
@@ -5689,6 +5689,7 @@
"type": "object"
},
"LiaSettings": {
+ "description": "Local Inventory ads (LIA) settings. All methods except listposdataproviders require the admin role.",
"id": "LiaSettings",
"properties": {
"accountId": {
@@ -6027,6 +6028,7 @@
"type": "object"
},
"Order": {
+ "description": "Order. All methods require the order manager role.",
"id": "Order",
"properties": {
"acknowledged": {
@@ -6679,6 +6681,7 @@
"type": "object"
},
"OrderReportDisbursement": {
+ "description": "Order disbursement. All methods require the payment analyst role.",
"id": "OrderReportDisbursement",
"properties": {
"disbursementAmount": {
@@ -9044,7 +9047,7 @@
"type": "object"
},
"Product": {
- "description": "Product data.",
+ "description": "Product data. After inserting, updating, or deleting a product, it may take several minutes before changes take effect.",
"id": "Product",
"properties": {
"additionalImageLinks": {
@@ -10167,7 +10170,7 @@
"type": "object"
},
"ShippingSettings": {
- "description": "The merchant account's shipping settings.",
+ "description": "The merchant account's shipping settings. All methods except getsupportedcarriers and getsupportedholidays require the admin role.",
"id": "ShippingSettings",
"properties": {
"accountId": {
diff --git a/content/v2/content-gen.go b/content/v2/content-gen.go
index 6a9888e..2c2f399 100644
--- a/content/v2/content-gen.go
+++ b/content/v2/content-gen.go
@@ -270,7 +270,8 @@
}
// Account: Account data. After the creation of a new account it may
-// take a few minutes before it is fully operational.
+// take a few minutes before it is fully operational. The methods
+// delete, insert, patch, and update require the admin role.
type Account struct {
// AdultContent: Indicates whether the merchant sells adult content.
AdultContent bool `json:"adultContent,omitempty"`
@@ -884,7 +885,8 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// AccountTax: The tax settings of a merchant account.
+// AccountTax: The tax settings of a merchant account. All methods
+// require the admin role.
type AccountTax struct {
// AccountId: The ID of the account to which these account tax settings
// belong.
@@ -3797,6 +3799,8 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// LiaSettings: Local Inventory ads (LIA) settings. All methods except
+// listposdataproviders require the admin role.
type LiaSettings struct {
// AccountId: The ID of the account to which these LIA settings belong.
// Ignored upon update, always present in get request responses.
@@ -4401,6 +4405,7 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Order: Order. All methods require the order manager role.
type Order struct {
// Acknowledged: Whether the order was acknowledged.
Acknowledged bool `json:"acknowledged,omitempty"`
@@ -5237,6 +5242,8 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// OrderReportDisbursement: Order disbursement. All methods require the
+// payment analyst role.
type OrderReportDisbursement struct {
// DisbursementAmount: The disbursement amount.
DisbursementAmount *Price `json:"disbursementAmount,omitempty"`
@@ -8921,7 +8928,8 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// Product: Product data.
+// Product: Product data. After inserting, updating, or deleting a
+// product, it may take several minutes before changes take effect.
type Product struct {
// AdditionalImageLinks: Additional URLs of images of the item.
AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"`
@@ -10499,7 +10507,9 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// ShippingSettings: The merchant account's shipping settings.
+// ShippingSettings: The merchant account's shipping settings. All
+// methods except getsupportedcarriers and getsupportedholidays require
+// the admin role.
type ShippingSettings struct {
// AccountId: The ID of the account to which these account shipping
// settings belong. Ignored upon update, always present in get request
diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json
index 5f49ecb..750ea11 100644
--- a/dataflow/v1b3/dataflow-api.json
+++ b/dataflow/v1b3/dataflow-api.json
@@ -1644,7 +1644,7 @@
}
}
},
- "revision": "20181116",
+ "revision": "20181130",
"rootUrl": "https://dataflow.googleapis.com/",
"schemas": {
"ApproximateProgress": {
@@ -1701,6 +1701,11 @@
"format": "double",
"type": "number"
},
+ "fractionOfRemainder": {
+ "description": "The fraction of the remainder of work to split the work item at, from 0.0\n(split at the current position) to 1.0 (end of the input).",
+ "format": "double",
+ "type": "number"
+ },
"position": {
"$ref": "Position",
"description": "A Position at which to split the work item."
@@ -3885,6 +3890,13 @@
},
"type": "array"
},
+ "additionalUserLabels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Additional user labels attached to the job.",
+ "type": "object"
+ },
"bypassTempDirValidation": {
"description": "Whether to bypass the safety checks for the job's temporary directory.\nUse with caution.",
"type": "boolean"
@@ -3902,6 +3914,11 @@
"description": "Network to which VMs will be assigned. If empty or unspecified,\nthe service will use the network \"default\".",
"type": "string"
},
+ "numWorkers": {
+ "description": "The initial number of Google Compute Engine instnaces for the job.",
+ "format": "int32",
+ "type": "integer"
+ },
"serviceAccountEmail": {
"description": "The email address of the service account to run the job as.",
"type": "string"
diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go
index f8b9c1a..a45ae2f 100644
--- a/dataflow/v1b3/dataflow-gen.go
+++ b/dataflow/v1b3/dataflow-gen.go
@@ -389,6 +389,11 @@
// input) to 1.0 (end of the input).
FractionConsumed float64 `json:"fractionConsumed,omitempty"`
+ // FractionOfRemainder: The fraction of the remainder of work to split
+ // the work item at, from 0.0
+ // (split at the current position) to 1.0 (end of the input).
+ FractionOfRemainder float64 `json:"fractionOfRemainder,omitempty"`
+
// Position: A Position at which to split the work item.
Position *Position `json:"position,omitempty"`
@@ -419,7 +424,8 @@
func (s *ApproximateSplitRequest) UnmarshalJSON(data []byte) error {
type NoMethod ApproximateSplitRequest
var s1 struct {
- FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"`
+ FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"`
+ FractionOfRemainder gensupport.JSONFloat64 `json:"fractionOfRemainder"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
@@ -427,6 +433,7 @@
return err
}
s.FractionConsumed = float64(s1.FractionConsumed)
+ s.FractionOfRemainder = float64(s1.FractionOfRemainder)
return nil
}
@@ -4255,6 +4262,9 @@
// AdditionalExperiments: Additional experiment flags for the job.
AdditionalExperiments []string `json:"additionalExperiments,omitempty"`
+ // AdditionalUserLabels: Additional user labels attached to the job.
+ AdditionalUserLabels map[string]string `json:"additionalUserLabels,omitempty"`
+
// BypassTempDirValidation: Whether to bypass the safety checks for the
// job's temporary directory.
// Use with caution.
@@ -4275,6 +4285,10 @@
// the service will use the network "default".
Network string `json:"network,omitempty"`
+ // NumWorkers: The initial number of Google Compute Engine instnaces for
+ // the job.
+ NumWorkers int64 `json:"numWorkers,omitempty"`
+
// ServiceAccountEmail: The email address of the service account to run
// the job as.
ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json
index 6bf1660..9b95768 100644
--- a/dataproc/v1/dataproc-api.json
+++ b/dataproc/v1/dataproc-api.json
@@ -1634,7 +1634,7 @@
}
}
},
- "revision": "20181114",
+ "revision": "20181130",
"rootUrl": "https://dataproc.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@@ -3097,7 +3097,11 @@
"id": "WorkflowMetadata",
"properties": {
"clusterName": {
- "description": "Output only. The name of the managed cluster.",
+ "description": "Output only. The name of the target cluster.",
+ "type": "string"
+ },
+ "clusterUuid": {
+ "description": "Output only. The UUID of target cluster.",
"type": "string"
},
"createCluster": {
diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go
index 3aeeab8..8898d06 100644
--- a/dataproc/v1/dataproc-gen.go
+++ b/dataproc/v1/dataproc-gen.go
@@ -2726,9 +2726,12 @@
// WorkflowMetadata: A Cloud Dataproc workflow template resource.
type WorkflowMetadata struct {
- // ClusterName: Output only. The name of the managed cluster.
+ // ClusterName: Output only. The name of the target cluster.
ClusterName string `json:"clusterName,omitempty"`
+ // ClusterUuid: Output only. The UUID of target cluster.
+ ClusterUuid string `json:"clusterUuid,omitempty"`
+
// CreateCluster: Output only. The create cluster operation metadata.
CreateCluster *ClusterOperation `json:"createCluster,omitempty"`
diff --git a/dataproc/v1beta2/dataproc-api.json b/dataproc/v1beta2/dataproc-api.json
index 0847950..95fcc45 100644
--- a/dataproc/v1beta2/dataproc-api.json
+++ b/dataproc/v1beta2/dataproc-api.json
@@ -1629,7 +1629,7 @@
}
}
},
- "revision": "20181114",
+ "revision": "20181130",
"rootUrl": "https://dataproc.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@@ -2945,7 +2945,9 @@
"The Jupyter Notebook.",
"The Hive Web HCatalog (the REST service for accessing HCatalog).",
"The Zeppelin notebook.",
- "The Anaconda python distribution."
+ "The Anaconda python distribution.",
+ "The Presto query engine.",
+ "The Kerberos security feature."
],
"items": {
"enum": [
@@ -2953,7 +2955,9 @@
"JUPYTER",
"HIVE_WEBHCAT",
"ZEPPELIN",
- "ANACONDA"
+ "ANACONDA",
+ "PRESTO",
+ "KERBEROS"
],
"type": "string"
},
@@ -3235,7 +3239,11 @@
"id": "WorkflowMetadata",
"properties": {
"clusterName": {
- "description": "Output only. The name of the managed cluster.",
+ "description": "Output only. The name of the target cluster.",
+ "type": "string"
+ },
+ "clusterUuid": {
+ "description": "Output only. The UUID of target cluster.",
"type": "string"
},
"createCluster": {
diff --git a/dataproc/v1beta2/dataproc-gen.go b/dataproc/v1beta2/dataproc-gen.go
index a6a6bde..4e5ae89 100644
--- a/dataproc/v1beta2/dataproc-gen.go
+++ b/dataproc/v1beta2/dataproc-gen.go
@@ -2358,6 +2358,8 @@
// accessing HCatalog).
// "ZEPPELIN" - The Zeppelin notebook.
// "ANACONDA" - The Anaconda python distribution.
+ // "PRESTO" - The Presto query engine.
+ // "KERBEROS" - The Kerberos security feature.
OptionalComponents []string `json:"optionalComponents,omitempty"`
// Properties: Optional. The properties to set on daemon config
@@ -2895,9 +2897,12 @@
// WorkflowMetadata: A Cloud Dataproc workflow template resource.
type WorkflowMetadata struct {
- // ClusterName: Output only. The name of the managed cluster.
+ // ClusterName: Output only. The name of the target cluster.
ClusterName string `json:"clusterName,omitempty"`
+ // ClusterUuid: Output only. The UUID of target cluster.
+ ClusterUuid string `json:"clusterUuid,omitempty"`
+
// CreateCluster: Output only. The create cluster operation metadata.
CreateCluster *ClusterOperation `json:"createCluster,omitempty"`
diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json
index 17f9a84..b7b343f 100644
--- a/deploymentmanager/v0.alpha/deploymentmanager-api.json
+++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json
@@ -24,7 +24,7 @@
"description": "The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/deployment-manager/",
- "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/tdbJPMazx6MrJLWgJ0381Mo2V1Y\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/i83A6zmc-n6BMrisOP13hqHZHL8\"",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
@@ -439,9 +439,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -643,9 +643,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -715,9 +715,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -1650,7 +1650,7 @@
}
}
},
- "revision": "20180609",
+ "revision": "20181207",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AsyncOptions": {
@@ -1741,7 +1741,7 @@
"properties": {
"condition": {
"$ref": "Expr",
- "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. This field is only visible as GOOGLE_INTERNAL or CONDITION_TRUSTED_TESTER."
+ "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently."
},
"members": {
"description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.",
@@ -1785,12 +1785,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the composite type was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
@@ -1809,7 +1808,7 @@
"description": "Output only. The Operation that most recently ran, or is currently running, on this composite type."
},
"selfLink": {
- "description": "Output only. Self link for the type provider.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
},
"status": {
@@ -1960,12 +1959,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the deployment was created, in RFC3339 text format .",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
@@ -1995,7 +1993,7 @@
"type": "array"
},
"selfLink": {
- "description": "Output only. Self link for the deployment.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
},
"target": {
@@ -2005,6 +2003,10 @@
"update": {
"$ref": "DeploymentUpdate",
"description": "Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here."
+ },
+ "updateTime": {
+ "description": "Output only. Update timestamp in RFC3339 text format.",
+ "type": "string"
}
},
"type": "object"
@@ -2155,7 +2157,7 @@
"id": "GlobalSetPolicyRequest",
"properties": {
"bindings": {
- "description": "Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
"items": {
"$ref": "Binding"
},
@@ -2246,7 +2248,7 @@
"type": "object"
},
"LogConfigCounterOptions": {
- "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nAt present the only supported field names are - \"iam_principal\", corresponding to IAMContext.principal; - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1",
+ "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).",
"id": "LogConfigCounterOptions",
"properties": {
"field": {
@@ -2265,7 +2267,7 @@
"id": "LogConfigDataAccessOptions",
"properties": {
"logMode": {
- "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.",
+ "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.\n\nNOTE: Logging to Gin in a fail-closed manner is currently unsupported while work is being done to satisfy the requirements of go/345. Currently, setting LOG_FAIL_CLOSED mode will have no effect, but still exists because there is active work being done to support it (b/115874152).",
"type": "string"
}
},
@@ -2284,7 +2286,6 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
@@ -2296,7 +2297,7 @@
"type": "array"
},
"insertTime": {
- "description": "Output only. Timestamp when the manifest was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"layout": {
@@ -2648,12 +2649,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the resource was created or acquired, in RFC3339 text format .",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"lastUsedCredential": {
@@ -2688,7 +2688,7 @@
"description": "Output only. If Deployment Manager is currently updating or previewing an update to this resource, the updated configuration appears here."
},
"updateTime": {
- "description": "Output only. Timestamp when the resource was updated, in RFC3339 text format .",
+ "description": "Output only. Update timestamp in RFC3339 text format.",
"type": "string"
},
"url": {
@@ -3012,12 +3012,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the type was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
@@ -3036,14 +3035,14 @@
"description": "Output only. The Operation that most recently ran, or is currently running, on this type."
},
"selfLink": {
- "description": "Output only. Self link for the type.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
}
},
"type": "object"
},
"TypeInfo": {
- "description": "Contains detailed information about a composite type, base type, or base type with specific collection.",
+ "description": "Type Information. Contains detailed information about a composite type, base type, or base type with specific collection.",
"id": "TypeInfo",
"properties": {
"description": {
@@ -3055,7 +3054,6 @@
"type": "string"
},
"kind": {
- "default": "deploymentmanager#typeInfo",
"description": "Output only. Type of the output. Always deploymentManager#TypeInfo for TypeInfo.",
"type": "string"
},
@@ -3068,7 +3066,7 @@
"description": "For base types with a collection, we return a schema and documentation link For template types, we return only a schema"
},
"selfLink": {
- "description": "Output only. Server-defined URL for the resource.",
+ "description": "Output only. Self link for the type provider.",
"type": "string"
},
"title": {
@@ -3129,12 +3127,12 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
+ "description": "Output only. Unique identifier for the resource defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the type provider was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
diff --git a/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/deploymentmanager/v0.alpha/deploymentmanager-gen.go
index 1e06362..2881b99 100644
--- a/deploymentmanager/v0.alpha/deploymentmanager-gen.go
+++ b/deploymentmanager/v0.alpha/deploymentmanager-gen.go
@@ -368,11 +368,10 @@
// Binding: Associates `members` with a `role`.
type Binding struct {
- // Condition: The condition that is associated with this binding. NOTE:
- // an unsatisfied condition will not allow user access via current
- // binding. Different bindings, including their conditions, are examined
- // independently. This field is only visible as GOOGLE_INTERNAL or
- // CONDITION_TRUSTED_TESTER.
+ // Condition: Unimplemented. The condition that is associated with this
+ // binding. NOTE: an unsatisfied condition will not allow user access
+ // via current binding. Different bindings, including their conditions,
+ // are examined independently.
Condition *Expr `json:"condition,omitempty"`
// Members: Specifies the identities requesting access for a Cloud
@@ -473,12 +472,9 @@
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the composite type was
- // created, in RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -497,7 +493,7 @@
// currently running, on this composite type.
Operation *Operation `json:"operation,omitempty"`
- // SelfLink: Output only. Self link for the type provider.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
Status string `json:"status,omitempty"`
@@ -765,12 +761,9 @@
// fingerprint value, perform a get() request to a deployment.
Fingerprint string `json:"fingerprint,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the deployment was created,
- // in RFC3339 text format .
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -802,7 +795,7 @@
// deployed successfully.
Outputs []*DeploymentOutputsEntry `json:"outputs,omitempty"`
- // SelfLink: Output only. Self link for the deployment.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
// Target: [Input Only] The parameters that define your deployment,
@@ -814,6 +807,9 @@
// appears here.
Update *DeploymentUpdate `json:"update,omitempty"`
+ // UpdateTime: Output only. Update timestamp in RFC3339 text format.
+ UpdateTime string `json:"updateTime,omitempty"`
+
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@@ -1163,7 +1159,7 @@
}
type GlobalSetPolicyRequest struct {
- // Bindings: Flatten Policy to create a backwacd compatible wire-format.
+ // Bindings: Flatten Policy to create a backward compatible wire-format.
// Deprecated. Use 'policy' to specify bindings.
Bindings []*Binding `json:"bindings,omitempty"`
@@ -1348,18 +1344,21 @@
// Field names correspond to IAM request parameters and field values are
// their respective values.
//
-// At present the only supported field names are - "iam_principal",
-// corresponding to IAMContext.principal; - "" (empty string), resulting
-// in one aggretated counter with no field.
+// Supported field names: - "authority", which is "[token]" if
+// IAMContext.token is present, otherwise the value of
+// IAMContext.authority_selector if present, and otherwise a
+// representation of IAMContext.principal; or - "iam_principal", a
+// representation of IAMContext.principal even if a token or authority
+// selector is present; or - "" (empty string), resulting in a counter
+// with no fields.
//
// Examples: counter { metric: "/debug_access_count" field:
// "iam_principal" } ==> increment counter
// /iam/policy/backend_debug_access_count {iam_principal=[value of
// IAMContext.principal]}
//
-// At this time we do not support: * multiple field names (though this
-// may be supported in the future) * decrementing the counter *
-// incrementing it by anything other than 1
+// At this time we do not support multiple field names (though this may
+// be supported in the future).
type LogConfigCounterOptions struct {
// Field: The field value to attribute.
Field string `json:"field,omitempty"`
@@ -1395,6 +1394,12 @@
// LogMode: Whether Gin logging should happen in a fail-closed manner at
// the caller. This is relevant only in the LocalIAM implementation, for
// now.
+ //
+ // NOTE: Logging to Gin in a fail-closed manner is currently unsupported
+ // while work is being done to satisfy the requirements of go/345.
+ // Currently, setting LOG_FAIL_CLOSED mode will have no effect, but
+ // still exists because there is active work being done to support it
+ // (b/115874152).
LogMode string `json:"logMode,omitempty"`
// ForceSendFields is a list of field names (e.g. "LogMode") to
@@ -1428,15 +1433,12 @@
// including any templates and references.
ExpandedConfig string `json:"expandedConfig,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
// Imports: Output only. The imported files for this manifest.
Imports []*ImportFile `json:"imports,omitempty"`
- // InsertTime: Output only. Timestamp when the manifest was created, in
- // RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Layout: Output only. The YAML layout for this manifest.
@@ -2059,12 +2061,9 @@
// resource with references expanded. Returned as serialized YAML.
FinalProperties string `json:"finalProperties,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the resource was created or
- // acquired, in RFC3339 text format .
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// LastUsedCredential: Output only. The last used credential that
@@ -2097,8 +2096,7 @@
// appears here.
Update *ResourceUpdate `json:"update,omitempty"`
- // UpdateTime: Output only. Timestamp when the resource was updated, in
- // RFC3339 text format .
+ // UpdateTime: Output only. Update timestamp in RFC3339 text format.
UpdateTime string `json:"updateTime,omitempty"`
// Url: Output only. The URL of the actual resource.
@@ -2706,12 +2704,9 @@
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the type was created, in
- // RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -2729,7 +2724,7 @@
// currently running, on this type.
Operation *Operation `json:"operation,omitempty"`
- // SelfLink: Output only. Self link for the type.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@@ -2760,8 +2755,8 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// TypeInfo: Contains detailed information about a composite type, base
-// type, or base type with specific collection.
+// TypeInfo: Type Information. Contains detailed information about a
+// composite type, base type, or base type with specific collection.
type TypeInfo struct {
// Description: The description of the type.
Description string `json:"description,omitempty"`
@@ -2781,7 +2776,7 @@
// documentation link For template types, we return only a schema
Schema *TypeInfoSchemaInfo `json:"schema,omitempty"`
- // SelfLink: Output only. Server-defined URL for the resource.
+ // SelfLink: Output only. Self link for the type provider.
SelfLink string `json:"selfLink,omitempty"`
// Title: The title on the API descriptor URL provided.
@@ -2892,12 +2887,11 @@
// DescriptorUrl: Descriptor Url for the this type provider.
DescriptorUrl string `json:"descriptorUrl,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
+ // Id: Output only. Unique identifier for the resource defined by the
// server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the type provider was
- // created, in RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -4723,9 +4717,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -5536,9 +5530,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -5839,9 +5833,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
diff --git a/deploymentmanager/v2/deploymentmanager-api.json b/deploymentmanager/v2/deploymentmanager-api.json
index bcde71f..4f72f7b 100644
--- a/deploymentmanager/v2/deploymentmanager-api.json
+++ b/deploymentmanager/v2/deploymentmanager-api.json
@@ -24,7 +24,7 @@
"description": "Declares, configures, and deploys complex solutions on Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/deployment-manager/",
- "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/4vHGfy0PBj0rG7tIHK1cZJWS9Ek\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/Uh4_xQr7E3ofvWrY-A4225srDLM\"",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
@@ -217,9 +217,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -417,9 +417,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -489,9 +489,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -932,7 +932,7 @@
}
}
},
- "revision": "20180503",
+ "revision": "20181207",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AuditConfig": {
@@ -995,7 +995,7 @@
"properties": {
"condition": {
"$ref": "Expr",
- "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. This field is only visible as GOOGLE_INTERNAL or CONDITION_TRUSTED_TESTER."
+ "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently."
},
"members": {
"description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.",
@@ -1070,12 +1070,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the deployment was created, in RFC3339 text format .",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
@@ -1098,7 +1097,7 @@
"description": "Output only. The Operation that most recently ran, or is currently running, on this deployment."
},
"selfLink": {
- "description": "Output only. Self link for the deployment.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
},
"target": {
@@ -1108,6 +1107,10 @@
"update": {
"$ref": "DeploymentUpdate",
"description": "Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here."
+ },
+ "updateTime": {
+ "description": "Output only. Update timestamp in RFC3339 text format.",
+ "type": "string"
}
},
"type": "object"
@@ -1227,7 +1230,7 @@
"id": "GlobalSetPolicyRequest",
"properties": {
"bindings": {
- "description": "Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
"items": {
"$ref": "Binding"
},
@@ -1295,7 +1298,7 @@
"type": "object"
},
"LogConfigCounterOptions": {
- "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nAt present the only supported field names are - \"iam_principal\", corresponding to IAMContext.principal; - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1",
+ "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).",
"id": "LogConfigCounterOptions",
"properties": {
"field": {
@@ -1314,7 +1317,7 @@
"id": "LogConfigDataAccessOptions",
"properties": {
"logMode": {
- "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.",
+ "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.\n\nNOTE: Logging to Gin in a fail-closed manner is currently unsupported while work is being done to satisfy the requirements of go/345. Currently, setting LOG_FAIL_CLOSED mode will have no effect, but still exists because there is active work being done to support it (b/115874152).",
"type": "string"
}
},
@@ -1333,7 +1336,6 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
@@ -1345,7 +1347,7 @@
"type": "array"
},
"insertTime": {
- "description": "Output only. Timestamp when the manifest was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"layout": {
@@ -1611,12 +1613,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the resource was created or acquired, in RFC3339 text format .",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"manifest": {
@@ -1640,7 +1641,7 @@
"description": "Output only. If Deployment Manager is currently updating or previewing an update to this resource, the updated configuration appears here."
},
"updateTime": {
- "description": "Output only. Timestamp when the resource was updated, in RFC3339 text format .",
+ "description": "Output only. Update timestamp in RFC3339 text format.",
"type": "string"
},
"url": {
@@ -1904,12 +1905,11 @@
"id": "Type",
"properties": {
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the type was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"name": {
@@ -1921,7 +1921,7 @@
"description": "Output only. The Operation that most recently ran, or is currently running, on this type."
},
"selfLink": {
- "description": "Output only. Self link for the type.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
}
},
diff --git a/deploymentmanager/v2/deploymentmanager-gen.go b/deploymentmanager/v2/deploymentmanager-gen.go
index a4ac506..de9e110 100644
--- a/deploymentmanager/v2/deploymentmanager-gen.go
+++ b/deploymentmanager/v2/deploymentmanager-gen.go
@@ -281,11 +281,10 @@
// Binding: Associates `members` with a `role`.
type Binding struct {
- // Condition: The condition that is associated with this binding. NOTE:
- // an unsatisfied condition will not allow user access via current
- // binding. Different bindings, including their conditions, are examined
- // independently. This field is only visible as GOOGLE_INTERNAL or
- // CONDITION_TRUSTED_TESTER.
+ // Condition: Unimplemented. The condition that is associated with this
+ // binding. NOTE: an unsatisfied condition will not allow user access
+ // via current binding. Different bindings, including their conditions,
+ // are examined independently.
Condition *Expr `json:"condition,omitempty"`
// Members: Specifies the identities requesting access for a Cloud
@@ -431,12 +430,9 @@
// fingerprint value, perform a get() request to a deployment.
Fingerprint string `json:"fingerprint,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the deployment was created,
- // in RFC3339 text format .
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -464,7 +460,7 @@
// currently running, on this deployment.
Operation *Operation `json:"operation,omitempty"`
- // SelfLink: Output only. Self link for the deployment.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
// Target: [Input Only] The parameters that define your deployment,
@@ -476,6 +472,9 @@
// appears here.
Update *DeploymentUpdate `json:"update,omitempty"`
+ // UpdateTime: Output only. Update timestamp in RFC3339 text format.
+ UpdateTime string `json:"updateTime,omitempty"`
+
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@@ -762,7 +761,7 @@
}
type GlobalSetPolicyRequest struct {
- // Bindings: Flatten Policy to create a backwacd compatible wire-format.
+ // Bindings: Flatten Policy to create a backward compatible wire-format.
// Deprecated. Use 'policy' to specify bindings.
Bindings []*Binding `json:"bindings,omitempty"`
@@ -908,18 +907,21 @@
// Field names correspond to IAM request parameters and field values are
// their respective values.
//
-// At present the only supported field names are - "iam_principal",
-// corresponding to IAMContext.principal; - "" (empty string), resulting
-// in one aggretated counter with no field.
+// Supported field names: - "authority", which is "[token]" if
+// IAMContext.token is present, otherwise the value of
+// IAMContext.authority_selector if present, and otherwise a
+// representation of IAMContext.principal; or - "iam_principal", a
+// representation of IAMContext.principal even if a token or authority
+// selector is present; or - "" (empty string), resulting in a counter
+// with no fields.
//
// Examples: counter { metric: "/debug_access_count" field:
// "iam_principal" } ==> increment counter
// /iam/policy/backend_debug_access_count {iam_principal=[value of
// IAMContext.principal]}
//
-// At this time we do not support: * multiple field names (though this
-// may be supported in the future) * decrementing the counter *
-// incrementing it by anything other than 1
+// At this time we do not support multiple field names (though this may
+// be supported in the future).
type LogConfigCounterOptions struct {
// Field: The field value to attribute.
Field string `json:"field,omitempty"`
@@ -955,6 +957,12 @@
// LogMode: Whether Gin logging should happen in a fail-closed manner at
// the caller. This is relevant only in the LocalIAM implementation, for
// now.
+ //
+ // NOTE: Logging to Gin in a fail-closed manner is currently unsupported
+ // while work is being done to satisfy the requirements of go/345.
+ // Currently, setting LOG_FAIL_CLOSED mode will have no effect, but
+ // still exists because there is active work being done to support it
+ // (b/115874152).
LogMode string `json:"logMode,omitempty"`
// ForceSendFields is a list of field names (e.g. "LogMode") to
@@ -988,15 +996,12 @@
// including any templates and references.
ExpandedConfig string `json:"expandedConfig,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
// Imports: Output only. The imported files for this manifest.
Imports []*ImportFile `json:"imports,omitempty"`
- // InsertTime: Output only. Timestamp when the manifest was created, in
- // RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Layout: Output only. The YAML layout for this manifest.
@@ -1488,12 +1493,9 @@
// resource with references expanded. Returned as serialized YAML.
FinalProperties string `json:"finalProperties,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the resource was created or
- // acquired, in RFC3339 text format .
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Manifest: Output only. URL of the manifest representing the current
@@ -1518,8 +1520,7 @@
// appears here.
Update *ResourceUpdate `json:"update,omitempty"`
- // UpdateTime: Output only. Timestamp when the resource was updated, in
- // RFC3339 text format .
+ // UpdateTime: Output only. Update timestamp in RFC3339 text format.
UpdateTime string `json:"updateTime,omitempty"`
// Url: Output only. The URL of the actual resource.
@@ -2039,12 +2040,9 @@
// Type: A resource type supported by Deployment Manager.
type Type struct {
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the type was created, in
- // RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Name: Name of the type.
@@ -2054,7 +2052,7 @@
// currently running, on this type.
Operation *Operation `json:"operation,omitempty"`
- // SelfLink: Output only. Self link for the type.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
// ForceSendFields is a list of field names (e.g. "Id") to
@@ -2725,9 +2723,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -3532,9 +3530,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -3835,9 +3833,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
diff --git a/deploymentmanager/v2beta/deploymentmanager-api.json b/deploymentmanager/v2beta/deploymentmanager-api.json
index 2e27212..68ed386 100644
--- a/deploymentmanager/v2beta/deploymentmanager-api.json
+++ b/deploymentmanager/v2beta/deploymentmanager-api.json
@@ -24,7 +24,7 @@
"description": "The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/deployment-manager/",
- "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/LkknaPBA2ag_gwJEt-rsY1S_xdU\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/Z2kmwtDLpwl8WW681sS3DyXiG3U\"",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
@@ -439,9 +439,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -643,9 +643,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -715,9 +715,9 @@
"type": "string"
},
"resource": {
- "description": "Name of the resource for this request.",
+ "description": "Name or id of the resource for this request.",
"location": "path",
- "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
+ "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
"required": true,
"type": "string"
}
@@ -1482,7 +1482,7 @@
}
}
},
- "revision": "20180609",
+ "revision": "20181207",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AsyncOptions": {
@@ -1599,7 +1599,7 @@
"properties": {
"condition": {
"$ref": "Expr",
- "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. This field is only visible as GOOGLE_INTERNAL or CONDITION_TRUSTED_TESTER."
+ "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently."
},
"members": {
"description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.",
@@ -1639,12 +1639,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the composite type was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
@@ -1663,7 +1662,7 @@
"description": "Output only. The Operation that most recently ran, or is currently running, on this composite type."
},
"selfLink": {
- "description": "Output only. Self link for the type provider.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
},
"status": {
@@ -1784,12 +1783,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the deployment was created, in RFC3339 text format .",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
@@ -1812,7 +1810,7 @@
"description": "Output only. The Operation that most recently ran, or is currently running, on this deployment."
},
"selfLink": {
- "description": "Output only. Self link for the deployment.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
},
"target": {
@@ -1822,6 +1820,10 @@
"update": {
"$ref": "DeploymentUpdate",
"description": "Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here."
+ },
+ "updateTime": {
+ "description": "Output only. Update timestamp in RFC3339 text format.",
+ "type": "string"
}
},
"type": "object"
@@ -1956,7 +1958,7 @@
"id": "GlobalSetPolicyRequest",
"properties": {
"bindings": {
- "description": "Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
+ "description": "Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.",
"items": {
"$ref": "Binding"
},
@@ -2047,7 +2049,7 @@
"type": "object"
},
"LogConfigCounterOptions": {
- "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nAt present the only supported field names are - \"iam_principal\", corresponding to IAMContext.principal; - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1",
+ "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).",
"id": "LogConfigCounterOptions",
"properties": {
"field": {
@@ -2066,7 +2068,7 @@
"id": "LogConfigDataAccessOptions",
"properties": {
"logMode": {
- "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.",
+ "description": "Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.\n\nNOTE: Logging to Gin in a fail-closed manner is currently unsupported while work is being done to satisfy the requirements of go/345. Currently, setting LOG_FAIL_CLOSED mode will have no effect, but still exists because there is active work being done to support it (b/115874152).",
"type": "string"
}
},
@@ -2085,7 +2087,6 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
@@ -2097,7 +2098,7 @@
"type": "array"
},
"insertTime": {
- "description": "Output only. Timestamp when the manifest was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"layout": {
@@ -2422,12 +2423,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the resource was created or acquired, in RFC3339 text format .",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"manifest": {
@@ -2451,7 +2451,7 @@
"description": "Output only. If Deployment Manager is currently updating or previewing an update to this resource, the updated configuration appears here."
},
"updateTime": {
- "description": "Output only. Timestamp when the resource was updated, in RFC3339 text format .",
+ "description": "Output only. Update timestamp in RFC3339 text format.",
"type": "string"
},
"url": {
@@ -2764,12 +2764,11 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the type was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
@@ -2788,14 +2787,14 @@
"description": "Output only. The Operation that most recently ran, or is currently running, on this type."
},
"selfLink": {
- "description": "Output only. Self link for the type.",
+ "description": "Output only. Server defined URL for the resource.",
"type": "string"
}
},
"type": "object"
},
"TypeInfo": {
- "description": "Contains detailed information about a composite type, base type, or base type with specific collection.",
+ "description": "Type Information. Contains detailed information about a composite type, base type, or base type with specific collection.",
"id": "TypeInfo",
"properties": {
"description": {
@@ -2807,7 +2806,6 @@
"type": "string"
},
"kind": {
- "default": "deploymentmanager#typeInfo",
"description": "Output only. Type of the output. Always deploymentManager#TypeInfo for TypeInfo.",
"type": "string"
},
@@ -2820,7 +2818,7 @@
"description": "For base types with a collection, we return a schema and documentation link For template types, we return only a schema"
},
"selfLink": {
- "description": "Output only. Server-defined URL for the resource.",
+ "description": "Output only. Self link for the type provider.",
"type": "string"
},
"title": {
@@ -2881,12 +2879,12 @@
"type": "string"
},
"id": {
- "description": "Output only. Unique identifier for the resource; defined by the server.",
+ "description": "Output only. Unique identifier for the resource defined by the server.",
"format": "uint64",
"type": "string"
},
"insertTime": {
- "description": "Output only. Timestamp when the type provider was created, in RFC3339 text format.",
+ "description": "Output only. Creation timestamp in RFC3339 text format.",
"type": "string"
},
"labels": {
diff --git a/deploymentmanager/v2beta/deploymentmanager-gen.go b/deploymentmanager/v2beta/deploymentmanager-gen.go
index 73bdb3c..56d43b9 100644
--- a/deploymentmanager/v2beta/deploymentmanager-gen.go
+++ b/deploymentmanager/v2beta/deploymentmanager-gen.go
@@ -408,11 +408,10 @@
// Binding: Associates `members` with a `role`.
type Binding struct {
- // Condition: The condition that is associated with this binding. NOTE:
- // an unsatisfied condition will not allow user access via current
- // binding. Different bindings, including their conditions, are examined
- // independently. This field is only visible as GOOGLE_INTERNAL or
- // CONDITION_TRUSTED_TESTER.
+ // Condition: Unimplemented. The condition that is associated with this
+ // binding. NOTE: an unsatisfied condition will not allow user access
+ // via current binding. Different bindings, including their conditions,
+ // are examined independently.
Condition *Expr `json:"condition,omitempty"`
// Members: Specifies the identities requesting access for a Cloud
@@ -509,12 +508,9 @@
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the composite type was
- // created, in RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -533,7 +529,7 @@
// currently running, on this composite type.
Operation *Operation `json:"operation,omitempty"`
- // SelfLink: Output only. Self link for the type provider.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
Status string `json:"status,omitempty"`
@@ -758,12 +754,9 @@
// fingerprint value, perform a get() request to a deployment.
Fingerprint string `json:"fingerprint,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the deployment was created,
- // in RFC3339 text format .
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -791,7 +784,7 @@
// currently running, on this deployment.
Operation *Operation `json:"operation,omitempty"`
- // SelfLink: Output only. Self link for the deployment.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
// Target: [Input Only] The parameters that define your deployment,
@@ -803,6 +796,9 @@
// appears here.
Update *DeploymentUpdate `json:"update,omitempty"`
+ // UpdateTime: Output only. Update timestamp in RFC3339 text format.
+ UpdateTime string `json:"updateTime,omitempty"`
+
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@@ -1120,7 +1116,7 @@
}
type GlobalSetPolicyRequest struct {
- // Bindings: Flatten Policy to create a backwacd compatible wire-format.
+ // Bindings: Flatten Policy to create a backward compatible wire-format.
// Deprecated. Use 'policy' to specify bindings.
Bindings []*Binding `json:"bindings,omitempty"`
@@ -1305,18 +1301,21 @@
// Field names correspond to IAM request parameters and field values are
// their respective values.
//
-// At present the only supported field names are - "iam_principal",
-// corresponding to IAMContext.principal; - "" (empty string), resulting
-// in one aggretated counter with no field.
+// Supported field names: - "authority", which is "[token]" if
+// IAMContext.token is present, otherwise the value of
+// IAMContext.authority_selector if present, and otherwise a
+// representation of IAMContext.principal; or - "iam_principal", a
+// representation of IAMContext.principal even if a token or authority
+// selector is present; or - "" (empty string), resulting in a counter
+// with no fields.
//
// Examples: counter { metric: "/debug_access_count" field:
// "iam_principal" } ==> increment counter
// /iam/policy/backend_debug_access_count {iam_principal=[value of
// IAMContext.principal]}
//
-// At this time we do not support: * multiple field names (though this
-// may be supported in the future) * decrementing the counter *
-// incrementing it by anything other than 1
+// At this time we do not support multiple field names (though this may
+// be supported in the future).
type LogConfigCounterOptions struct {
// Field: The field value to attribute.
Field string `json:"field,omitempty"`
@@ -1352,6 +1351,12 @@
// LogMode: Whether Gin logging should happen in a fail-closed manner at
// the caller. This is relevant only in the LocalIAM implementation, for
// now.
+ //
+ // NOTE: Logging to Gin in a fail-closed manner is currently unsupported
+ // while work is being done to satisfy the requirements of go/345.
+ // Currently, setting LOG_FAIL_CLOSED mode will have no effect, but
+ // still exists because there is active work being done to support it
+ // (b/115874152).
LogMode string `json:"logMode,omitempty"`
// ForceSendFields is a list of field names (e.g. "LogMode") to
@@ -1385,15 +1390,12 @@
// including any templates and references.
ExpandedConfig string `json:"expandedConfig,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
// Imports: Output only. The imported files for this manifest.
Imports []*ImportFile `json:"imports,omitempty"`
- // InsertTime: Output only. Timestamp when the manifest was created, in
- // RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Layout: Output only. The YAML layout for this manifest.
@@ -1975,12 +1977,9 @@
// resource with references expanded. Returned as serialized YAML.
FinalProperties string `json:"finalProperties,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the resource was created or
- // acquired, in RFC3339 text format .
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Manifest: Output only. URL of the manifest representing the current
@@ -2005,8 +2004,7 @@
// appears here.
Update *ResourceUpdate `json:"update,omitempty"`
- // UpdateTime: Output only. Timestamp when the resource was updated, in
- // RFC3339 text format .
+ // UpdateTime: Output only. Update timestamp in RFC3339 text format.
UpdateTime string `json:"updateTime,omitempty"`
// Url: Output only. The URL of the actual resource.
@@ -2604,12 +2602,9 @@
// provided by the client when the resource is created.
Description string `json:"description,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
- // server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the type was created, in
- // RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -2627,7 +2622,7 @@
// currently running, on this type.
Operation *Operation `json:"operation,omitempty"`
- // SelfLink: Output only. Self link for the type.
+ // SelfLink: Output only. Server defined URL for the resource.
SelfLink string `json:"selfLink,omitempty"`
// ForceSendFields is a list of field names (e.g. "Base") to
@@ -2653,8 +2648,8 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// TypeInfo: Contains detailed information about a composite type, base
-// type, or base type with specific collection.
+// TypeInfo: Type Information. Contains detailed information about a
+// composite type, base type, or base type with specific collection.
type TypeInfo struct {
// Description: The description of the type.
Description string `json:"description,omitempty"`
@@ -2674,7 +2669,7 @@
// documentation link For template types, we return only a schema
Schema *TypeInfoSchemaInfo `json:"schema,omitempty"`
- // SelfLink: Output only. Server-defined URL for the resource.
+ // SelfLink: Output only. Self link for the type provider.
SelfLink string `json:"selfLink,omitempty"`
// Title: The title on the API descriptor URL provided.
@@ -2785,12 +2780,11 @@
// DescriptorUrl: Descriptor Url for the this type provider.
DescriptorUrl string `json:"descriptorUrl,omitempty"`
- // Id: Output only. Unique identifier for the resource; defined by the
+ // Id: Output only. Unique identifier for the resource defined by the
// server.
Id uint64 `json:"id,omitempty,string"`
- // InsertTime: Output only. Timestamp when the type provider was
- // created, in RFC3339 text format.
+ // InsertTime: Output only. Creation timestamp in RFC3339 text format.
InsertTime string `json:"insertTime,omitempty"`
// Labels: Map of labels; provided by the client when the resource is
@@ -4616,9 +4610,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -5429,9 +5423,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
@@ -5732,9 +5726,9 @@
// "type": "string"
// },
// "resource": {
- // "description": "Name of the resource for this request.",
+ // "description": "Name or id of the resource for this request.",
// "location": "path",
- // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?",
+ // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
// "required": true,
// "type": "string"
// }
diff --git a/dialogflow/v2/dialogflow-api.json b/dialogflow/v2/dialogflow-api.json
index 81fe1dd..ba8a6b56 100644
--- a/dialogflow/v2/dialogflow-api.json
+++ b/dialogflow/v2/dialogflow-api.json
@@ -1303,7 +1303,7 @@
}
}
},
- "revision": "20181130",
+ "revision": "20181207",
"rootUrl": "https://dialogflow.googleapis.com/",
"schemas": {
"GoogleCloudDialogflowV2Agent": {
@@ -3794,7 +3794,7 @@
"type": "string"
},
"matchConfidence": {
- "description": "The system's confidence score that this Knowledge answer is a good match\nfor this converstational query, range from 0.0 (completely uncertain)\nto 1.0 (completely certain).\nNote: The confidence score is likely to vary somewhat (possibly even for\nidentical requests), as the underlying model is under constant\nimprovement, we may deprecate it in the future. We recommend using\n`match_confidence_level` which should be generally more stable.",
+ "description": "The system's confidence score that this Knowledge answer is a good match\nfor this conversational query.\nThe range is from 0.0 (completely uncertain) to 1.0 (completely certain).\nNote: The confidence score is likely to vary somewhat (possibly even for\nidentical requests), as the underlying model is under constant\nimprovement. It may be deprecated in the future. We recommend using\n`match_confidence_level` which should be generally more stable.",
"format": "float",
"type": "number"
},
diff --git a/dialogflow/v2/dialogflow-gen.go b/dialogflow/v2/dialogflow-gen.go
index aabc702..3bb3c91 100644
--- a/dialogflow/v2/dialogflow-gen.go
+++ b/dialogflow/v2/dialogflow-gen.go
@@ -5140,14 +5140,14 @@
// MatchConfidence: The system's confidence score that this Knowledge
// answer is a good match
- // for this converstational query, range from 0.0 (completely
- // uncertain)
- // to 1.0 (completely certain).
+ // for this conversational query.
+ // The range is from 0.0 (completely uncertain) to 1.0 (completely
+ // certain).
// Note: The confidence score is likely to vary somewhat (possibly even
// for
// identical requests), as the underlying model is under
// constant
- // improvement, we may deprecate it in the future. We recommend
+ // improvement. It may be deprecated in the future. We recommend
// using
// `match_confidence_level` which should be generally more stable.
MatchConfidence float64 `json:"matchConfidence,omitempty"`
diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json
index 54ca868..9c4da25 100644
--- a/dlp/v2/dlp-api.json
+++ b/dlp/v2/dlp-api.json
@@ -1486,7 +1486,7 @@
}
}
},
- "revision": "20181121",
+ "revision": "20181204",
"rootUrl": "https://dlp.googleapis.com/",
"schemas": {
"GooglePrivacyDlpV2Action": {
@@ -2181,7 +2181,7 @@
"type": "object"
},
"GooglePrivacyDlpV2CryptoHashConfig": {
- "description": "Pseudonymization method that generates surrogates via cryptographic hashing.\nUses SHA-256.\nThe key size must be either 32 or 64 bytes.\nOutputs a 32 byte digest as an uppercase hex string\n(for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).\nCurrently, only string and integer values can be hashed.",
+ "description": "Pseudonymization method that generates surrogates via cryptographic hashing.\nUses SHA-256.\nThe key size must be either 32 or 64 bytes.\nOutputs a base64 encoded representation of the hashed output\n(for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).\nCurrently, only string and integer values can be hashed.",
"id": "GooglePrivacyDlpV2CryptoHashConfig",
"properties": {
"cryptoKey": {
diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go
index 92754a7..5e6b505 100644
--- a/dlp/v2/dlp-gen.go
+++ b/dlp/v2/dlp-gen.go
@@ -1622,8 +1622,9 @@
// generates surrogates via cryptographic hashing.
// Uses SHA-256.
// The key size must be either 32 or 64 bytes.
-// Outputs a 32 byte digest as an uppercase hex string
-// (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).
+// Outputs a base64 encoded representation of the hashed output
+// (for example,
+// L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
// Currently, only string and integer values can be hashed.
type GooglePrivacyDlpV2CryptoHashConfig struct {
// CryptoKey: The key used by the hash function.
diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json
index c24dc4a..52c2d7f 100644
--- a/firestore/v1/firestore-api.json
+++ b/firestore/v1/firestore-api.json
@@ -409,6 +409,494 @@
}
}
},
+ "documents": {
+ "methods": {
+ "batchGet": {
+ "description": "Gets multiple documents.\n\nDocuments returned by this method are not guaranteed to be returned in the\nsame order that they were requested.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:batchGet",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.batchGet",
+ "parameterOrder": [
+ "database"
+ ],
+ "parameters": {
+ "database": {
+ "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+database}/documents:batchGet",
+ "request": {
+ "$ref": "BatchGetDocumentsRequest"
+ },
+ "response": {
+ "$ref": "BatchGetDocumentsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "beginTransaction": {
+ "description": "Starts a new transaction.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:beginTransaction",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.beginTransaction",
+ "parameterOrder": [
+ "database"
+ ],
+ "parameters": {
+ "database": {
+ "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+database}/documents:beginTransaction",
+ "request": {
+ "$ref": "BeginTransactionRequest"
+ },
+ "response": {
+ "$ref": "BeginTransactionResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "commit": {
+ "description": "Commits a transaction, while optionally updating documents.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:commit",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.commit",
+ "parameterOrder": [
+ "database"
+ ],
+ "parameters": {
+ "database": {
+ "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+database}/documents:commit",
+ "request": {
+ "$ref": "CommitRequest"
+ },
+ "response": {
+ "$ref": "CommitResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "createDocument": {
+ "description": "Creates a new document.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{collectionId}",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.createDocument",
+ "parameterOrder": [
+ "parent",
+ "collectionId"
+ ],
+ "parameters": {
+ "collectionId": {
+ "description": "The collection ID, relative to `parent`, to list. For example: `chatrooms`.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "documentId": {
+ "description": "The client-assigned document ID to use for this document.\n\nOptional. If not specified, an ID will be assigned by the service.",
+ "location": "query",
+ "type": "string"
+ },
+ "mask.fieldPaths": {
+ "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "parent": {
+ "description": "The parent resource. For example:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+/documents/.+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+parent}/{collectionId}",
+ "request": {
+ "$ref": "Document"
+ },
+ "response": {
+ "$ref": "Document"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "delete": {
+ "description": "Deletes a document.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}",
+ "httpMethod": "DELETE",
+ "id": "firestore.projects.databases.documents.delete",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "currentDocument.exists": {
+ "description": "When set to `true`, the target document must exist.\nWhen set to `false`, the target document must not exist.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "currentDocument.updateTime": {
+ "description": "When set, the target document must exist and have been last updated at\nthat time.",
+ "format": "google-datetime",
+ "location": "query",
+ "type": "string"
+ },
+ "name": {
+ "description": "The resource name of the Document to delete. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+name}",
+ "response": {
+ "$ref": "Empty"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "get": {
+ "description": "Gets a single document.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}",
+ "httpMethod": "GET",
+ "id": "firestore.projects.databases.documents.get",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "mask.fieldPaths": {
+ "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "name": {
+ "description": "The resource name of the Document to get. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ "required": true,
+ "type": "string"
+ },
+ "readTime": {
+ "description": "Reads the version of the document at the given time.\nThis may not be older than 60 seconds.",
+ "format": "google-datetime",
+ "location": "query",
+ "type": "string"
+ },
+ "transaction": {
+ "description": "Reads the document in a transaction.",
+ "format": "byte",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v1/{+name}",
+ "response": {
+ "$ref": "Document"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "list": {
+ "description": "Lists documents.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}/{collectionId}",
+ "httpMethod": "GET",
+ "id": "firestore.projects.databases.documents.list",
+ "parameterOrder": [
+ "parent",
+ "collectionId"
+ ],
+ "parameters": {
+ "collectionId": {
+ "description": "The collection ID, relative to `parent`, to list. For example: `chatrooms`\nor `messages`.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "mask.fieldPaths": {
+ "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "orderBy": {
+ "description": "The order to sort results by. For example: `priority desc, name`.",
+ "location": "query",
+ "type": "string"
+ },
+ "pageSize": {
+ "description": "The maximum number of documents to return.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "pageToken": {
+ "description": "The `next_page_token` value returned from a previous List request, if any.",
+ "location": "query",
+ "type": "string"
+ },
+ "parent": {
+ "description": "The parent resource name. In the format:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nFor example:\n`projects/my-project/databases/my-database/documents` or\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ "required": true,
+ "type": "string"
+ },
+ "readTime": {
+ "description": "Reads documents as they were at the given time.\nThis may not be older than 60 seconds.",
+ "format": "google-datetime",
+ "location": "query",
+ "type": "string"
+ },
+ "showMissing": {
+ "description": "If the list should show missing documents. A missing document is a\ndocument that does not exist but has sub-documents. These documents will\nbe returned with a key but will not have fields, Document.create_time,\nor Document.update_time set.\n\nRequests with `show_missing` may not specify `where` or\n`order_by`.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "transaction": {
+ "description": "Reads documents in a transaction.",
+ "format": "byte",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v1/{+parent}/{collectionId}",
+ "response": {
+ "$ref": "ListDocumentsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "listCollectionIds": {
+ "description": "Lists all the collection IDs underneath a document.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:listCollectionIds",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.listCollectionIds",
+ "parameterOrder": [
+ "parent"
+ ],
+ "parameters": {
+ "parent": {
+ "description": "The parent document. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nFor example:\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+parent}:listCollectionIds",
+ "request": {
+ "$ref": "ListCollectionIdsRequest"
+ },
+ "response": {
+ "$ref": "ListCollectionIdsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "listen": {
+ "description": "Listens to changes.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:listen",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.listen",
+ "parameterOrder": [
+ "database"
+ ],
+ "parameters": {
+ "database": {
+ "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+database}/documents:listen",
+ "request": {
+ "$ref": "ListenRequest"
+ },
+ "response": {
+ "$ref": "ListenResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "patch": {
+ "description": "Updates or inserts a document.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}",
+ "httpMethod": "PATCH",
+ "id": "firestore.projects.databases.documents.patch",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "currentDocument.exists": {
+ "description": "When set to `true`, the target document must exist.\nWhen set to `false`, the target document must not exist.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "currentDocument.updateTime": {
+ "description": "When set, the target document must exist and have been last updated at\nthat time.",
+ "format": "google-datetime",
+ "location": "query",
+ "type": "string"
+ },
+ "mask.fieldPaths": {
+ "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ },
+ "name": {
+ "description": "The resource name of the document, for example\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ "required": true,
+ "type": "string"
+ },
+ "updateMask.fieldPaths": {
+ "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ "location": "query",
+ "repeated": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+name}",
+ "request": {
+ "$ref": "Document"
+ },
+ "response": {
+ "$ref": "Document"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "rollback": {
+ "description": "Rolls back a transaction.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:rollback",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.rollback",
+ "parameterOrder": [
+ "database"
+ ],
+ "parameters": {
+ "database": {
+ "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+database}/documents:rollback",
+ "request": {
+ "$ref": "RollbackRequest"
+ },
+ "response": {
+ "$ref": "Empty"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "runQuery": {
+ "description": "Runs a query.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runQuery",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.runQuery",
+ "parameterOrder": [
+ "parent"
+ ],
+ "parameters": {
+ "parent": {
+ "description": "The parent resource name. In the format:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nFor example:\n`projects/my-project/databases/my-database/documents` or\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+parent}:runQuery",
+ "request": {
+ "$ref": "RunQueryRequest"
+ },
+ "response": {
+ "$ref": "RunQueryResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ },
+ "write": {
+ "description": "Streams batches of document updates and deletes, in order.",
+ "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:write",
+ "httpMethod": "POST",
+ "id": "firestore.projects.databases.documents.write",
+ "parameterOrder": [
+ "database"
+ ],
+ "parameters": {
+ "database": {
+ "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.\nThis is only required in the first message.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/databases/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+database}/documents:write",
+ "request": {
+ "$ref": "WriteRequest"
+ },
+ "response": {
+ "$ref": "WriteResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/datastore"
+ ]
+ }
+ }
+ },
"operations": {
"methods": {
"cancel": {
@@ -613,15 +1101,469 @@
}
}
},
- "revision": "20181020",
+ "revision": "20181121",
"rootUrl": "https://firestore.googleapis.com/",
"schemas": {
+ "ArrayValue": {
+ "description": "An array value.",
+ "id": "ArrayValue",
+ "properties": {
+ "values": {
+ "description": "Values in the array.",
+ "items": {
+ "$ref": "Value"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "BatchGetDocumentsRequest": {
+ "description": "The request for Firestore.BatchGetDocuments.",
+ "id": "BatchGetDocumentsRequest",
+ "properties": {
+ "documents": {
+ "description": "The names of the documents to retrieve. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nThe request will fail if any of the document is not a child resource of the\ngiven `database`. Duplicate names will be elided.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "mask": {
+ "$ref": "DocumentMask",
+ "description": "The fields to return. If not set, returns all fields.\n\nIf a document has a field that is not present in this mask, that field will\nnot be returned in the response."
+ },
+ "newTransaction": {
+ "$ref": "TransactionOptions",
+ "description": "Starts a new transaction and reads the documents.\nDefaults to a read-only transaction.\nThe new transaction ID will be returned as the first response in the\nstream."
+ },
+ "readTime": {
+ "description": "Reads documents as they were at the given time.\nThis may not be older than 60 seconds.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "transaction": {
+ "description": "Reads documents in a transaction.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "BatchGetDocumentsResponse": {
+ "description": "The streamed response for Firestore.BatchGetDocuments.",
+ "id": "BatchGetDocumentsResponse",
+ "properties": {
+ "found": {
+ "$ref": "Document",
+ "description": "A document that was requested."
+ },
+ "missing": {
+ "description": "A document name that was requested but does not exist. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ "type": "string"
+ },
+ "readTime": {
+ "description": "The time at which the document was read.\nThis may be monotically increasing, in this case the previous documents in\nthe result stream are guaranteed not to have changed between their\nread_time and this one.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "transaction": {
+ "description": "The transaction that was started as part of this request.\nWill only be set in the first response, and only if\nBatchGetDocumentsRequest.new_transaction was set in the request.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "BeginTransactionRequest": {
+ "description": "The request for Firestore.BeginTransaction.",
+ "id": "BeginTransactionRequest",
+ "properties": {
+ "options": {
+ "$ref": "TransactionOptions",
+ "description": "The options for the transaction.\nDefaults to a read-write transaction."
+ }
+ },
+ "type": "object"
+ },
+ "BeginTransactionResponse": {
+ "description": "The response for Firestore.BeginTransaction.",
+ "id": "BeginTransactionResponse",
+ "properties": {
+ "transaction": {
+ "description": "The transaction that was started.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "CollectionSelector": {
+ "description": "A selection of a collection, such as `messages as m1`.",
+ "id": "CollectionSelector",
+ "properties": {
+ "allDescendants": {
+ "description": "When false, selects only collections that are immediate children of\nthe `parent` specified in the containing `RunQueryRequest`.\nWhen true, selects all descendant collections.",
+ "type": "boolean"
+ },
+ "collectionId": {
+ "description": "The collection ID.\nWhen set, selects only collections with this ID.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "CommitRequest": {
+ "description": "The request for Firestore.Commit.",
+ "id": "CommitRequest",
+ "properties": {
+ "transaction": {
+ "description": "If set, applies all writes in this transaction, and commits it.",
+ "format": "byte",
+ "type": "string"
+ },
+ "writes": {
+ "description": "The writes to apply.\n\nAlways executed atomically and in order.",
+ "items": {
+ "$ref": "Write"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "CommitResponse": {
+ "description": "The response for Firestore.Commit.",
+ "id": "CommitResponse",
+ "properties": {
+ "commitTime": {
+ "description": "The time at which the commit occurred.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "writeResults": {
+ "description": "The result of applying the writes.\n\nThis i-th write result corresponds to the i-th write in the\nrequest.",
+ "items": {
+ "$ref": "WriteResult"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "CompositeFilter": {
+ "description": "A filter that merges multiple other filters using the given operator.",
+ "id": "CompositeFilter",
+ "properties": {
+ "filters": {
+ "description": "The list of filters to combine.\nMust contain at least one filter.",
+ "items": {
+ "$ref": "Filter"
+ },
+ "type": "array"
+ },
+ "op": {
+ "description": "The operator for combining multiple filters.",
+ "enum": [
+ "OPERATOR_UNSPECIFIED",
+ "AND"
+ ],
+ "enumDescriptions": [
+ "Unspecified. This value must not be used.",
+ "The results are required to satisfy each of the combined filters."
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Cursor": {
+ "description": "A position in a query result set.",
+ "id": "Cursor",
+ "properties": {
+ "before": {
+ "description": "If the position is just before or just after the given values, relative\nto the sort order defined by the query.",
+ "type": "boolean"
+ },
+ "values": {
+ "description": "The values that represent a position, in the order they appear in\nthe order by clause of a query.\n\nCan contain fewer values than specified in the order by clause.",
+ "items": {
+ "$ref": "Value"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Document": {
+ "description": "A Firestore document.\n\nMust not exceed 1 MiB - 4 bytes.",
+ "id": "Document",
+ "properties": {
+ "createTime": {
+ "description": "Output only. The time at which the document was created.\n\nThis value increases monotonically when a document is deleted then\nrecreated. It can also be compared to values from other documents and\nthe `read_time` of a query.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "fields": {
+ "additionalProperties": {
+ "$ref": "Value"
+ },
+ "description": "The document's fields.\n\nThe map keys represent field names.\n\nA simple field name contains only characters `a` to `z`, `A` to `Z`,\n`0` to `9`, or `_`, and must not start with `0` to `9`. For example,\n`foo_bar_17`.\n\nField names matching the regular expression `__.*__` are reserved. Reserved\nfield names are forbidden except in certain documented contexts. The map\nkeys, represented as UTF-8, must not exceed 1,500 bytes and cannot be\nempty.\n\nField paths may be used in other contexts to refer to structured fields\ndefined here. For `map_value`, the field path is represented by the simple\nor quoted field names of the containing fields, delimited by `.`. For\nexample, the structured field\n`\"foo\" : { map_value: { \"x\u0026y\" : { string_value: \"hello\" }}}` would be\nrepresented by the field path `foo.x\u0026y`.\n\nWithin a field path, a quoted field name starts and ends with `` ` `` and\nmay contain any character. Some characters, including `` ` ``, must be\nescaped using a `\\`. For example, `` `x\u0026y` `` represents `x\u0026y` and\n`` `bak\\`tik` `` represents `` bak`tik ``.",
+ "type": "object"
+ },
+ "name": {
+ "description": "The resource name of the document, for example\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ "type": "string"
+ },
+ "updateTime": {
+ "description": "Output only. The time at which the document was last changed.\n\nThis value is initially set to the `create_time` then increases\nmonotonically with each change to the document. It can also be\ncompared to values from other documents and the `read_time` of a query.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "DocumentChange": {
+ "description": "A Document has changed.\n\nMay be the result of multiple writes, including deletes, that\nultimately resulted in a new value for the Document.\n\nMultiple DocumentChange messages may be returned for the same logical\nchange, if multiple targets are affected.",
+ "id": "DocumentChange",
+ "properties": {
+ "document": {
+ "$ref": "Document",
+ "description": "The new state of the Document.\n\nIf `mask` is set, contains only fields that were updated or added."
+ },
+ "removedTargetIds": {
+ "description": "A set of target IDs for targets that no longer match this document.",
+ "items": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "targetIds": {
+ "description": "A set of target IDs of targets that match this document.",
+ "items": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DocumentDelete": {
+ "description": "A Document has been deleted.\n\nMay be the result of multiple writes, including updates, the\nlast of which deleted the Document.\n\nMultiple DocumentDelete messages may be returned for the same logical\ndelete, if multiple targets are affected.",
+ "id": "DocumentDelete",
+ "properties": {
+ "document": {
+ "description": "The resource name of the Document that was deleted.",
+ "type": "string"
+ },
+ "readTime": {
+ "description": "The read timestamp at which the delete was observed.\n\nGreater or equal to the `commit_time` of the delete.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "removedTargetIds": {
+ "description": "A set of target IDs for targets that previously matched this entity.",
+ "items": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DocumentMask": {
+ "description": "A set of field paths on a document.\nUsed to restrict a get or update operation on a document to a subset of its\nfields.\nThis is different from standard field masks, as this is always scoped to a\nDocument, and takes in account the dynamic nature of Value.",
+ "id": "DocumentMask",
+ "properties": {
+ "fieldPaths": {
+ "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DocumentRemove": {
+ "description": "A Document has been removed from the view of the targets.\n\nSent if the document is no longer relevant to a target and is out of view.\nCan be sent instead of a DocumentDelete or a DocumentChange if the server\ncan not send the new value of the document.\n\nMultiple DocumentRemove messages may be returned for the same logical\nwrite or delete, if multiple targets are affected.",
+ "id": "DocumentRemove",
+ "properties": {
+ "document": {
+ "description": "The resource name of the Document that has gone out of view.",
+ "type": "string"
+ },
+ "readTime": {
+ "description": "The read timestamp at which the remove was observed.\n\nGreater or equal to the `commit_time` of the change/delete/remove.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "removedTargetIds": {
+ "description": "A set of target IDs for targets that previously matched this document.",
+ "items": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DocumentTransform": {
+ "description": "A transformation of a document.",
+ "id": "DocumentTransform",
+ "properties": {
+ "document": {
+ "description": "The name of the document to transform.",
+ "type": "string"
+ },
+ "fieldTransforms": {
+ "description": "The list of transformations to apply to the fields of the document, in\norder.\nThis must not be empty.",
+ "items": {
+ "$ref": "FieldTransform"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "DocumentsTarget": {
+ "description": "A target specified by a set of documents names.",
+ "id": "DocumentsTarget",
+ "properties": {
+ "documents": {
+ "description": "The names of the documents to retrieve. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nThe request will fail if any of the document is not a child resource of\nthe given `database`. Duplicate names will be elided.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.",
"id": "Empty",
"properties": {},
"type": "object"
},
+ "ExistenceFilter": {
+ "description": "A digest of all the documents that match a given target.",
+ "id": "ExistenceFilter",
+ "properties": {
+ "count": {
+ "description": "The total count of documents that match target_id.\n\nIf different from the count of documents in the client that match, the\nclient must manually determine which documents no longer match the target.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "targetId": {
+ "description": "The target ID to which this filter applies.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "FieldFilter": {
+ "description": "A filter on a specific field.",
+ "id": "FieldFilter",
+ "properties": {
+ "field": {
+ "$ref": "FieldReference",
+ "description": "The field to filter by."
+ },
+ "op": {
+ "description": "The operator to filter by.",
+ "enum": [
+ "OPERATOR_UNSPECIFIED",
+ "LESS_THAN",
+ "LESS_THAN_OR_EQUAL",
+ "GREATER_THAN",
+ "GREATER_THAN_OR_EQUAL",
+ "EQUAL",
+ "ARRAY_CONTAINS"
+ ],
+ "enumDescriptions": [
+ "Unspecified. This value must not be used.",
+ "Less than. Requires that the field come first in `order_by`.",
+ "Less than or equal. Requires that the field come first in `order_by`.",
+ "Greater than. Requires that the field come first in `order_by`.",
+ "Greater than or equal. Requires that the field come first in\n`order_by`.",
+ "Equal.",
+ "Contains. Requires that the field is an array."
+ ],
+ "type": "string"
+ },
+ "value": {
+ "$ref": "Value",
+ "description": "The value to compare to."
+ }
+ },
+ "type": "object"
+ },
+ "FieldReference": {
+ "description": "A reference to a field, such as `max(messages.time) as max_time`.",
+ "id": "FieldReference",
+ "properties": {
+ "fieldPath": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "FieldTransform": {
+ "description": "A transformation of a field of the document.",
+ "id": "FieldTransform",
+ "properties": {
+ "appendMissingElements": {
+ "$ref": "ArrayValue",
+ "description": "Append the given elements in order if they are not already present in\nthe current field value.\nIf the field is not an array, or if the field does not yet exist, it is\nfirst set to the empty array.\n\nEquivalent numbers of different types (e.g. 3L and 3.0) are\nconsidered equal when checking if a value is missing.\nNaN is equal to NaN, and Null is equal to Null.\nIf the input contains multiple equivalent values, only the first will\nbe considered.\n\nThe corresponding transform_result will be the null value."
+ },
+ "fieldPath": {
+ "description": "The path of the field. See Document.fields for the field path syntax\nreference.",
+ "type": "string"
+ },
+ "removeAllFromArray": {
+ "$ref": "ArrayValue",
+ "description": "Remove all of the given elements from the array in the field.\nIf the field is not an array, or if the field does not yet exist, it is\nset to the empty array.\n\nEquivalent numbers of the different types (e.g. 3L and 3.0) are\nconsidered equal when deciding whether an element should be removed.\nNaN is equal to NaN, and Null is equal to Null.\nThis will remove all equivalent values if there are duplicates.\n\nThe corresponding transform_result will be the null value."
+ },
+ "setToServerValue": {
+ "description": "Sets the field to the given server value.",
+ "enum": [
+ "SERVER_VALUE_UNSPECIFIED",
+ "REQUEST_TIME"
+ ],
+ "enumDescriptions": [
+ "Unspecified. This value must not be used.",
+ "The time at which the server processed the request, with millisecond\nprecision."
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Filter": {
+ "description": "A filter.",
+ "id": "Filter",
+ "properties": {
+ "compositeFilter": {
+ "$ref": "CompositeFilter",
+ "description": "A composite filter."
+ },
+ "fieldFilter": {
+ "$ref": "FieldFilter",
+ "description": "A filter on a document field."
+ },
+ "unaryFilter": {
+ "$ref": "UnaryFilter",
+ "description": "A filter that takes exactly one argument."
+ }
+ },
+ "type": "object"
+ },
"GoogleFirestoreAdminV1ExportDocumentsMetadata": {
"description": "Metadata for google.longrunning.Operation results from\nFirestoreAdmin.ExportDocuments.",
"id": "GoogleFirestoreAdminV1ExportDocumentsMetadata",
@@ -1169,6 +2111,75 @@
},
"type": "object"
},
+ "LatLng": {
+ "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.",
+ "id": "LatLng",
+ "properties": {
+ "latitude": {
+ "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
+ "format": "double",
+ "type": "number"
+ },
+ "longitude": {
+ "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "ListCollectionIdsRequest": {
+ "description": "The request for Firestore.ListCollectionIds.",
+ "id": "ListCollectionIdsRequest",
+ "properties": {
+ "pageSize": {
+ "description": "The maximum number of results to return.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "pageToken": {
+ "description": "A page token. Must be a value from\nListCollectionIdsResponse.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ListCollectionIdsResponse": {
+ "description": "The response from Firestore.ListCollectionIds.",
+ "id": "ListCollectionIdsResponse",
+ "properties": {
+ "collectionIds": {
+ "description": "The collection ids.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "nextPageToken": {
+ "description": "A page token that may be used to continue the list.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ListDocumentsResponse": {
+ "description": "The response for Firestore.ListDocuments.",
+ "id": "ListDocumentsResponse",
+ "properties": {
+ "documents": {
+ "description": "The Documents found.",
+ "items": {
+ "$ref": "Document"
+ },
+ "type": "array"
+ },
+ "nextPageToken": {
+ "description": "The next page token.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"ListLocationsResponse": {
"description": "The response message for Locations.ListLocations.",
"id": "ListLocationsResponse",
@@ -1187,6 +2198,56 @@
},
"type": "object"
},
+ "ListenRequest": {
+ "description": "A request for Firestore.Listen",
+ "id": "ListenRequest",
+ "properties": {
+ "addTarget": {
+ "$ref": "Target",
+ "description": "A target to add to this stream."
+ },
+ "labels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Labels associated with this target change.",
+ "type": "object"
+ },
+ "removeTarget": {
+ "description": "The ID of a target to remove from this stream.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "ListenResponse": {
+ "description": "The response for Firestore.Listen.",
+ "id": "ListenResponse",
+ "properties": {
+ "documentChange": {
+ "$ref": "DocumentChange",
+ "description": "A Document has changed."
+ },
+ "documentDelete": {
+ "$ref": "DocumentDelete",
+ "description": "A Document has been deleted."
+ },
+ "documentRemove": {
+ "$ref": "DocumentRemove",
+ "description": "A Document has been removed from a target (because it is no longer\nrelevant to that target)."
+ },
+ "filter": {
+ "$ref": "ExistenceFilter",
+ "description": "A filter to apply to the set of documents previously returned for the\ngiven target.\n\nReturned when documents may have been removed from the given target, but\nthe exact documents are unknown."
+ },
+ "targetChange": {
+ "$ref": "TargetChange",
+ "description": "Targets have changed."
+ }
+ },
+ "type": "object"
+ },
"Location": {
"description": "A resource that represents Google Cloud Platform location.",
"id": "Location",
@@ -1221,6 +2282,177 @@
},
"type": "object"
},
+ "MapValue": {
+ "description": "A map value.",
+ "id": "MapValue",
+ "properties": {
+ "fields": {
+ "additionalProperties": {
+ "$ref": "Value"
+ },
+ "description": "The map's fields.\n\nThe map keys represent field names. Field names matching the regular\nexpression `__.*__` are reserved. Reserved field names are forbidden except\nin certain documented contexts. The map keys, represented as UTF-8, must\nnot exceed 1,500 bytes and cannot be empty.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "Order": {
+ "description": "An order on a field.",
+ "id": "Order",
+ "properties": {
+ "direction": {
+ "description": "The direction to order by. Defaults to `ASCENDING`.",
+ "enum": [
+ "DIRECTION_UNSPECIFIED",
+ "ASCENDING",
+ "DESCENDING"
+ ],
+ "enumDescriptions": [
+ "Unspecified.",
+ "Ascending.",
+ "Descending."
+ ],
+ "type": "string"
+ },
+ "field": {
+ "$ref": "FieldReference",
+ "description": "The field to order by."
+ }
+ },
+ "type": "object"
+ },
+ "Precondition": {
+ "description": "A precondition on a document, used for conditional operations.",
+ "id": "Precondition",
+ "properties": {
+ "exists": {
+ "description": "When set to `true`, the target document must exist.\nWhen set to `false`, the target document must not exist.",
+ "type": "boolean"
+ },
+ "updateTime": {
+ "description": "When set, the target document must exist and have been last updated at\nthat time.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Projection": {
+ "description": "The projection of document's fields to return.",
+ "id": "Projection",
+ "properties": {
+ "fields": {
+ "description": "The fields to return.\n\nIf empty, all fields are returned. To only return the name\nof the document, use `['__name__']`.",
+ "items": {
+ "$ref": "FieldReference"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "QueryTarget": {
+ "description": "A target specified by a query.",
+ "id": "QueryTarget",
+ "properties": {
+ "parent": {
+ "description": "The parent resource name. In the format:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nFor example:\n`projects/my-project/databases/my-database/documents` or\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`",
+ "type": "string"
+ },
+ "structuredQuery": {
+ "$ref": "StructuredQuery",
+ "description": "A structured query."
+ }
+ },
+ "type": "object"
+ },
+ "ReadOnly": {
+ "description": "Options for a transaction that can only be used to read documents.",
+ "id": "ReadOnly",
+ "properties": {
+ "readTime": {
+ "description": "Reads documents at the given time.\nThis may not be older than 60 seconds.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ReadWrite": {
+ "description": "Options for a transaction that can be used to read and write documents.",
+ "id": "ReadWrite",
+ "properties": {
+ "retryTransaction": {
+ "description": "An optional transaction to retry.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RollbackRequest": {
+ "description": "The request for Firestore.Rollback.",
+ "id": "RollbackRequest",
+ "properties": {
+ "transaction": {
+ "description": "The transaction to roll back.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RunQueryRequest": {
+ "description": "The request for Firestore.RunQuery.",
+ "id": "RunQueryRequest",
+ "properties": {
+ "newTransaction": {
+ "$ref": "TransactionOptions",
+ "description": "Starts a new transaction and reads the documents.\nDefaults to a read-only transaction.\nThe new transaction ID will be returned as the first response in the\nstream."
+ },
+ "readTime": {
+ "description": "Reads documents as they were at the given time.\nThis may not be older than 60 seconds.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "structuredQuery": {
+ "$ref": "StructuredQuery",
+ "description": "A structured query."
+ },
+ "transaction": {
+ "description": "Reads documents in a transaction.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "RunQueryResponse": {
+ "description": "The response for Firestore.RunQuery.",
+ "id": "RunQueryResponse",
+ "properties": {
+ "document": {
+ "$ref": "Document",
+ "description": "A query result.\nNot set when reporting partial progress."
+ },
+ "readTime": {
+ "description": "The time at which the document was read. This may be monotonically\nincreasing; in this case, the previous documents in the result stream are\nguaranteed not to have changed between their `read_time` and this one.\n\nIf the query returns no results, a response with `read_time` and no\n`document` will be sent, and this represents the time at which the query\nwas run.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "skippedResults": {
+ "description": "The number of results that have been skipped due to an offset between\nthe last response and the current response.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "transaction": {
+ "description": "The transaction that was started as part of this request.\nCan only be set in the first response, and only if\nRunQueryRequest.new_transaction was set in the request.\nIf set, no other fields will be set in this response.",
+ "format": "byte",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Status": {
"description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
"id": "Status",
@@ -1247,6 +2479,339 @@
}
},
"type": "object"
+ },
+ "StructuredQuery": {
+ "description": "A Firestore query.",
+ "id": "StructuredQuery",
+ "properties": {
+ "endAt": {
+ "$ref": "Cursor",
+ "description": "A end point for the query results."
+ },
+ "from": {
+ "description": "The collections to query.",
+ "items": {
+ "$ref": "CollectionSelector"
+ },
+ "type": "array"
+ },
+ "limit": {
+ "description": "The maximum number of results to return.\n\nApplies after all other constraints.\nMust be \u003e= 0 if specified.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "offset": {
+ "description": "The number of results to skip.\n\nApplies before limit, but after all other constraints. Must be \u003e= 0 if\nspecified.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "orderBy": {
+ "description": "The order to apply to the query results.\n\nFirestore guarantees a stable ordering through the following rules:\n\n * Any field required to appear in `order_by`, that is not already\n specified in `order_by`, is appended to the order in field name order\n by default.\n * If an order on `__name__` is not specified, it is appended by default.\n\nFields are appended with the same sort direction as the last order\nspecified, or 'ASCENDING' if no order was specified. For example:\n\n * `SELECT * FROM Foo ORDER BY A` becomes\n `SELECT * FROM Foo ORDER BY A, __name__`\n * `SELECT * FROM Foo ORDER BY A DESC` becomes\n `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`\n * `SELECT * FROM Foo WHERE A \u003e 1` becomes\n `SELECT * FROM Foo WHERE A \u003e 1 ORDER BY A, __name__`",
+ "items": {
+ "$ref": "Order"
+ },
+ "type": "array"
+ },
+ "select": {
+ "$ref": "Projection",
+ "description": "The projection to return."
+ },
+ "startAt": {
+ "$ref": "Cursor",
+ "description": "A starting point for the query results."
+ },
+ "where": {
+ "$ref": "Filter",
+ "description": "The filter to apply."
+ }
+ },
+ "type": "object"
+ },
+ "Target": {
+ "description": "A specification of a set of documents to listen to.",
+ "id": "Target",
+ "properties": {
+ "documents": {
+ "$ref": "DocumentsTarget",
+ "description": "A target specified by a set of document names."
+ },
+ "once": {
+ "description": "If the target should be removed once it is current and consistent.",
+ "type": "boolean"
+ },
+ "query": {
+ "$ref": "QueryTarget",
+ "description": "A target specified by a query."
+ },
+ "readTime": {
+ "description": "Start listening after a specific `read_time`.\n\nThe client must know the state of matching documents at this time.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "resumeToken": {
+ "description": "A resume token from a prior TargetChange for an identical target.\n\nUsing a resume token with a different target is unsupported and may fail.",
+ "format": "byte",
+ "type": "string"
+ },
+ "targetId": {
+ "description": "A client provided target ID.\n\nIf not set, the server will assign an ID for the target.\n\nUsed for resuming a target without changing IDs. The IDs can either be\nclient-assigned or be server-assigned in a previous stream. All targets\nwith client provided IDs must be added before adding a target that needs\na server-assigned id.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "TargetChange": {
+ "description": "Targets being watched have changed.",
+ "id": "TargetChange",
+ "properties": {
+ "cause": {
+ "$ref": "Status",
+ "description": "The error that resulted in this change, if applicable."
+ },
+ "readTime": {
+ "description": "The consistent `read_time` for the given `target_ids` (omitted when the\ntarget_ids are not at a consistent snapshot).\n\nThe stream is guaranteed to send a `read_time` with `target_ids` empty\nwhenever the entire stream reaches a new consistent snapshot. ADD,\nCURRENT, and RESET messages are guaranteed to (eventually) result in a\nnew consistent snapshot (while NO_CHANGE and REMOVE messages are not).\n\nFor a given stream, `read_time` is guaranteed to be monotonically\nincreasing.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "resumeToken": {
+ "description": "A token that can be used to resume the stream for the given `target_ids`,\nor all targets if `target_ids` is empty.\n\nNot set on every target change.",
+ "format": "byte",
+ "type": "string"
+ },
+ "targetChangeType": {
+ "description": "The type of change that occurred.",
+ "enum": [
+ "NO_CHANGE",
+ "ADD",
+ "REMOVE",
+ "CURRENT",
+ "RESET"
+ ],
+ "enumDescriptions": [
+ "No change has occurred. Used only to send an updated `resume_token`.",
+ "The targets have been added.",
+ "The targets have been removed.",
+ "The targets reflect all changes committed before the targets were added\nto the stream.\n\nThis will be sent after or with a `read_time` that is greater than or\nequal to the time at which the targets were added.\n\nListeners can wait for this change if read-after-write semantics\nare desired.",
+ "The targets have been reset, and a new initial state for the targets\nwill be returned in subsequent changes.\n\nAfter the initial state is complete, `CURRENT` will be returned even\nif the target was previously indicated to be `CURRENT`."
+ ],
+ "type": "string"
+ },
+ "targetIds": {
+ "description": "The target IDs of targets that have changed.\n\nIf empty, the change applies to all targets.\n\nFor `target_change_type=ADD`, the order of the target IDs matches the order\nof the requests to add the targets. This allows clients to unambiguously\nassociate server-assigned target IDs with added targets.\n\nFor other states, the order of the target IDs is not defined.",
+ "items": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "TransactionOptions": {
+ "description": "Options for creating a new transaction.",
+ "id": "TransactionOptions",
+ "properties": {
+ "readOnly": {
+ "$ref": "ReadOnly",
+ "description": "The transaction can only be used for read operations."
+ },
+ "readWrite": {
+ "$ref": "ReadWrite",
+ "description": "The transaction can be used for both read and write operations."
+ }
+ },
+ "type": "object"
+ },
+ "UnaryFilter": {
+ "description": "A filter with a single operand.",
+ "id": "UnaryFilter",
+ "properties": {
+ "field": {
+ "$ref": "FieldReference",
+ "description": "The field to which to apply the operator."
+ },
+ "op": {
+ "description": "The unary operator to apply.",
+ "enum": [
+ "OPERATOR_UNSPECIFIED",
+ "IS_NAN",
+ "IS_NULL"
+ ],
+ "enumDescriptions": [
+ "Unspecified. This value must not be used.",
+ "Test if a field is equal to NaN.",
+ "Test if an exprestion evaluates to Null."
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Value": {
+ "description": "A message that can hold any of the supported value types.",
+ "id": "Value",
+ "properties": {
+ "arrayValue": {
+ "$ref": "ArrayValue",
+ "description": "An array value.\n\nCannot directly contain another array value, though can contain an\nmap which contains another array."
+ },
+ "booleanValue": {
+ "description": "A boolean value.",
+ "type": "boolean"
+ },
+ "bytesValue": {
+ "description": "A bytes value.\n\nMust not exceed 1 MiB - 89 bytes.\nOnly the first 1,500 bytes are considered by queries.",
+ "format": "byte",
+ "type": "string"
+ },
+ "doubleValue": {
+ "description": "A double value.",
+ "format": "double",
+ "type": "number"
+ },
+ "geoPointValue": {
+ "$ref": "LatLng",
+ "description": "A geo point value representing a point on the surface of Earth."
+ },
+ "integerValue": {
+ "description": "An integer value.",
+ "format": "int64",
+ "type": "string"
+ },
+ "mapValue": {
+ "$ref": "MapValue",
+ "description": "A map value."
+ },
+ "nullValue": {
+ "description": "A null value.",
+ "enum": [
+ "NULL_VALUE"
+ ],
+ "enumDescriptions": [
+ "Null value."
+ ],
+ "type": "string"
+ },
+ "referenceValue": {
+ "description": "A reference to a document. For example:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ "type": "string"
+ },
+ "stringValue": {
+ "description": "A string value.\n\nThe string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.\nOnly the first 1,500 bytes of the UTF-8 representation are considered by\nqueries.",
+ "type": "string"
+ },
+ "timestampValue": {
+ "description": "A timestamp value.\n\nPrecise only to microseconds. When stored, any additional precision is\nrounded down.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Write": {
+ "description": "A write on a document.",
+ "id": "Write",
+ "properties": {
+ "currentDocument": {
+ "$ref": "Precondition",
+ "description": "An optional precondition on the document.\n\nThe write will fail if this is set and not met by the target document."
+ },
+ "delete": {
+ "description": "A document name to delete. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ "type": "string"
+ },
+ "transform": {
+ "$ref": "DocumentTransform",
+ "description": "Applies a tranformation to a document.\nAt most one `transform` per document is allowed in a given request.\nAn `update` cannot follow a `transform` on the same document in a given\nrequest."
+ },
+ "update": {
+ "$ref": "Document",
+ "description": "A document to write."
+ },
+ "updateMask": {
+ "$ref": "DocumentMask",
+ "description": "The fields to update in this write.\n\nThis field can be set only when the operation is `update`.\nIf the mask is not set for an `update` and the document exists, any\nexisting data will be overwritten.\nIf the mask is set and the document on the server has fields not covered by\nthe mask, they are left unchanged.\nFields referenced in the mask, but not present in the input document, are\ndeleted from the document on the server.\nThe field paths in this mask must not contain a reserved field name."
+ }
+ },
+ "type": "object"
+ },
+ "WriteRequest": {
+ "description": "The request for Firestore.Write.\n\nThe first request creates a stream, or resumes an existing one from a token.\n\nWhen creating a new stream, the server replies with a response containing\nonly an ID and a token, to use in the next request.\n\nWhen resuming a stream, the server first streams any responses later than the\ngiven token, then a response containing only an up-to-date token, to use in\nthe next request.",
+ "id": "WriteRequest",
+ "properties": {
+ "labels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Labels associated with this write request.",
+ "type": "object"
+ },
+ "streamId": {
+ "description": "The ID of the write stream to resume.\nThis may only be set in the first message. When left empty, a new write\nstream will be created.",
+ "type": "string"
+ },
+ "streamToken": {
+ "description": "A stream token that was previously sent by the server.\n\nThe client should set this field to the token from the most recent\nWriteResponse it has received. This acknowledges that the client has\nreceived responses up to this token. After sending this token, earlier\ntokens may not be used anymore.\n\nThe server may close the stream if there are too many unacknowledged\nresponses.\n\nLeave this field unset when creating a new stream. To resume a stream at\na specific point, set this field and the `stream_id` field.\n\nLeave this field unset when creating a new stream.",
+ "format": "byte",
+ "type": "string"
+ },
+ "writes": {
+ "description": "The writes to apply.\n\nAlways executed atomically and in order.\nThis must be empty on the first request.\nThis may be empty on the last request.\nThis must not be empty on all other requests.",
+ "items": {
+ "$ref": "Write"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "WriteResponse": {
+ "description": "The response for Firestore.Write.",
+ "id": "WriteResponse",
+ "properties": {
+ "commitTime": {
+ "description": "The time at which the commit occurred.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "streamId": {
+ "description": "The ID of the stream.\nOnly set on the first message, when a new stream was created.",
+ "type": "string"
+ },
+ "streamToken": {
+ "description": "A token that represents the position of this response in the stream.\nThis can be used by a client to resume the stream at this point.\n\nThis field is always set.",
+ "format": "byte",
+ "type": "string"
+ },
+ "writeResults": {
+ "description": "The result of applying the writes.\n\nThis i-th write result corresponds to the i-th write in the\nrequest.",
+ "items": {
+ "$ref": "WriteResult"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "WriteResult": {
+ "description": "The result of applying a write.",
+ "id": "WriteResult",
+ "properties": {
+ "transformResults": {
+ "description": "The results of applying each DocumentTransform.FieldTransform, in the\nsame order.",
+ "items": {
+ "$ref": "Value"
+ },
+ "type": "array"
+ },
+ "updateTime": {
+ "description": "The last update time of the document after applying the write. Not set\nafter a `delete`.\n\nIf the write did not actually change the document, this will be the\nprevious update_time.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
},
"servicePath": "",
diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go
index 11b1260..b1715a2 100644
--- a/firestore/v1/firestore-gen.go
+++ b/firestore/v1/firestore-gen.go
@@ -103,6 +103,7 @@
func NewProjectsDatabasesService(s *Service) *ProjectsDatabasesService {
rs := &ProjectsDatabasesService{s: s}
rs.CollectionGroups = NewProjectsDatabasesCollectionGroupsService(s)
+ rs.Documents = NewProjectsDatabasesDocumentsService(s)
rs.Operations = NewProjectsDatabasesOperationsService(s)
return rs
}
@@ -112,6 +113,8 @@
CollectionGroups *ProjectsDatabasesCollectionGroupsService
+ Documents *ProjectsDatabasesDocumentsService
+
Operations *ProjectsDatabasesOperationsService
}
@@ -148,6 +151,15 @@
s *Service
}
+func NewProjectsDatabasesDocumentsService(s *Service) *ProjectsDatabasesDocumentsService {
+ rs := &ProjectsDatabasesDocumentsService{s: s}
+ return rs
+}
+
+type ProjectsDatabasesDocumentsService struct {
+ s *Service
+}
+
func NewProjectsDatabasesOperationsService(s *Service) *ProjectsDatabasesOperationsService {
rs := &ProjectsDatabasesOperationsService{s: s}
return rs
@@ -166,6 +178,731 @@
s *Service
}
+// ArrayValue: An array value.
+type ArrayValue struct {
+ // Values: Values in the array.
+ Values []*Value `json:"values,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Values") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Values") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ArrayValue) MarshalJSON() ([]byte, error) {
+ type NoMethod ArrayValue
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BatchGetDocumentsRequest: The request for
+// Firestore.BatchGetDocuments.
+type BatchGetDocumentsRequest struct {
+ // Documents: The names of the documents to retrieve. In the
+ // format:
+ // `projects/{project_id}/databases/{database_id}/documents/{docu
+ // ment_path}`.
+ // The request will fail if any of the document is not a child resource
+ // of the
+ // given `database`. Duplicate names will be elided.
+ Documents []string `json:"documents,omitempty"`
+
+ // Mask: The fields to return. If not set, returns all fields.
+ //
+ // If a document has a field that is not present in this mask, that
+ // field will
+ // not be returned in the response.
+ Mask *DocumentMask `json:"mask,omitempty"`
+
+ // NewTransaction: Starts a new transaction and reads the
+ // documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in
+ // the
+ // stream.
+ NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
+
+ // ReadTime: Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // Transaction: Reads documents in a transaction.
+ Transaction string `json:"transaction,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Documents") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Documents") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BatchGetDocumentsRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod BatchGetDocumentsRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BatchGetDocumentsResponse: The streamed response for
+// Firestore.BatchGetDocuments.
+type BatchGetDocumentsResponse struct {
+ // Found: A document that was requested.
+ Found *Document `json:"found,omitempty"`
+
+ // Missing: A document name that was requested but does not exist. In
+ // the
+ // format:
+ // `projects/{project_id}/databases/{database_id}/documents/{docu
+ // ment_path}`.
+ Missing string `json:"missing,omitempty"`
+
+ // ReadTime: The time at which the document was read.
+ // This may be monotically increasing, in this case the previous
+ // documents in
+ // the result stream are guaranteed not to have changed between
+ // their
+ // read_time and this one.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // Transaction: The transaction that was started as part of this
+ // request.
+ // Will only be set in the first response, and only
+ // if
+ // BatchGetDocumentsRequest.new_transaction was set in the request.
+ Transaction string `json:"transaction,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Found") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Found") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BatchGetDocumentsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod BatchGetDocumentsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BeginTransactionRequest: The request for Firestore.BeginTransaction.
+type BeginTransactionRequest struct {
+ // Options: The options for the transaction.
+ // Defaults to a read-write transaction.
+ Options *TransactionOptions `json:"options,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Options") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Options") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod BeginTransactionRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// BeginTransactionResponse: The response for
+// Firestore.BeginTransaction.
+type BeginTransactionResponse struct {
+ // Transaction: The transaction that was started.
+ Transaction string `json:"transaction,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Transaction") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Transaction") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod BeginTransactionResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// CollectionSelector: A selection of a collection, such as `messages as
+// m1`.
+type CollectionSelector struct {
+ // AllDescendants: When false, selects only collections that are
+ // immediate children of
+ // the `parent` specified in the containing `RunQueryRequest`.
+ // When true, selects all descendant collections.
+ AllDescendants bool `json:"allDescendants,omitempty"`
+
+ // CollectionId: The collection ID.
+ // When set, selects only collections with this ID.
+ CollectionId string `json:"collectionId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AllDescendants") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AllDescendants") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CollectionSelector) MarshalJSON() ([]byte, error) {
+ type NoMethod CollectionSelector
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// CommitRequest: The request for Firestore.Commit.
+type CommitRequest struct {
+ // Transaction: If set, applies all writes in this transaction, and
+ // commits it.
+ Transaction string `json:"transaction,omitempty"`
+
+ // Writes: The writes to apply.
+ //
+ // Always executed atomically and in order.
+ Writes []*Write `json:"writes,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Transaction") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Transaction") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CommitRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod CommitRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// CommitResponse: The response for Firestore.Commit.
+type CommitResponse struct {
+ // CommitTime: The time at which the commit occurred.
+ CommitTime string `json:"commitTime,omitempty"`
+
+ // WriteResults: The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ WriteResults []*WriteResult `json:"writeResults,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CommitTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CommitTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CommitResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod CommitResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// CompositeFilter: A filter that merges multiple other filters using
+// the given operator.
+type CompositeFilter struct {
+ // Filters: The list of filters to combine.
+ // Must contain at least one filter.
+ Filters []*Filter `json:"filters,omitempty"`
+
+ // Op: The operator for combining multiple filters.
+ //
+ // Possible values:
+ // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
+ // "AND" - The results are required to satisfy each of the combined
+ // filters.
+ Op string `json:"op,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Filters") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Filters") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *CompositeFilter) MarshalJSON() ([]byte, error) {
+ type NoMethod CompositeFilter
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Cursor: A position in a query result set.
+type Cursor struct {
+ // Before: If the position is just before or just after the given
+ // values, relative
+ // to the sort order defined by the query.
+ Before bool `json:"before,omitempty"`
+
+ // Values: The values that represent a position, in the order they
+ // appear in
+ // the order by clause of a query.
+ //
+ // Can contain fewer values than specified in the order by clause.
+ Values []*Value `json:"values,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Before") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Before") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Cursor) MarshalJSON() ([]byte, error) {
+ type NoMethod Cursor
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Document: A Firestore document.
+//
+// Must not exceed 1 MiB - 4 bytes.
+type Document struct {
+ // CreateTime: Output only. The time at which the document was
+ // created.
+ //
+ // This value increases monotonically when a document is deleted
+ // then
+ // recreated. It can also be compared to values from other documents
+ // and
+ // the `read_time` of a query.
+ CreateTime string `json:"createTime,omitempty"`
+
+ // Fields: The document's fields.
+ //
+ // The map keys represent field names.
+ //
+ // A simple field name contains only characters `a` to `z`, `A` to
+ // `Z`,
+ // `0` to `9`, or `_`, and must not start with `0` to `9`. For
+ // example,
+ // `foo_bar_17`.
+ //
+ // Field names matching the regular expression `__.*__` are reserved.
+ // Reserved
+ // field names are forbidden except in certain documented contexts. The
+ // map
+ // keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
+ // be
+ // empty.
+ //
+ // Field paths may be used in other contexts to refer to structured
+ // fields
+ // defined here. For `map_value`, the field path is represented by the
+ // simple
+ // or quoted field names of the containing fields, delimited by `.`.
+ // For
+ // example, the structured field
+ // "foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would
+ // be
+ // represented by the field path `foo.x&y`.
+ //
+ // Within a field path, a quoted field name starts and ends with `` ` ``
+ // and
+ // may contain any character. Some characters, including `` ` ``, must
+ // be
+ // escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+ // `` `bak\`tik` `` represents `` bak`tik ``.
+ Fields map[string]Value `json:"fields,omitempty"`
+
+ // Name: The resource name of the document, for
+ // example
+ // `projects/{project_id}/databases/{database_id}/documents/{docu
+ // ment_path}`.
+ Name string `json:"name,omitempty"`
+
+ // UpdateTime: Output only. The time at which the document was last
+ // changed.
+ //
+ // This value is initially set to the `create_time` then
+ // increases
+ // monotonically with each change to the document. It can also
+ // be
+ // compared to values from other documents and the `read_time` of a
+ // query.
+ UpdateTime string `json:"updateTime,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CreateTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CreateTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Document) MarshalJSON() ([]byte, error) {
+ type NoMethod Document
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DocumentChange: A Document has changed.
+//
+// May be the result of multiple writes, including deletes,
+// that
+// ultimately resulted in a new value for the Document.
+//
+// Multiple DocumentChange messages may be returned for the same
+// logical
+// change, if multiple targets are affected.
+type DocumentChange struct {
+ // Document: The new state of the Document.
+ //
+ // If `mask` is set, contains only fields that were updated or added.
+ Document *Document `json:"document,omitempty"`
+
+ // RemovedTargetIds: A set of target IDs for targets that no longer
+ // match this document.
+ RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
+
+ // TargetIds: A set of target IDs of targets that match this document.
+ TargetIds []int64 `json:"targetIds,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Document") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Document") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DocumentChange) MarshalJSON() ([]byte, error) {
+ type NoMethod DocumentChange
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DocumentDelete: A Document has been deleted.
+//
+// May be the result of multiple writes, including updates, the
+// last of which deleted the Document.
+//
+// Multiple DocumentDelete messages may be returned for the same
+// logical
+// delete, if multiple targets are affected.
+type DocumentDelete struct {
+ // Document: The resource name of the Document that was deleted.
+ Document string `json:"document,omitempty"`
+
+ // ReadTime: The read timestamp at which the delete was
+ // observed.
+ //
+ // Greater or equal to the `commit_time` of the delete.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // RemovedTargetIds: A set of target IDs for targets that previously
+ // matched this entity.
+ RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Document") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Document") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DocumentDelete) MarshalJSON() ([]byte, error) {
+ type NoMethod DocumentDelete
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DocumentMask: A set of field paths on a document.
+// Used to restrict a get or update operation on a document to a subset
+// of its
+// fields.
+// This is different from standard field masks, as this is always scoped
+// to a
+// Document, and takes in account the dynamic nature of Value.
+type DocumentMask struct {
+ // FieldPaths: The list of field paths in the mask. See Document.fields
+ // for a field
+ // path syntax reference.
+ FieldPaths []string `json:"fieldPaths,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "FieldPaths") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "FieldPaths") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DocumentMask) MarshalJSON() ([]byte, error) {
+ type NoMethod DocumentMask
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DocumentRemove: A Document has been removed from the view of the
+// targets.
+//
+// Sent if the document is no longer relevant to a target and is out of
+// view.
+// Can be sent instead of a DocumentDelete or a DocumentChange if the
+// server
+// can not send the new value of the document.
+//
+// Multiple DocumentRemove messages may be returned for the same
+// logical
+// write or delete, if multiple targets are affected.
+type DocumentRemove struct {
+ // Document: The resource name of the Document that has gone out of
+ // view.
+ Document string `json:"document,omitempty"`
+
+ // ReadTime: The read timestamp at which the remove was
+ // observed.
+ //
+ // Greater or equal to the `commit_time` of the change/delete/remove.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // RemovedTargetIds: A set of target IDs for targets that previously
+ // matched this document.
+ RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Document") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Document") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DocumentRemove) MarshalJSON() ([]byte, error) {
+ type NoMethod DocumentRemove
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DocumentTransform: A transformation of a document.
+type DocumentTransform struct {
+ // Document: The name of the document to transform.
+ Document string `json:"document,omitempty"`
+
+ // FieldTransforms: The list of transformations to apply to the fields
+ // of the document, in
+ // order.
+ // This must not be empty.
+ FieldTransforms []*FieldTransform `json:"fieldTransforms,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Document") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Document") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DocumentTransform) MarshalJSON() ([]byte, error) {
+ type NoMethod DocumentTransform
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// DocumentsTarget: A target specified by a set of documents names.
+type DocumentsTarget struct {
+ // Documents: The names of the documents to retrieve. In the
+ // format:
+ // `projects/{project_id}/databases/{database_id}/documents/{docu
+ // ment_path}`.
+ // The request will fail if any of the document is not a child resource
+ // of
+ // the given `database`. Duplicate names will be elided.
+ Documents []string `json:"documents,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Documents") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Documents") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *DocumentsTarget) MarshalJSON() ([]byte, error) {
+ type NoMethod DocumentsTarget
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated
// empty messages in your APIs. A typical example is to use it as the
@@ -184,6 +921,230 @@
googleapi.ServerResponse `json:"-"`
}
+// ExistenceFilter: A digest of all the documents that match a given
+// target.
+type ExistenceFilter struct {
+ // Count: The total count of documents that match target_id.
+ //
+ // If different from the count of documents in the client that match,
+ // the
+ // client must manually determine which documents no longer match the
+ // target.
+ Count int64 `json:"count,omitempty"`
+
+ // TargetId: The target ID to which this filter applies.
+ TargetId int64 `json:"targetId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Count") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Count") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ExistenceFilter) MarshalJSON() ([]byte, error) {
+ type NoMethod ExistenceFilter
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// FieldFilter: A filter on a specific field.
+type FieldFilter struct {
+ // Field: The field to filter by.
+ Field *FieldReference `json:"field,omitempty"`
+
+ // Op: The operator to filter by.
+ //
+ // Possible values:
+ // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
+ // "LESS_THAN" - Less than. Requires that the field come first in
+ // `order_by`.
+ // "LESS_THAN_OR_EQUAL" - Less than or equal. Requires that the field
+ // come first in `order_by`.
+ // "GREATER_THAN" - Greater than. Requires that the field come first
+ // in `order_by`.
+ // "GREATER_THAN_OR_EQUAL" - Greater than or equal. Requires that the
+ // field come first in
+ // `order_by`.
+ // "EQUAL" - Equal.
+ // "ARRAY_CONTAINS" - Contains. Requires that the field is an array.
+ Op string `json:"op,omitempty"`
+
+ // Value: The value to compare to.
+ Value *Value `json:"value,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Field") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Field") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *FieldFilter) MarshalJSON() ([]byte, error) {
+ type NoMethod FieldFilter
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// FieldReference: A reference to a field, such as `max(messages.time)
+// as max_time`.
+type FieldReference struct {
+ FieldPath string `json:"fieldPath,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "FieldPath") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "FieldPath") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *FieldReference) MarshalJSON() ([]byte, error) {
+ type NoMethod FieldReference
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// FieldTransform: A transformation of a field of the document.
+type FieldTransform struct {
+ // AppendMissingElements: Append the given elements in order if they are
+ // not already present in
+ // the current field value.
+ // If the field is not an array, or if the field does not yet exist, it
+ // is
+ // first set to the empty array.
+ //
+ // Equivalent numbers of different types (e.g. 3L and 3.0)
+ // are
+ // considered equal when checking if a value is missing.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // If the input contains multiple equivalent values, only the first
+ // will
+ // be considered.
+ //
+ // The corresponding transform_result will be the null value.
+ AppendMissingElements *ArrayValue `json:"appendMissingElements,omitempty"`
+
+ // FieldPath: The path of the field. See Document.fields for the field
+ // path syntax
+ // reference.
+ FieldPath string `json:"fieldPath,omitempty"`
+
+ // RemoveAllFromArray: Remove all of the given elements from the array
+ // in the field.
+ // If the field is not an array, or if the field does not yet exist, it
+ // is
+ // set to the empty array.
+ //
+ // Equivalent numbers of the different types (e.g. 3L and 3.0)
+ // are
+ // considered equal when deciding whether an element should be
+ // removed.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // This will remove all equivalent values if there are duplicates.
+ //
+ // The corresponding transform_result will be the null value.
+ RemoveAllFromArray *ArrayValue `json:"removeAllFromArray,omitempty"`
+
+ // SetToServerValue: Sets the field to the given server value.
+ //
+ // Possible values:
+ // "SERVER_VALUE_UNSPECIFIED" - Unspecified. This value must not be
+ // used.
+ // "REQUEST_TIME" - The time at which the server processed the
+ // request, with millisecond
+ // precision.
+ SetToServerValue string `json:"setToServerValue,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "AppendMissingElements") to unconditionally include in API requests.
+ // By default, fields with empty values are omitted from API requests.
+ // However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AppendMissingElements") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *FieldTransform) MarshalJSON() ([]byte, error) {
+ type NoMethod FieldTransform
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Filter: A filter.
+type Filter struct {
+ // CompositeFilter: A composite filter.
+ CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"`
+
+ // FieldFilter: A filter on a document field.
+ FieldFilter *FieldFilter `json:"fieldFilter,omitempty"`
+
+ // UnaryFilter: A filter that takes exactly one argument.
+ UnaryFilter *UnaryFilter `json:"unaryFilter,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CompositeFilter") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CompositeFilter") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Filter) MarshalJSON() ([]byte, error) {
+ type NoMethod Filter
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// GoogleFirestoreAdminV1ExportDocumentsMetadata: Metadata for
// google.longrunning.Operation results
// from
@@ -1146,6 +2107,168 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// LatLng: An object representing a latitude/longitude pair. This is
+// expressed as a pair
+// of doubles representing degrees latitude and degrees longitude.
+// Unless
+// specified otherwise, this must conform to the
+// <a
+// href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
+// st
+// andard</a>. Values must be within normalized ranges.
+type LatLng struct {
+ // Latitude: The latitude in degrees. It must be in the range [-90.0,
+ // +90.0].
+ Latitude float64 `json:"latitude,omitempty"`
+
+ // Longitude: The longitude in degrees. It must be in the range [-180.0,
+ // +180.0].
+ Longitude float64 `json:"longitude,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Latitude") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Latitude") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LatLng) MarshalJSON() ([]byte, error) {
+ type NoMethod LatLng
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *LatLng) UnmarshalJSON(data []byte) error {
+ type NoMethod LatLng
+ var s1 struct {
+ Latitude gensupport.JSONFloat64 `json:"latitude"`
+ Longitude gensupport.JSONFloat64 `json:"longitude"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Latitude = float64(s1.Latitude)
+ s.Longitude = float64(s1.Longitude)
+ return nil
+}
+
+// ListCollectionIdsRequest: The request for
+// Firestore.ListCollectionIds.
+type ListCollectionIdsRequest struct {
+ // PageSize: The maximum number of results to return.
+ PageSize int64 `json:"pageSize,omitempty"`
+
+ // PageToken: A page token. Must be a value
+ // from
+ // ListCollectionIdsResponse.
+ PageToken string `json:"pageToken,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "PageSize") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "PageSize") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListCollectionIdsRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod ListCollectionIdsRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ListCollectionIdsResponse: The response from
+// Firestore.ListCollectionIds.
+type ListCollectionIdsResponse struct {
+ // CollectionIds: The collection ids.
+ CollectionIds []string `json:"collectionIds,omitempty"`
+
+ // NextPageToken: A page token that may be used to continue the list.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CollectionIds") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CollectionIds") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListCollectionIdsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListCollectionIdsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ListDocumentsResponse: The response for Firestore.ListDocuments.
+type ListDocumentsResponse struct {
+ // Documents: The Documents found.
+ Documents []*Document `json:"documents,omitempty"`
+
+ // NextPageToken: The next page token.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Documents") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Documents") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListDocumentsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListDocumentsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ListLocationsResponse: The response message for
// Locations.ListLocations.
type ListLocationsResponse struct {
@@ -1183,6 +2306,93 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// ListenRequest: A request for Firestore.Listen
+type ListenRequest struct {
+ // AddTarget: A target to add to this stream.
+ AddTarget *Target `json:"addTarget,omitempty"`
+
+ // Labels: Labels associated with this target change.
+ Labels map[string]string `json:"labels,omitempty"`
+
+ // RemoveTarget: The ID of a target to remove from this stream.
+ RemoveTarget int64 `json:"removeTarget,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AddTarget") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AddTarget") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListenRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod ListenRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ListenResponse: The response for Firestore.Listen.
+type ListenResponse struct {
+ // DocumentChange: A Document has changed.
+ DocumentChange *DocumentChange `json:"documentChange,omitempty"`
+
+ // DocumentDelete: A Document has been deleted.
+ DocumentDelete *DocumentDelete `json:"documentDelete,omitempty"`
+
+ // DocumentRemove: A Document has been removed from a target (because it
+ // is no longer
+ // relevant to that target).
+ DocumentRemove *DocumentRemove `json:"documentRemove,omitempty"`
+
+ // Filter: A filter to apply to the set of documents previously returned
+ // for the
+ // given target.
+ //
+ // Returned when documents may have been removed from the given target,
+ // but
+ // the exact documents are unknown.
+ Filter *ExistenceFilter `json:"filter,omitempty"`
+
+ // TargetChange: Targets have changed.
+ TargetChange *TargetChange `json:"targetChange,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "DocumentChange") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "DocumentChange") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListenResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListenResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Location: A resource that represents Google Cloud Platform location.
type Location struct {
// DisplayName: The friendly name for this location, typically a nearby
@@ -1236,6 +2446,377 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// MapValue: A map value.
+type MapValue struct {
+ // Fields: The map's fields.
+ //
+ // The map keys represent field names. Field names matching the
+ // regular
+ // expression `__.*__` are reserved. Reserved field names are forbidden
+ // except
+ // in certain documented contexts. The map keys, represented as UTF-8,
+ // must
+ // not exceed 1,500 bytes and cannot be empty.
+ Fields map[string]Value `json:"fields,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Fields") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Fields") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *MapValue) MarshalJSON() ([]byte, error) {
+ type NoMethod MapValue
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Order: An order on a field.
+type Order struct {
+ // Direction: The direction to order by. Defaults to `ASCENDING`.
+ //
+ // Possible values:
+ // "DIRECTION_UNSPECIFIED" - Unspecified.
+ // "ASCENDING" - Ascending.
+ // "DESCENDING" - Descending.
+ Direction string `json:"direction,omitempty"`
+
+ // Field: The field to order by.
+ Field *FieldReference `json:"field,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Direction") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Direction") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Order) MarshalJSON() ([]byte, error) {
+ type NoMethod Order
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Precondition: A precondition on a document, used for conditional
+// operations.
+type Precondition struct {
+ // Exists: When set to `true`, the target document must exist.
+ // When set to `false`, the target document must not exist.
+ Exists bool `json:"exists,omitempty"`
+
+ // UpdateTime: When set, the target document must exist and have been
+ // last updated at
+ // that time.
+ UpdateTime string `json:"updateTime,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Exists") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Exists") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Precondition) MarshalJSON() ([]byte, error) {
+ type NoMethod Precondition
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Projection: The projection of document's fields to return.
+type Projection struct {
+ // Fields: The fields to return.
+ //
+ // If empty, all fields are returned. To only return the name
+ // of the document, use `['__name__']`.
+ Fields []*FieldReference `json:"fields,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Fields") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Fields") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Projection) MarshalJSON() ([]byte, error) {
+ type NoMethod Projection
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// QueryTarget: A target specified by a query.
+type QueryTarget struct {
+ // Parent: The parent resource name. In the
+ // format:
+ // `projects/{project_id}/databases/{database_id}/documents`
+ // or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_
+ // path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents`
+ // or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-c
+ // hatroom`
+ Parent string `json:"parent,omitempty"`
+
+ // StructuredQuery: A structured query.
+ StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Parent") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Parent") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *QueryTarget) MarshalJSON() ([]byte, error) {
+ type NoMethod QueryTarget
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ReadOnly: Options for a transaction that can only be used to read
+// documents.
+type ReadOnly struct {
+ // ReadTime: Reads documents at the given time.
+ // This may not be older than 60 seconds.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ReadTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ReadTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ReadOnly) MarshalJSON() ([]byte, error) {
+ type NoMethod ReadOnly
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ReadWrite: Options for a transaction that can be used to read and
+// write documents.
+type ReadWrite struct {
+ // RetryTransaction: An optional transaction to retry.
+ RetryTransaction string `json:"retryTransaction,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "RetryTransaction") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "RetryTransaction") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ReadWrite) MarshalJSON() ([]byte, error) {
+ type NoMethod ReadWrite
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// RollbackRequest: The request for Firestore.Rollback.
+type RollbackRequest struct {
+ // Transaction: The transaction to roll back.
+ Transaction string `json:"transaction,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Transaction") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Transaction") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RollbackRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod RollbackRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// RunQueryRequest: The request for Firestore.RunQuery.
+type RunQueryRequest struct {
+ // NewTransaction: Starts a new transaction and reads the
+ // documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in
+ // the
+ // stream.
+ NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
+
+ // ReadTime: Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // StructuredQuery: A structured query.
+ StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
+
+ // Transaction: Reads documents in a transaction.
+ Transaction string `json:"transaction,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "NewTransaction") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "NewTransaction") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RunQueryRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod RunQueryRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// RunQueryResponse: The response for Firestore.RunQuery.
+type RunQueryResponse struct {
+ // Document: A query result.
+ // Not set when reporting partial progress.
+ Document *Document `json:"document,omitempty"`
+
+ // ReadTime: The time at which the document was read. This may be
+ // monotonically
+ // increasing; in this case, the previous documents in the result stream
+ // are
+ // guaranteed not to have changed between their `read_time` and this
+ // one.
+ //
+ // If the query returns no results, a response with `read_time` and
+ // no
+ // `document` will be sent, and this represents the time at which the
+ // query
+ // was run.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // SkippedResults: The number of results that have been skipped due to
+ // an offset between
+ // the last response and the current response.
+ SkippedResults int64 `json:"skippedResults,omitempty"`
+
+ // Transaction: The transaction that was started as part of this
+ // request.
+ // Can only be set in the first response, and only
+ // if
+ // RunQueryRequest.new_transaction was set in the request.
+ // If set, no other fields will be set in this response.
+ Transaction string `json:"transaction,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Document") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Document") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RunQueryResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod RunQueryResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Status: The `Status` type defines a logical error model that is
// suitable for different
// programming environments, including REST APIs and RPC APIs. It is
@@ -1355,6 +2936,629 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// StructuredQuery: A Firestore query.
+type StructuredQuery struct {
+ // EndAt: A end point for the query results.
+ EndAt *Cursor `json:"endAt,omitempty"`
+
+ // From: The collections to query.
+ From []*CollectionSelector `json:"from,omitempty"`
+
+ // Limit: The maximum number of results to return.
+ //
+ // Applies after all other constraints.
+ // Must be >= 0 if specified.
+ Limit int64 `json:"limit,omitempty"`
+
+ // Offset: The number of results to skip.
+ //
+ // Applies before limit, but after all other constraints. Must be >= 0
+ // if
+ // specified.
+ Offset int64 `json:"offset,omitempty"`
+
+ // OrderBy: The order to apply to the query results.
+ //
+ // Firestore guarantees a stable ordering through the following rules:
+ //
+ // * Any field required to appear in `order_by`, that is not already
+ // specified in `order_by`, is appended to the order in field name
+ // order
+ // by default.
+ // * If an order on `__name__` is not specified, it is appended by
+ // default.
+ //
+ // Fields are appended with the same sort direction as the last
+ // order
+ // specified, or 'ASCENDING' if no order was specified. For example:
+ //
+ // * `SELECT * FROM Foo ORDER BY A` becomes
+ // `SELECT * FROM Foo ORDER BY A, __name__`
+ // * `SELECT * FROM Foo ORDER BY A DESC` becomes
+ // `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
+ // * `SELECT * FROM Foo WHERE A > 1` becomes
+ // `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
+ OrderBy []*Order `json:"orderBy,omitempty"`
+
+ // Select: The projection to return.
+ Select *Projection `json:"select,omitempty"`
+
+ // StartAt: A starting point for the query results.
+ StartAt *Cursor `json:"startAt,omitempty"`
+
+ // Where: The filter to apply.
+ Where *Filter `json:"where,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "EndAt") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "EndAt") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *StructuredQuery) MarshalJSON() ([]byte, error) {
+ type NoMethod StructuredQuery
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Target: A specification of a set of documents to listen to.
+type Target struct {
+ // Documents: A target specified by a set of document names.
+ Documents *DocumentsTarget `json:"documents,omitempty"`
+
+ // Once: If the target should be removed once it is current and
+ // consistent.
+ Once bool `json:"once,omitempty"`
+
+ // Query: A target specified by a query.
+ Query *QueryTarget `json:"query,omitempty"`
+
+ // ReadTime: Start listening after a specific `read_time`.
+ //
+ // The client must know the state of matching documents at this time.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // ResumeToken: A resume token from a prior TargetChange for an
+ // identical target.
+ //
+ // Using a resume token with a different target is unsupported and may
+ // fail.
+ ResumeToken string `json:"resumeToken,omitempty"`
+
+ // TargetId: A client provided target ID.
+ //
+ // If not set, the server will assign an ID for the target.
+ //
+ // Used for resuming a target without changing IDs. The IDs can either
+ // be
+ // client-assigned or be server-assigned in a previous stream. All
+ // targets
+ // with client provided IDs must be added before adding a target that
+ // needs
+ // a server-assigned id.
+ TargetId int64 `json:"targetId,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Documents") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Documents") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Target) MarshalJSON() ([]byte, error) {
+ type NoMethod Target
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// TargetChange: Targets being watched have changed.
+type TargetChange struct {
+ // Cause: The error that resulted in this change, if applicable.
+ Cause *Status `json:"cause,omitempty"`
+
+ // ReadTime: The consistent `read_time` for the given `target_ids`
+ // (omitted when the
+ // target_ids are not at a consistent snapshot).
+ //
+ // The stream is guaranteed to send a `read_time` with `target_ids`
+ // empty
+ // whenever the entire stream reaches a new consistent snapshot.
+ // ADD,
+ // CURRENT, and RESET messages are guaranteed to (eventually) result in
+ // a
+ // new consistent snapshot (while NO_CHANGE and REMOVE messages are
+ // not).
+ //
+ // For a given stream, `read_time` is guaranteed to be
+ // monotonically
+ // increasing.
+ ReadTime string `json:"readTime,omitempty"`
+
+ // ResumeToken: A token that can be used to resume the stream for the
+ // given `target_ids`,
+ // or all targets if `target_ids` is empty.
+ //
+ // Not set on every target change.
+ ResumeToken string `json:"resumeToken,omitempty"`
+
+ // TargetChangeType: The type of change that occurred.
+ //
+ // Possible values:
+ // "NO_CHANGE" - No change has occurred. Used only to send an updated
+ // `resume_token`.
+ // "ADD" - The targets have been added.
+ // "REMOVE" - The targets have been removed.
+ // "CURRENT" - The targets reflect all changes committed before the
+ // targets were added
+ // to the stream.
+ //
+ // This will be sent after or with a `read_time` that is greater than
+ // or
+ // equal to the time at which the targets were added.
+ //
+ // Listeners can wait for this change if read-after-write semantics
+ // are desired.
+ // "RESET" - The targets have been reset, and a new initial state for
+ // the targets
+ // will be returned in subsequent changes.
+ //
+ // After the initial state is complete, `CURRENT` will be returned
+ // even
+ // if the target was previously indicated to be `CURRENT`.
+ TargetChangeType string `json:"targetChangeType,omitempty"`
+
+ // TargetIds: The target IDs of targets that have changed.
+ //
+ // If empty, the change applies to all targets.
+ //
+ // For `target_change_type=ADD`, the order of the target IDs matches the
+ // order
+ // of the requests to add the targets. This allows clients to
+ // unambiguously
+ // associate server-assigned target IDs with added targets.
+ //
+ // For other states, the order of the target IDs is not defined.
+ TargetIds []int64 `json:"targetIds,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Cause") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Cause") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TargetChange) MarshalJSON() ([]byte, error) {
+ type NoMethod TargetChange
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// TransactionOptions: Options for creating a new transaction.
+type TransactionOptions struct {
+ // ReadOnly: The transaction can only be used for read operations.
+ ReadOnly *ReadOnly `json:"readOnly,omitempty"`
+
+ // ReadWrite: The transaction can be used for both read and write
+ // operations.
+ ReadWrite *ReadWrite `json:"readWrite,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ReadOnly") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ReadOnly") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TransactionOptions) MarshalJSON() ([]byte, error) {
+ type NoMethod TransactionOptions
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// UnaryFilter: A filter with a single operand.
+type UnaryFilter struct {
+ // Field: The field to which to apply the operator.
+ Field *FieldReference `json:"field,omitempty"`
+
+ // Op: The unary operator to apply.
+ //
+ // Possible values:
+ // "OPERATOR_UNSPECIFIED" - Unspecified. This value must not be used.
+ // "IS_NAN" - Test if a field is equal to NaN.
+ // "IS_NULL" - Test if an exprestion evaluates to Null.
+ Op string `json:"op,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Field") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Field") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *UnaryFilter) MarshalJSON() ([]byte, error) {
+ type NoMethod UnaryFilter
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Value: A message that can hold any of the supported value types.
+type Value struct {
+ // ArrayValue: An array value.
+ //
+ // Cannot directly contain another array value, though can contain
+ // an
+ // map which contains another array.
+ ArrayValue *ArrayValue `json:"arrayValue,omitempty"`
+
+ // BooleanValue: A boolean value.
+ BooleanValue bool `json:"booleanValue,omitempty"`
+
+ // BytesValue: A bytes value.
+ //
+ // Must not exceed 1 MiB - 89 bytes.
+ // Only the first 1,500 bytes are considered by queries.
+ BytesValue string `json:"bytesValue,omitempty"`
+
+ // DoubleValue: A double value.
+ DoubleValue float64 `json:"doubleValue,omitempty"`
+
+ // GeoPointValue: A geo point value representing a point on the surface
+ // of Earth.
+ GeoPointValue *LatLng `json:"geoPointValue,omitempty"`
+
+ // IntegerValue: An integer value.
+ IntegerValue int64 `json:"integerValue,omitempty,string"`
+
+ // MapValue: A map value.
+ MapValue *MapValue `json:"mapValue,omitempty"`
+
+ // NullValue: A null value.
+ //
+ // Possible values:
+ // "NULL_VALUE" - Null value.
+ NullValue string `json:"nullValue,omitempty"`
+
+ // ReferenceValue: A reference to a document. For
+ // example:
+ // `projects/{project_id}/databases/{database_id}/documents/{doc
+ // ument_path}`.
+ ReferenceValue string `json:"referenceValue,omitempty"`
+
+ // StringValue: A string value.
+ //
+ // The string, represented as UTF-8, must not exceed 1 MiB - 89
+ // bytes.
+ // Only the first 1,500 bytes of the UTF-8 representation are considered
+ // by
+ // queries.
+ StringValue string `json:"stringValue,omitempty"`
+
+ // TimestampValue: A timestamp value.
+ //
+ // Precise only to microseconds. When stored, any additional precision
+ // is
+ // rounded down.
+ TimestampValue string `json:"timestampValue,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ArrayValue") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ArrayValue") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Value) MarshalJSON() ([]byte, error) {
+ type NoMethod Value
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *Value) UnmarshalJSON(data []byte) error {
+ type NoMethod Value
+ var s1 struct {
+ DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.DoubleValue = float64(s1.DoubleValue)
+ return nil
+}
+
+// Write: A write on a document.
+type Write struct {
+ // CurrentDocument: An optional precondition on the document.
+ //
+ // The write will fail if this is set and not met by the target
+ // document.
+ CurrentDocument *Precondition `json:"currentDocument,omitempty"`
+
+ // Delete: A document name to delete. In the
+ // format:
+ // `projects/{project_id}/databases/{database_id}/documents/{docu
+ // ment_path}`.
+ Delete string `json:"delete,omitempty"`
+
+ // Transform: Applies a tranformation to a document.
+ // At most one `transform` per document is allowed in a given
+ // request.
+ // An `update` cannot follow a `transform` on the same document in a
+ // given
+ // request.
+ Transform *DocumentTransform `json:"transform,omitempty"`
+
+ // Update: A document to write.
+ Update *Document `json:"update,omitempty"`
+
+ // UpdateMask: The fields to update in this write.
+ //
+ // This field can be set only when the operation is `update`.
+ // If the mask is not set for an `update` and the document exists,
+ // any
+ // existing data will be overwritten.
+ // If the mask is set and the document on the server has fields not
+ // covered by
+ // the mask, they are left unchanged.
+ // Fields referenced in the mask, but not present in the input document,
+ // are
+ // deleted from the document on the server.
+ // The field paths in this mask must not contain a reserved field name.
+ UpdateMask *DocumentMask `json:"updateMask,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "CurrentDocument") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CurrentDocument") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Write) MarshalJSON() ([]byte, error) {
+ type NoMethod Write
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// WriteRequest: The request for Firestore.Write.
+//
+// The first request creates a stream, or resumes an existing one from a
+// token.
+//
+// When creating a new stream, the server replies with a response
+// containing
+// only an ID and a token, to use in the next request.
+//
+// When resuming a stream, the server first streams any responses later
+// than the
+// given token, then a response containing only an up-to-date token, to
+// use in
+// the next request.
+type WriteRequest struct {
+ // Labels: Labels associated with this write request.
+ Labels map[string]string `json:"labels,omitempty"`
+
+ // StreamId: The ID of the write stream to resume.
+ // This may only be set in the first message. When left empty, a new
+ // write
+ // stream will be created.
+ StreamId string `json:"streamId,omitempty"`
+
+ // StreamToken: A stream token that was previously sent by the
+ // server.
+ //
+ // The client should set this field to the token from the most
+ // recent
+ // WriteResponse it has received. This acknowledges that the client
+ // has
+ // received responses up to this token. After sending this token,
+ // earlier
+ // tokens may not be used anymore.
+ //
+ // The server may close the stream if there are too many
+ // unacknowledged
+ // responses.
+ //
+ // Leave this field unset when creating a new stream. To resume a stream
+ // at
+ // a specific point, set this field and the `stream_id` field.
+ //
+ // Leave this field unset when creating a new stream.
+ StreamToken string `json:"streamToken,omitempty"`
+
+ // Writes: The writes to apply.
+ //
+ // Always executed atomically and in order.
+ // This must be empty on the first request.
+ // This may be empty on the last request.
+ // This must not be empty on all other requests.
+ Writes []*Write `json:"writes,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Labels") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Labels") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *WriteRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod WriteRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// WriteResponse: The response for Firestore.Write.
+type WriteResponse struct {
+ // CommitTime: The time at which the commit occurred.
+ CommitTime string `json:"commitTime,omitempty"`
+
+ // StreamId: The ID of the stream.
+ // Only set on the first message, when a new stream was created.
+ StreamId string `json:"streamId,omitempty"`
+
+ // StreamToken: A token that represents the position of this response in
+ // the stream.
+ // This can be used by a client to resume the stream at this
+ // point.
+ //
+ // This field is always set.
+ StreamToken string `json:"streamToken,omitempty"`
+
+ // WriteResults: The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ WriteResults []*WriteResult `json:"writeResults,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "CommitTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CommitTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *WriteResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod WriteResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// WriteResult: The result of applying a write.
+type WriteResult struct {
+ // TransformResults: The results of applying each
+ // DocumentTransform.FieldTransform, in the
+ // same order.
+ TransformResults []*Value `json:"transformResults,omitempty"`
+
+ // UpdateTime: The last update time of the document after applying the
+ // write. Not set
+ // after a `delete`.
+ //
+ // If the write did not actually change the document, this will be
+ // the
+ // previous update_time.
+ UpdateTime string `json:"updateTime,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "TransformResults") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "TransformResults") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *WriteResult) MarshalJSON() ([]byte, error) {
+ type NoMethod WriteResult
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// method id "firestore.projects.databases.exportDocuments":
type ProjectsDatabasesExportDocumentsCall struct {
@@ -2820,6 +5024,2146 @@
}
}
+// method id "firestore.projects.databases.documents.batchGet":
+
+type ProjectsDatabasesDocumentsBatchGetCall struct {
+ s *Service
+ database string
+ batchgetdocumentsrequest *BatchGetDocumentsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// BatchGet: Gets multiple documents.
+//
+// Documents returned by this method are not guaranteed to be returned
+// in the
+// same order that they were requested.
+func (r *ProjectsDatabasesDocumentsService) BatchGet(database string, batchgetdocumentsrequest *BatchGetDocumentsRequest) *ProjectsDatabasesDocumentsBatchGetCall {
+ c := &ProjectsDatabasesDocumentsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.database = database
+ c.batchgetdocumentsrequest = batchgetdocumentsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsBatchGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsBatchGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsBatchGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsBatchGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetdocumentsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:batchGet")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "database": c.database,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.batchGet" call.
+// Exactly one of *BatchGetDocumentsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *BatchGetDocumentsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetDocumentsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &BatchGetDocumentsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets multiple documents.\n\nDocuments returned by this method are not guaranteed to be returned in the\nsame order that they were requested.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:batchGet",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.batchGet",
+ // "parameterOrder": [
+ // "database"
+ // ],
+ // "parameters": {
+ // "database": {
+ // "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+database}/documents:batchGet",
+ // "request": {
+ // "$ref": "BatchGetDocumentsRequest"
+ // },
+ // "response": {
+ // "$ref": "BatchGetDocumentsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.beginTransaction":
+
+type ProjectsDatabasesDocumentsBeginTransactionCall struct {
+ s *Service
+ database string
+ begintransactionrequest *BeginTransactionRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// BeginTransaction: Starts a new transaction.
+func (r *ProjectsDatabasesDocumentsService) BeginTransaction(database string, begintransactionrequest *BeginTransactionRequest) *ProjectsDatabasesDocumentsBeginTransactionCall {
+ c := &ProjectsDatabasesDocumentsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.database = database
+ c.begintransactionrequest = begintransactionrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBeginTransactionCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBeginTransactionCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:beginTransaction")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "database": c.database,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.beginTransaction" call.
+// Exactly one of *BeginTransactionResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *BeginTransactionResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &BeginTransactionResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Starts a new transaction.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:beginTransaction",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.beginTransaction",
+ // "parameterOrder": [
+ // "database"
+ // ],
+ // "parameters": {
+ // "database": {
+ // "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+database}/documents:beginTransaction",
+ // "request": {
+ // "$ref": "BeginTransactionRequest"
+ // },
+ // "response": {
+ // "$ref": "BeginTransactionResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.commit":
+
+type ProjectsDatabasesDocumentsCommitCall struct {
+ s *Service
+ database string
+ commitrequest *CommitRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Commit: Commits a transaction, while optionally updating documents.
+func (r *ProjectsDatabasesDocumentsService) Commit(database string, commitrequest *CommitRequest) *ProjectsDatabasesDocumentsCommitCall {
+ c := &ProjectsDatabasesDocumentsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.database = database
+ c.commitrequest = commitrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsCommitCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCommitCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsCommitCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCommitCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsCommitCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsCommitCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:commit")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "database": c.database,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.commit" call.
+// Exactly one of *CommitResponse or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *CommitResponse.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &CommitResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Commits a transaction, while optionally updating documents.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:commit",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.commit",
+ // "parameterOrder": [
+ // "database"
+ // ],
+ // "parameters": {
+ // "database": {
+ // "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+database}/documents:commit",
+ // "request": {
+ // "$ref": "CommitRequest"
+ // },
+ // "response": {
+ // "$ref": "CommitResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.createDocument":
+
+type ProjectsDatabasesDocumentsCreateDocumentCall struct {
+ s *Service
+ parent string
+ collectionId string
+ document *Document
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// CreateDocument: Creates a new document.
+func (r *ProjectsDatabasesDocumentsService) CreateDocument(parent string, collectionId string, document *Document) *ProjectsDatabasesDocumentsCreateDocumentCall {
+ c := &ProjectsDatabasesDocumentsCreateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.parent = parent
+ c.collectionId = collectionId
+ c.document = document
+ return c
+}
+
+// DocumentId sets the optional parameter "documentId": The
+// client-assigned document ID to use for this document.
+//
+// If not specified, an ID will be assigned by the service.
+func (c *ProjectsDatabasesDocumentsCreateDocumentCall) DocumentId(documentId string) *ProjectsDatabasesDocumentsCreateDocumentCall {
+ c.urlParams_.Set("documentId", documentId)
+ return c
+}
+
+// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The
+// list of field paths in the mask. See Document.fields for a field
+// path syntax reference.
+func (c *ProjectsDatabasesDocumentsCreateDocumentCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsCreateDocumentCall {
+ c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCreateDocumentCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCreateDocumentCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsCreateDocumentCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.document)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "parent": c.parent,
+ "collectionId": c.collectionId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.createDocument" call.
+// Exactly one of *Document or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Document.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.CallOption) (*Document, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Document{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Creates a new document.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{collectionId}",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.createDocument",
+ // "parameterOrder": [
+ // "parent",
+ // "collectionId"
+ // ],
+ // "parameters": {
+ // "collectionId": {
+ // "description": "The collection ID, relative to `parent`, to list. For example: `chatrooms`.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "documentId": {
+ // "description": "The client-assigned document ID to use for this document.\n\nOptional. If not specified, an ID will be assigned by the service.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "mask.fieldPaths": {
+ // "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "parent": {
+ // "description": "The parent resource. For example:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+/documents/.+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+parent}/{collectionId}",
+ // "request": {
+ // "$ref": "Document"
+ // },
+ // "response": {
+ // "$ref": "Document"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.delete":
+
+type ProjectsDatabasesDocumentsDeleteCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes a document.
+func (r *ProjectsDatabasesDocumentsService) Delete(name string) *ProjectsDatabasesDocumentsDeleteCall {
+ c := &ProjectsDatabasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// CurrentDocumentExists sets the optional parameter
+// "currentDocument.exists": When set to `true`, the target document
+// must exist.
+// When set to `false`, the target document must not exist.
+func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsDeleteCall {
+ c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists))
+ return c
+}
+
+// CurrentDocumentUpdateTime sets the optional parameter
+// "currentDocument.updateTime": When set, the target document must
+// exist and have been last updated at
+// that time.
+func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsDeleteCall {
+ c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsDeleteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("DELETE", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.delete" call.
+// Exactly one of *Empty or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Empty.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Empty{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Deletes a document.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}",
+ // "httpMethod": "DELETE",
+ // "id": "firestore.projects.databases.documents.delete",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "currentDocument.exists": {
+ // "description": "When set to `true`, the target document must exist.\nWhen set to `false`, the target document must not exist.",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "currentDocument.updateTime": {
+ // "description": "When set, the target document must exist and have been last updated at\nthat time.",
+ // "format": "google-datetime",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "name": {
+ // "description": "The resource name of the Document to delete. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+name}",
+ // "response": {
+ // "$ref": "Empty"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.get":
+
+type ProjectsDatabasesDocumentsGetCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Gets a single document.
+func (r *ProjectsDatabasesDocumentsService) Get(name string) *ProjectsDatabasesDocumentsGetCall {
+ c := &ProjectsDatabasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The
+// list of field paths in the mask. See Document.fields for a field
+// path syntax reference.
+func (c *ProjectsDatabasesDocumentsGetCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsGetCall {
+ c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
+ return c
+}
+
+// ReadTime sets the optional parameter "readTime": Reads the version of
+// the document at the given time.
+// This may not be older than 60 seconds.
+func (c *ProjectsDatabasesDocumentsGetCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsGetCall {
+ c.urlParams_.Set("readTime", readTime)
+ return c
+}
+
+// Transaction sets the optional parameter "transaction": Reads the
+// document in a transaction.
+func (c *ProjectsDatabasesDocumentsGetCall) Transaction(transaction string) *ProjectsDatabasesDocumentsGetCall {
+ c.urlParams_.Set("transaction", transaction)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsGetCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProjectsDatabasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsGetCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.get" call.
+// Exactly one of *Document or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Document.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*Document, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Document{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets a single document.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}",
+ // "httpMethod": "GET",
+ // "id": "firestore.projects.databases.documents.get",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "mask.fieldPaths": {
+ // "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "name": {
+ // "description": "The resource name of the Document to get. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "readTime": {
+ // "description": "Reads the version of the document at the given time.\nThis may not be older than 60 seconds.",
+ // "format": "google-datetime",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "transaction": {
+ // "description": "Reads the document in a transaction.",
+ // "format": "byte",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+name}",
+ // "response": {
+ // "$ref": "Document"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.list":
+
+type ProjectsDatabasesDocumentsListCall struct {
+ s *Service
+ parent string
+ collectionId string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists documents.
+func (r *ProjectsDatabasesDocumentsService) List(parent string, collectionId string) *ProjectsDatabasesDocumentsListCall {
+ c := &ProjectsDatabasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.parent = parent
+ c.collectionId = collectionId
+ return c
+}
+
+// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The
+// list of field paths in the mask. See Document.fields for a field
+// path syntax reference.
+func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": The order to sort
+// results by. For example: `priority desc, name`.
+func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageSize sets the optional parameter "pageSize": The maximum number
+// of documents to return.
+func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": The
+// `next_page_token` value returned from a previous List request, if
+// any.
+func (c *ProjectsDatabasesDocumentsListCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.Set("pageToken", pageToken)
+ return c
+}
+
+// ReadTime sets the optional parameter "readTime": Reads documents as
+// they were at the given time.
+// This may not be older than 60 seconds.
+func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.Set("readTime", readTime)
+ return c
+}
+
+// ShowMissing sets the optional parameter "showMissing": If the list
+// should show missing documents. A missing document is a
+// document that does not exist but has sub-documents. These documents
+// will
+// be returned with a key but will not have fields,
+// Document.create_time,
+// or Document.update_time set.
+//
+// Requests with `show_missing` may not specify `where` or
+// `order_by`.
+func (c *ProjectsDatabasesDocumentsListCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.Set("showMissing", fmt.Sprint(showMissing))
+ return c
+}
+
+// Transaction sets the optional parameter "transaction": Reads
+// documents in a transaction.
+func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.Set("transaction", transaction)
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// IfNoneMatch sets the optional parameter which makes the operation
+// fail if the object's ETag matches the given value. This is useful for
+// getting updates only after the object has changed since the last
+// request. Use googleapi.IsNotModified to check whether the response
+// error from Do is the result of In-None-Match.
+func (c *ProjectsDatabasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListCall {
+ c.ifNoneMatch_ = entityTag
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsListCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ if c.ifNoneMatch_ != "" {
+ reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
+ }
+ var body io.Reader = nil
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("GET", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "parent": c.parent,
+ "collectionId": c.collectionId,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.list" call.
+// Exactly one of *ListDocumentsResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *ListDocumentsResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ListDocumentsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists documents.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}/{collectionId}",
+ // "httpMethod": "GET",
+ // "id": "firestore.projects.databases.documents.list",
+ // "parameterOrder": [
+ // "parent",
+ // "collectionId"
+ // ],
+ // "parameters": {
+ // "collectionId": {
+ // "description": "The collection ID, relative to `parent`, to list. For example: `chatrooms`\nor `messages`.",
+ // "location": "path",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "mask.fieldPaths": {
+ // "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "orderBy": {
+ // "description": "The order to sort results by. For example: `priority desc, name`.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageSize": {
+ // "description": "The maximum number of documents to return.",
+ // "format": "int32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "pageToken": {
+ // "description": "The `next_page_token` value returned from a previous List request, if any.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "parent": {
+ // "description": "The parent resource name. In the format:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nFor example:\n`projects/my-project/databases/my-database/documents` or\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "readTime": {
+ // "description": "Reads documents as they were at the given time.\nThis may not be older than 60 seconds.",
+ // "format": "google-datetime",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "showMissing": {
+ // "description": "If the list should show missing documents. A missing document is a\ndocument that does not exist but has sub-documents. These documents will\nbe returned with a key but will not have fields, Document.create_time,\nor Document.update_time set.\n\nRequests with `show_missing` may not specify `where` or\n`order_by`.",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "transaction": {
+ // "description": "Reads documents in a transaction.",
+ // "format": "byte",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+parent}/{collectionId}",
+ // "response": {
+ // "$ref": "ListDocumentsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *ProjectsDatabasesDocumentsListCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) error) error {
+ c.ctx_ = ctx
+ defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.PageToken(x.NextPageToken)
+ }
+}
+
+// method id "firestore.projects.databases.documents.listCollectionIds":
+
+type ProjectsDatabasesDocumentsListCollectionIdsCall struct {
+ s *Service
+ parent string
+ listcollectionidsrequest *ListCollectionIdsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// ListCollectionIds: Lists all the collection IDs underneath a
+// document.
+func (r *ProjectsDatabasesDocumentsService) ListCollectionIds(parent string, listcollectionidsrequest *ListCollectionIdsRequest) *ProjectsDatabasesDocumentsListCollectionIdsCall {
+ c := &ProjectsDatabasesDocumentsListCollectionIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.parent = parent
+ c.listcollectionidsrequest = listcollectionidsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCollectionIdsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCollectionIdsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.listcollectionidsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:listCollectionIds")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "parent": c.parent,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.listCollectionIds" call.
+// Exactly one of *ListCollectionIdsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *ListCollectionIdsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.CallOption) (*ListCollectionIdsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ListCollectionIdsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Lists all the collection IDs underneath a document.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:listCollectionIds",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.listCollectionIds",
+ // "parameterOrder": [
+ // "parent"
+ // ],
+ // "parameters": {
+ // "parent": {
+ // "description": "The parent document. In the format:\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nFor example:\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+parent}:listCollectionIds",
+ // "request": {
+ // "$ref": "ListCollectionIdsRequest"
+ // },
+ // "response": {
+ // "$ref": "ListCollectionIdsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// Pages invokes f for each page of results.
+// A non-nil error returned from f will halt the iteration.
+// The provided context supersedes any context provided to the Context method.
+func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Pages(ctx context.Context, f func(*ListCollectionIdsResponse) error) error {
+ c.ctx_ = ctx
+ defer func(pt string) { c.listcollectionidsrequest.PageToken = pt }(c.listcollectionidsrequest.PageToken) // reset paging to original point
+ for {
+ x, err := c.Do()
+ if err != nil {
+ return err
+ }
+ if err := f(x); err != nil {
+ return err
+ }
+ if x.NextPageToken == "" {
+ return nil
+ }
+ c.listcollectionidsrequest.PageToken = x.NextPageToken
+ }
+}
+
+// method id "firestore.projects.databases.documents.listen":
+
+type ProjectsDatabasesDocumentsListenCall struct {
+ s *Service
+ database string
+ listenrequest *ListenRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Listen: Listens to changes.
+func (r *ProjectsDatabasesDocumentsService) Listen(database string, listenrequest *ListenRequest) *ProjectsDatabasesDocumentsListenCall {
+ c := &ProjectsDatabasesDocumentsListenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.database = database
+ c.listenrequest = listenrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsListenCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListenCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsListenCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListenCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsListenCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsListenCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.listenrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:listen")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "database": c.database,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.listen" call.
+// Exactly one of *ListenResponse or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *ListenResponse.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) (*ListenResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &ListenResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Listens to changes.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:listen",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.listen",
+ // "parameterOrder": [
+ // "database"
+ // ],
+ // "parameters": {
+ // "database": {
+ // "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+database}/documents:listen",
+ // "request": {
+ // "$ref": "ListenRequest"
+ // },
+ // "response": {
+ // "$ref": "ListenResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.patch":
+
+type ProjectsDatabasesDocumentsPatchCall struct {
+ s *Service
+ name string
+ document *Document
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Patch: Updates or inserts a document.
+func (r *ProjectsDatabasesDocumentsService) Patch(name string, document *Document) *ProjectsDatabasesDocumentsPatchCall {
+ c := &ProjectsDatabasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.document = document
+ return c
+}
+
+// CurrentDocumentExists sets the optional parameter
+// "currentDocument.exists": When set to `true`, the target document
+// must exist.
+// When set to `false`, the target document must not exist.
+func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsPatchCall {
+ c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists))
+ return c
+}
+
+// CurrentDocumentUpdateTime sets the optional parameter
+// "currentDocument.updateTime": When set, the target document must
+// exist and have been last updated at
+// that time.
+func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsPatchCall {
+ c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime)
+ return c
+}
+
+// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The
+// list of field paths in the mask. See Document.fields for a field
+// path syntax reference.
+func (c *ProjectsDatabasesDocumentsPatchCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall {
+ c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
+ return c
+}
+
+// UpdateMaskFieldPaths sets the optional parameter
+// "updateMask.fieldPaths": The list of field paths in the mask. See
+// Document.fields for a field
+// path syntax reference.
+func (c *ProjectsDatabasesDocumentsPatchCall) UpdateMaskFieldPaths(updateMaskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall {
+ c.urlParams_.SetMulti("updateMask.fieldPaths", append([]string{}, updateMaskFieldPaths...))
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPatchCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.document)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("PATCH", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.patch" call.
+// Exactly one of *Document or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Document.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*Document, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Document{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Updates or inserts a document.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}",
+ // "httpMethod": "PATCH",
+ // "id": "firestore.projects.databases.documents.patch",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "currentDocument.exists": {
+ // "description": "When set to `true`, the target document must exist.\nWhen set to `false`, the target document must not exist.",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "currentDocument.updateTime": {
+ // "description": "When set, the target document must exist and have been last updated at\nthat time.",
+ // "format": "google-datetime",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "mask.fieldPaths": {
+ // "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "name": {
+ // "description": "The resource name of the document, for example\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "updateMask.fieldPaths": {
+ // "description": "The list of field paths in the mask. See Document.fields for a field\npath syntax reference.",
+ // "location": "query",
+ // "repeated": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+name}",
+ // "request": {
+ // "$ref": "Document"
+ // },
+ // "response": {
+ // "$ref": "Document"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.rollback":
+
+type ProjectsDatabasesDocumentsRollbackCall struct {
+ s *Service
+ database string
+ rollbackrequest *RollbackRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Rollback: Rolls back a transaction.
+func (r *ProjectsDatabasesDocumentsService) Rollback(database string, rollbackrequest *RollbackRequest) *ProjectsDatabasesDocumentsRollbackCall {
+ c := &ProjectsDatabasesDocumentsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.database = database
+ c.rollbackrequest = rollbackrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsRollbackCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRollbackCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsRollbackCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRollbackCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsRollbackCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsRollbackCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:rollback")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "database": c.database,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.rollback" call.
+// Exactly one of *Empty or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Empty.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Empty{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Rolls back a transaction.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:rollback",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.rollback",
+ // "parameterOrder": [
+ // "database"
+ // ],
+ // "parameters": {
+ // "database": {
+ // "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+database}/documents:rollback",
+ // "request": {
+ // "$ref": "RollbackRequest"
+ // },
+ // "response": {
+ // "$ref": "Empty"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.runQuery":
+
+type ProjectsDatabasesDocumentsRunQueryCall struct {
+ s *Service
+ parent string
+ runqueryrequest *RunQueryRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// RunQuery: Runs a query.
+func (r *ProjectsDatabasesDocumentsService) RunQuery(parent string, runqueryrequest *RunQueryRequest) *ProjectsDatabasesDocumentsRunQueryCall {
+ c := &ProjectsDatabasesDocumentsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.parent = parent
+ c.runqueryrequest = runqueryrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunQueryCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsRunQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsRunQueryCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsRunQueryCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runQuery")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "parent": c.parent,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.runQuery" call.
+// Exactly one of *RunQueryResponse or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *RunQueryResponse.ServerResponse.Header or (if a response was
+// returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &RunQueryResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Runs a query.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runQuery",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.runQuery",
+ // "parameterOrder": [
+ // "parent"
+ // ],
+ // "parameters": {
+ // "parent": {
+ // "description": "The parent resource name. In the format:\n`projects/{project_id}/databases/{database_id}/documents` or\n`projects/{project_id}/databases/{database_id}/documents/{document_path}`.\nFor example:\n`projects/my-project/databases/my-database/documents` or\n`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+parent}:runQuery",
+ // "request": {
+ // "$ref": "RunQueryRequest"
+ // },
+ // "response": {
+ // "$ref": "RunQueryResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
+// method id "firestore.projects.databases.documents.write":
+
+type ProjectsDatabasesDocumentsWriteCall struct {
+ s *Service
+ database string
+ writerequest *WriteRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Write: Streams batches of document updates and deletes, in order.
+func (r *ProjectsDatabasesDocumentsService) Write(database string, writerequest *WriteRequest) *ProjectsDatabasesDocumentsWriteCall {
+ c := &ProjectsDatabasesDocumentsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.database = database
+ c.writerequest = writerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsDatabasesDocumentsWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsWriteCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsDatabasesDocumentsWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsWriteCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsDatabasesDocumentsWriteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsDatabasesDocumentsWriteCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.writerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:write")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "database": c.database,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "firestore.projects.databases.documents.write" call.
+// Exactly one of *WriteResponse or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *WriteResponse.ServerResponse.Header or (if a response was returned
+// at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) (*WriteResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &WriteResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Streams batches of document updates and deletes, in order.",
+ // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:write",
+ // "httpMethod": "POST",
+ // "id": "firestore.projects.databases.documents.write",
+ // "parameterOrder": [
+ // "database"
+ // ],
+ // "parameters": {
+ // "database": {
+ // "description": "The database name. In the format:\n`projects/{project_id}/databases/{database_id}`.\nThis is only required in the first message.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/databases/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+database}/documents:write",
+ // "request": {
+ // "$ref": "WriteRequest"
+ // },
+ // "response": {
+ // "$ref": "WriteResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/datastore"
+ // ]
+ // }
+
+}
+
// method id "firestore.projects.databases.operations.cancel":
type ProjectsDatabasesOperationsCancelCall struct {
diff --git a/gmail/v1/gmail-api.json b/gmail/v1/gmail-api.json
index 048e7c6..06bd418 100644
--- a/gmail/v1/gmail-api.json
+++ b/gmail/v1/gmail-api.json
@@ -41,7 +41,7 @@
"description": "Access Gmail mailboxes including sending user email.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/gmail/api/",
- "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/x4D3RSeprBTpZ7qUUZRnzZsdMkA\"",
+ "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/SsO65dTSi1aclXM9UeYU18wFhYg\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/googlemail-16.png",
"x32": "https://www.google.com/images/icons/product/googlemail-32.png"
@@ -2502,7 +2502,7 @@
}
}
},
- "revision": "20180904",
+ "revision": "20181202",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AutoForwarding": {
@@ -2579,7 +2579,7 @@
"type": "object"
},
"Delegate": {
- "description": "Settings for a delegate. Delegates can read, send, and delete messages, as well as manage contacts, for the delegator's account. See \"Set up mail delegation\" for more information about delegates.",
+ "description": "Settings for a delegate. Delegates can read, send, and delete messages, as well as view and add contacts, for the delegator's account. See \"Set up mail delegation\" for more information about delegates.",
"id": "Delegate",
"properties": {
"delegateEmail": {
diff --git a/gmail/v1/gmail-gen.go b/gmail/v1/gmail-gen.go
index 7217d65..8321aec 100644
--- a/gmail/v1/gmail-gen.go
+++ b/gmail/v1/gmail-gen.go
@@ -373,9 +373,9 @@
}
// Delegate: Settings for a delegate. Delegates can read, send, and
-// delete messages, as well as manage contacts, for the delegator's
-// account. See "Set up mail delegation" for more information about
-// delegates.
+// delete messages, as well as view and add contacts, for the
+// delegator's account. See "Set up mail delegation" for more
+// information about delegates.
type Delegate struct {
// DelegateEmail: The email address of the delegate.
DelegateEmail string `json:"delegateEmail,omitempty"`
diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json
new file mode 100644
index 0000000..935af45
--- /dev/null
+++ b/iap/v1/iap-api.json
@@ -0,0 +1,770 @@
+{
+ "auth": {
+ "oauth2": {
+ "scopes": {
+ "https://www.googleapis.com/auth/cloud-platform": {
+ "description": "View and manage your data across Google Cloud Platform services"
+ }
+ }
+ }
+ },
+ "basePath": "",
+ "baseUrl": "https://iap.googleapis.com/",
+ "batchPath": "batch",
+ "canonicalName": "Cloud IAP",
+ "description": "Controls access to cloud applications running on Google Cloud Platform.",
+ "discoveryVersion": "v1",
+ "documentationLink": "https://cloud.google.com/iap",
+ "fullyEncodeReservedExpansion": true,
+ "icons": {
+ "x16": "http://www.google.com/images/icons/product/search-16.gif",
+ "x32": "http://www.google.com/images/icons/product/search-32.gif"
+ },
+ "id": "iap:v1",
+ "kind": "discovery#restDescription",
+ "name": "iap",
+ "ownerDomain": "google.com",
+ "ownerName": "Google",
+ "parameters": {
+ "$.xgafv": {
+ "description": "V1 error format.",
+ "enum": [
+ "1",
+ "2"
+ ],
+ "enumDescriptions": [
+ "v1 error format",
+ "v2 error format"
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "access_token": {
+ "description": "OAuth access token.",
+ "location": "query",
+ "type": "string"
+ },
+ "alt": {
+ "default": "json",
+ "description": "Data format for response.",
+ "enum": [
+ "json",
+ "media",
+ "proto"
+ ],
+ "enumDescriptions": [
+ "Responses with Content-Type of application/json",
+ "Media download with context-dependent Content-Type",
+ "Responses with Content-Type of application/x-protobuf"
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "callback": {
+ "description": "JSONP",
+ "location": "query",
+ "type": "string"
+ },
+ "fields": {
+ "description": "Selector specifying which fields to include in a partial response.",
+ "location": "query",
+ "type": "string"
+ },
+ "key": {
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
+ "location": "query",
+ "type": "string"
+ },
+ "oauth_token": {
+ "description": "OAuth 2.0 token for the current user.",
+ "location": "query",
+ "type": "string"
+ },
+ "prettyPrint": {
+ "default": "true",
+ "description": "Returns response with indentations and line breaks.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "quotaUser": {
+ "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
+ "location": "query",
+ "type": "string"
+ },
+ "uploadType": {
+ "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
+ "location": "query",
+ "type": "string"
+ },
+ "upload_protocol": {
+ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "protocol": "rest",
+ "resources": {
+ "projects": {
+ "resources": {
+ "iap_tunnel": {
+ "methods": {
+ "getIamPolicy": {
+ "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel:getIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.getIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "request": {
+ "$ref": "GetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.setIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.testIamPermissions",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ },
+ "resources": {
+ "zones": {
+ "methods": {
+ "getIamPolicy": {
+ "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}:getIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.zones.getIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "request": {
+ "$ref": "GetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.zones.setIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.zones.testIamPermissions",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ },
+ "resources": {
+ "instances": {
+ "methods": {
+ "getIamPolicy": {
+ "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}/instances/{instancesId}:getIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.zones.instances.getIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+/instances/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "request": {
+ "$ref": "GetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}/instances/{instancesId}:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.zones.instances.setIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+/instances/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}/instances/{instancesId}:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_tunnel.zones.instances.testIamPermissions",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+/instances/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "iap_web": {
+ "methods": {
+ "getIamPolicy": {
+ "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}:getIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.getIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "request": {
+ "$ref": "GetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.setIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.testIamPermissions",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ },
+ "resources": {
+ "services": {
+ "methods": {
+ "getIamPolicy": {
+ "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}:getIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.services.getIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "request": {
+ "$ref": "GetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.services.setIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.services.testIamPermissions",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ },
+ "resources": {
+ "versions": {
+ "methods": {
+ "getIamPolicy": {
+ "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}/versions/{versionsId}:getIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.services.versions.getIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "request": {
+ "$ref": "GetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}/versions/{versionsId}:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.services.versions.setIamPolicy",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}/versions/{versionsId}:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "iap.projects.iap_web.services.versions.testIamPermissions",
+ "parameterOrder": [
+ "resource"
+ ],
+ "parameters": {
+ "resource": {
+ "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "revision": "20181205",
+ "rootUrl": "https://iap.googleapis.com/",
+ "schemas": {
+ "Binding": {
+ "description": "Associates `members` with a `role`.",
+ "id": "Binding",
+ "properties": {
+ "condition": {
+ "$ref": "Expr",
+ "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently."
+ },
+ "members": {
+ "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "role": {
+ "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Expr": {
+ "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"",
+ "id": "Expr",
+ "properties": {
+ "description": {
+ "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.",
+ "type": "string"
+ },
+ "expression": {
+ "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.",
+ "type": "string"
+ },
+ "location": {
+ "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.",
+ "type": "string"
+ },
+ "title": {
+ "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GetIamPolicyRequest": {
+ "description": "Request message for `GetIamPolicy` method.",
+ "id": "GetIamPolicyRequest",
+ "properties": {},
+ "type": "object"
+ },
+ "Policy": {
+ "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**JSON Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\n**YAML Example**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-other-app@appspot.gserviceaccount.com\n role: roles/owner\n - members:\n - user:sean@example.com\n role: roles/viewer\n\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam/docs).",
+ "id": "Policy",
+ "properties": {
+ "bindings": {
+ "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.",
+ "items": {
+ "$ref": "Binding"
+ },
+ "type": "array"
+ },
+ "etag": {
+ "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.",
+ "format": "byte",
+ "type": "string"
+ },
+ "version": {
+ "description": "Deprecated.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "SetIamPolicyRequest": {
+ "description": "Request message for `SetIamPolicy` method.",
+ "id": "SetIamPolicyRequest",
+ "properties": {
+ "policy": {
+ "$ref": "Policy",
+ "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them."
+ }
+ },
+ "type": "object"
+ },
+ "TestIamPermissionsRequest": {
+ "description": "Request message for `TestIamPermissions` method.",
+ "id": "TestIamPermissionsRequest",
+ "properties": {
+ "permissions": {
+ "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "TestIamPermissionsResponse": {
+ "description": "Response message for `TestIamPermissions` method.",
+ "id": "TestIamPermissionsResponse",
+ "properties": {
+ "permissions": {
+ "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "servicePath": "",
+ "title": "Cloud Identity-Aware Proxy API",
+ "version": "v1",
+ "version_module": true
+}
\ No newline at end of file
diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go
new file mode 100644
index 0000000..af65473
--- /dev/null
+++ b/iap/v1/iap-gen.go
@@ -0,0 +1,3111 @@
+// Copyright 2018 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Code generated file. DO NOT EDIT.
+
+// Package iap provides access to the Cloud Identity-Aware Proxy API.
+//
+// See https://cloud.google.com/iap
+//
+// Usage example:
+//
+// import "google.golang.org/api/iap/v1"
+// ...
+// iapService, err := iap.New(oauthHttpClient)
+package iap // import "google.golang.org/api/iap/v1"
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+
+ gensupport "google.golang.org/api/gensupport"
+ googleapi "google.golang.org/api/googleapi"
+)
+
+// Always reference these packages, just in case the auto-generated code
+// below doesn't.
+var _ = bytes.NewBuffer
+var _ = strconv.Itoa
+var _ = fmt.Sprintf
+var _ = json.NewDecoder
+var _ = io.Copy
+var _ = url.Parse
+var _ = gensupport.MarshalJSON
+var _ = googleapi.Version
+var _ = errors.New
+var _ = strings.Replace
+var _ = context.Canceled
+
+const apiId = "iap:v1"
+const apiName = "iap"
+const apiVersion = "v1"
+const basePath = "https://iap.googleapis.com/"
+
+// OAuth2 scopes used by this API.
+const (
+ // View and manage your data across Google Cloud Platform services
+ CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
+)
+
+func New(client *http.Client) (*Service, error) {
+ if client == nil {
+ return nil, errors.New("client is nil")
+ }
+ s := &Service{client: client, BasePath: basePath}
+ s.Projects = NewProjectsService(s)
+ return s, nil
+}
+
+type Service struct {
+ client *http.Client
+ BasePath string // API endpoint base URL
+ UserAgent string // optional additional User-Agent fragment
+
+ Projects *ProjectsService
+}
+
+func (s *Service) userAgent() string {
+ if s.UserAgent == "" {
+ return googleapi.UserAgent
+ }
+ return googleapi.UserAgent + " " + s.UserAgent
+}
+
+func NewProjectsService(s *Service) *ProjectsService {
+ rs := &ProjectsService{s: s}
+ rs.IapTunnel = NewProjectsIapTunnelService(s)
+ rs.IapWeb = NewProjectsIapWebService(s)
+ return rs
+}
+
+type ProjectsService struct {
+ s *Service
+
+ IapTunnel *ProjectsIapTunnelService
+
+ IapWeb *ProjectsIapWebService
+}
+
+func NewProjectsIapTunnelService(s *Service) *ProjectsIapTunnelService {
+ rs := &ProjectsIapTunnelService{s: s}
+ rs.Zones = NewProjectsIapTunnelZonesService(s)
+ return rs
+}
+
+type ProjectsIapTunnelService struct {
+ s *Service
+
+ Zones *ProjectsIapTunnelZonesService
+}
+
+func NewProjectsIapTunnelZonesService(s *Service) *ProjectsIapTunnelZonesService {
+ rs := &ProjectsIapTunnelZonesService{s: s}
+ rs.Instances = NewProjectsIapTunnelZonesInstancesService(s)
+ return rs
+}
+
+type ProjectsIapTunnelZonesService struct {
+ s *Service
+
+ Instances *ProjectsIapTunnelZonesInstancesService
+}
+
+func NewProjectsIapTunnelZonesInstancesService(s *Service) *ProjectsIapTunnelZonesInstancesService {
+ rs := &ProjectsIapTunnelZonesInstancesService{s: s}
+ return rs
+}
+
+type ProjectsIapTunnelZonesInstancesService struct {
+ s *Service
+}
+
+func NewProjectsIapWebService(s *Service) *ProjectsIapWebService {
+ rs := &ProjectsIapWebService{s: s}
+ rs.Services = NewProjectsIapWebServicesService(s)
+ return rs
+}
+
+type ProjectsIapWebService struct {
+ s *Service
+
+ Services *ProjectsIapWebServicesService
+}
+
+func NewProjectsIapWebServicesService(s *Service) *ProjectsIapWebServicesService {
+ rs := &ProjectsIapWebServicesService{s: s}
+ rs.Versions = NewProjectsIapWebServicesVersionsService(s)
+ return rs
+}
+
+type ProjectsIapWebServicesService struct {
+ s *Service
+
+ Versions *ProjectsIapWebServicesVersionsService
+}
+
+func NewProjectsIapWebServicesVersionsService(s *Service) *ProjectsIapWebServicesVersionsService {
+ rs := &ProjectsIapWebServicesVersionsService{s: s}
+ return rs
+}
+
+type ProjectsIapWebServicesVersionsService struct {
+ s *Service
+}
+
+// Binding: Associates `members` with a `role`.
+type Binding struct {
+ // Condition: Unimplemented. The condition that is associated with this
+ // binding.
+ // NOTE: an unsatisfied condition will not allow user access via
+ // current
+ // binding. Different bindings, including their conditions, are
+ // examined
+ // independently.
+ Condition *Expr `json:"condition,omitempty"`
+
+ // Members: Specifies the identities requesting access for a Cloud
+ // Platform resource.
+ // `members` can have the following values:
+ //
+ // * `allUsers`: A special identifier that represents anyone who is
+ // on the internet; with or without a Google account.
+ //
+ // * `allAuthenticatedUsers`: A special identifier that represents
+ // anyone
+ // who is authenticated with a Google account or a service
+ // account.
+ //
+ // * `user:{emailid}`: An email address that represents a specific
+ // Google
+ // account. For example, `alice@gmail.com` .
+ //
+ //
+ // * `serviceAccount:{emailid}`: An email address that represents a
+ // service
+ // account. For example,
+ // `my-other-app@appspot.gserviceaccount.com`.
+ //
+ // * `group:{emailid}`: An email address that represents a Google
+ // group.
+ // For example, `admins@example.com`.
+ //
+ //
+ // * `domain:{domain}`: A Google Apps domain name that represents all
+ // the
+ // users of that domain. For example, `google.com` or
+ // `example.com`.
+ //
+ //
+ Members []string `json:"members,omitempty"`
+
+ // Role: Role that is assigned to `members`.
+ // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
+ Role string `json:"role,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Condition") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Condition") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Binding) MarshalJSON() ([]byte, error) {
+ type NoMethod Binding
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// Expr: Represents an expression text. Example:
+//
+// title: "User account presence"
+// description: "Determines whether the request has a user account"
+// expression: "size(request.user) > 0"
+type Expr struct {
+ // Description: An optional description of the expression. This is a
+ // longer text which
+ // describes the expression, e.g. when hovered over it in a UI.
+ Description string `json:"description,omitempty"`
+
+ // Expression: Textual representation of an expression in
+ // Common Expression Language syntax.
+ //
+ // The application context of the containing message determines
+ // which
+ // well-known feature set of CEL is supported.
+ Expression string `json:"expression,omitempty"`
+
+ // Location: An optional string indicating the location of the
+ // expression for error
+ // reporting, e.g. a file name and a position in the file.
+ Location string `json:"location,omitempty"`
+
+ // Title: An optional title for the expression, i.e. a short string
+ // describing
+ // its purpose. This can be used e.g. in UIs which allow to enter
+ // the
+ // expression.
+ Title string `json:"title,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Description") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Description") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Expr) MarshalJSON() ([]byte, error) {
+ type NoMethod Expr
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// GetIamPolicyRequest: Request message for `GetIamPolicy` method.
+type GetIamPolicyRequest struct {
+}
+
+// Policy: Defines an Identity and Access Management (IAM) policy. It is
+// used to
+// specify access control policies for Cloud Platform resources.
+//
+//
+// A `Policy` consists of a list of `bindings`. A `binding` binds a list
+// of
+// `members` to a `role`, where the members can be user accounts, Google
+// groups,
+// Google domains, and service accounts. A `role` is a named list of
+// permissions
+// defined by IAM.
+//
+// **JSON Example**
+//
+// {
+// "bindings": [
+// {
+// "role": "roles/owner",
+// "members": [
+// "user:mike@example.com",
+// "group:admins@example.com",
+// "domain:google.com",
+//
+// "serviceAccount:my-other-app@appspot.gserviceaccount.com"
+// ]
+// },
+// {
+// "role": "roles/viewer",
+// "members": ["user:sean@example.com"]
+// }
+// ]
+// }
+//
+// **YAML Example**
+//
+// bindings:
+// - members:
+// - user:mike@example.com
+// - group:admins@example.com
+// - domain:google.com
+// - serviceAccount:my-other-app@appspot.gserviceaccount.com
+// role: roles/owner
+// - members:
+// - user:sean@example.com
+// role: roles/viewer
+//
+//
+// For a description of IAM and its features, see the
+// [IAM developer's guide](https://cloud.google.com/iam/docs).
+type Policy struct {
+ // Bindings: Associates a list of `members` to a `role`.
+ // `bindings` with no members will result in an error.
+ Bindings []*Binding `json:"bindings,omitempty"`
+
+ // Etag: `etag` is used for optimistic concurrency control as a way to
+ // help
+ // prevent simultaneous updates of a policy from overwriting each
+ // other.
+ // It is strongly suggested that systems make use of the `etag` in
+ // the
+ // read-modify-write cycle to perform policy updates in order to avoid
+ // race
+ // conditions: An `etag` is returned in the response to `getIamPolicy`,
+ // and
+ // systems are expected to put that etag in the request to
+ // `setIamPolicy` to
+ // ensure that their change will be applied to the same version of the
+ // policy.
+ //
+ // If no `etag` is provided in the call to `setIamPolicy`, then the
+ // existing
+ // policy is overwritten blindly.
+ Etag string `json:"etag,omitempty"`
+
+ // Version: Deprecated.
+ Version int64 `json:"version,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Bindings") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Bindings") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Policy) MarshalJSON() ([]byte, error) {
+ type NoMethod Policy
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// SetIamPolicyRequest: Request message for `SetIamPolicy` method.
+type SetIamPolicyRequest struct {
+ // Policy: REQUIRED: The complete policy to be applied to the
+ // `resource`. The size of
+ // the policy is limited to a few 10s of KB. An empty policy is a
+ // valid policy but certain Cloud Platform services (such as
+ // Projects)
+ // might reject them.
+ Policy *Policy `json:"policy,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Policy") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Policy") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod SetIamPolicyRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// TestIamPermissionsRequest: Request message for `TestIamPermissions`
+// method.
+type TestIamPermissionsRequest struct {
+ // Permissions: The set of permissions to check for the `resource`.
+ // Permissions with
+ // wildcards (such as '*' or 'storage.*') are not allowed. For
+ // more
+ // information see
+ // [IAM
+ // Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ Permissions []string `json:"permissions,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Permissions") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Permissions") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod TestIamPermissionsRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// TestIamPermissionsResponse: Response message for `TestIamPermissions`
+// method.
+type TestIamPermissionsResponse struct {
+ // Permissions: A subset of `TestPermissionsRequest.permissions` that
+ // the caller is
+ // allowed.
+ Permissions []string `json:"permissions,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Permissions") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Permissions") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod TestIamPermissionsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// method id "iap.projects.iap_tunnel.getIamPolicy":
+
+type ProjectsIapTunnelGetIamPolicyCall struct {
+ s *Service
+ resource string
+ getiampolicyrequest *GetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for an Identity-Aware
+// Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsIapTunnelGetIamPolicyCall {
+ c := &ProjectsIapTunnelGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.getiampolicyrequest = getiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelGetIamPolicyCall) Context(ctx context.Context) *ProjectsIapTunnelGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapTunnelGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel:getIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.getIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "request": {
+ // "$ref": "GetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.setIamPolicy":
+
+type ProjectsIapTunnelSetIamPolicyCall struct {
+ s *Service
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy for an Identity-Aware
+// Proxy protected
+// resource. Replaces any existing policy.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsIapTunnelSetIamPolicyCall {
+ c := &ProjectsIapTunnelSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.setiampolicyrequest = setiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelSetIamPolicyCall) Context(ctx context.Context) *ProjectsIapTunnelSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapTunnelSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.setIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.testIamPermissions":
+
+type ProjectsIapTunnelTestIamPermissionsCall struct {
+ s *Service
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// Identity-Aware Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsIapTunnelTestIamPermissionsCall {
+ c := &ProjectsIapTunnelTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.testiampermissionsrequest = testiampermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelTestIamPermissionsCall) Context(ctx context.Context) *ProjectsIapTunnelTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.testIamPermissions" call.
+// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsIapTunnelTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestIamPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.testIamPermissions",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.zones.getIamPolicy":
+
+type ProjectsIapTunnelZonesGetIamPolicyCall struct {
+ s *Service
+ resource string
+ getiampolicyrequest *GetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for an Identity-Aware
+// Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelZonesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsIapTunnelZonesGetIamPolicyCall {
+ c := &ProjectsIapTunnelZonesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.getiampolicyrequest = getiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelZonesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelZonesGetIamPolicyCall) Context(ctx context.Context) *ProjectsIapTunnelZonesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelZonesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.zones.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapTunnelZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}:getIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.zones.getIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "request": {
+ // "$ref": "GetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.zones.setIamPolicy":
+
+type ProjectsIapTunnelZonesSetIamPolicyCall struct {
+ s *Service
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy for an Identity-Aware
+// Proxy protected
+// resource. Replaces any existing policy.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelZonesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsIapTunnelZonesSetIamPolicyCall {
+ c := &ProjectsIapTunnelZonesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.setiampolicyrequest = setiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelZonesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelZonesSetIamPolicyCall) Context(ctx context.Context) *ProjectsIapTunnelZonesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelZonesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.zones.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapTunnelZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.zones.setIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.zones.testIamPermissions":
+
+type ProjectsIapTunnelZonesTestIamPermissionsCall struct {
+ s *Service
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// Identity-Aware Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelZonesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsIapTunnelZonesTestIamPermissionsCall {
+ c := &ProjectsIapTunnelZonesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.testiampermissionsrequest = testiampermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelZonesTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelZonesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsIapTunnelZonesTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelZonesTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.zones.testIamPermissions" call.
+// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsIapTunnelZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestIamPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.zones.testIamPermissions",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.zones.instances.getIamPolicy":
+
+type ProjectsIapTunnelZonesInstancesGetIamPolicyCall struct {
+ s *Service
+ resource string
+ getiampolicyrequest *GetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for an Identity-Aware
+// Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelZonesInstancesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsIapTunnelZonesInstancesGetIamPolicyCall {
+ c := &ProjectsIapTunnelZonesInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.getiampolicyrequest = getiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelZonesInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelZonesInstancesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelZonesInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsIapTunnelZonesInstancesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelZonesInstancesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelZonesInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.zones.instances.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapTunnelZonesInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}/instances/{instancesId}:getIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.zones.instances.getIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+/instances/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "request": {
+ // "$ref": "GetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.zones.instances.setIamPolicy":
+
+type ProjectsIapTunnelZonesInstancesSetIamPolicyCall struct {
+ s *Service
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy for an Identity-Aware
+// Proxy protected
+// resource. Replaces any existing policy.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelZonesInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsIapTunnelZonesInstancesSetIamPolicyCall {
+ c := &ProjectsIapTunnelZonesInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.setiampolicyrequest = setiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelZonesInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelZonesInstancesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelZonesInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsIapTunnelZonesInstancesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelZonesInstancesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelZonesInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.zones.instances.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapTunnelZonesInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}/instances/{instancesId}:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.zones.instances.setIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+/instances/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_tunnel.zones.instances.testIamPermissions":
+
+type ProjectsIapTunnelZonesInstancesTestIamPermissionsCall struct {
+ s *Service
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// Identity-Aware Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapTunnelZonesInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall {
+ c := &ProjectsIapTunnelZonesInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.testiampermissionsrequest = testiampermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_tunnel.zones.instances.testIamPermissions" call.
+// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsIapTunnelZonesInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestIamPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_tunnel/zones/{zonesId}/instances/{instancesId}:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_tunnel.zones.instances.testIamPermissions",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_tunnel/zones/[^/]+/instances/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.getIamPolicy":
+
+type ProjectsIapWebGetIamPolicyCall struct {
+ s *Service
+ resource string
+ getiampolicyrequest *GetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for an Identity-Aware
+// Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsIapWebGetIamPolicyCall {
+ c := &ProjectsIapWebGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.getiampolicyrequest = getiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapWebGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebGetIamPolicyCall) Context(ctx context.Context) *ProjectsIapWebGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapWebGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}:getIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.getIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "request": {
+ // "$ref": "GetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.setIamPolicy":
+
+type ProjectsIapWebSetIamPolicyCall struct {
+ s *Service
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy for an Identity-Aware
+// Proxy protected
+// resource. Replaces any existing policy.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsIapWebSetIamPolicyCall {
+ c := &ProjectsIapWebSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.setiampolicyrequest = setiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapWebSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebSetIamPolicyCall) Context(ctx context.Context) *ProjectsIapWebSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapWebSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.setIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.testIamPermissions":
+
+type ProjectsIapWebTestIamPermissionsCall struct {
+ s *Service
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// Identity-Aware Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsIapWebTestIamPermissionsCall {
+ c := &ProjectsIapWebTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.testiampermissionsrequest = testiampermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsIapWebTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebTestIamPermissionsCall) Context(ctx context.Context) *ProjectsIapWebTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.testIamPermissions" call.
+// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsIapWebTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestIamPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.testIamPermissions",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.services.getIamPolicy":
+
+type ProjectsIapWebServicesGetIamPolicyCall struct {
+ s *Service
+ resource string
+ getiampolicyrequest *GetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for an Identity-Aware
+// Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebServicesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsIapWebServicesGetIamPolicyCall {
+ c := &ProjectsIapWebServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.getiampolicyrequest = getiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapWebServicesGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsIapWebServicesGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebServicesGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.services.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapWebServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}:getIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.services.getIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "request": {
+ // "$ref": "GetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.services.setIamPolicy":
+
+type ProjectsIapWebServicesSetIamPolicyCall struct {
+ s *Service
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy for an Identity-Aware
+// Proxy protected
+// resource. Replaces any existing policy.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsIapWebServicesSetIamPolicyCall {
+ c := &ProjectsIapWebServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.setiampolicyrequest = setiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapWebServicesSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsIapWebServicesSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebServicesSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.services.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapWebServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.services.setIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.services.testIamPermissions":
+
+type ProjectsIapWebServicesTestIamPermissionsCall struct {
+ s *Service
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// Identity-Aware Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsIapWebServicesTestIamPermissionsCall {
+ c := &ProjectsIapWebServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.testiampermissionsrequest = testiampermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsIapWebServicesTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsIapWebServicesTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebServicesTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.services.testIamPermissions" call.
+// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsIapWebServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestIamPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.services.testIamPermissions",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.services.versions.getIamPolicy":
+
+type ProjectsIapWebServicesVersionsGetIamPolicyCall struct {
+ s *Service
+ resource string
+ getiampolicyrequest *GetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for an Identity-Aware
+// Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebServicesVersionsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsIapWebServicesVersionsGetIamPolicyCall {
+ c := &ProjectsIapWebServicesVersionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.getiampolicyrequest = getiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebServicesVersionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapWebServicesVersionsGetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebServicesVersionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsIapWebServicesVersionsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebServicesVersionsGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebServicesVersionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.services.versions.getIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapWebServicesVersionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Gets the access control policy for an Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}/versions/{versionsId}:getIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.services.versions.getIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "request": {
+ // "$ref": "GetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.services.versions.setIamPolicy":
+
+type ProjectsIapWebServicesVersionsSetIamPolicyCall struct {
+ s *Service
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy for an Identity-Aware
+// Proxy protected
+// resource. Replaces any existing policy.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebServicesVersionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsIapWebServicesVersionsSetIamPolicyCall {
+ c := &ProjectsIapWebServicesVersionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.setiampolicyrequest = setiampolicyrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebServicesVersionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsIapWebServicesVersionsSetIamPolicyCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebServicesVersionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsIapWebServicesVersionsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebServicesVersionsSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebServicesVersionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.services.versions.setIamPolicy" call.
+// Exactly one of *Policy or error will be non-nil. Any non-2xx status
+// code is an error. Response headers are in either
+// *Policy.ServerResponse.Header or (if a response was returned at all)
+// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
+// check whether the returned error was because http.StatusNotModified
+// was returned.
+func (c *ProjectsIapWebServicesVersionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Policy{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Sets the access control policy for an Identity-Aware Proxy protected\nresource. Replaces any existing policy.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}/versions/{versionsId}:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.services.versions.setIamPolicy",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "iap.projects.iap_web.services.versions.testIamPermissions":
+
+type ProjectsIapWebServicesVersionsTestIamPermissionsCall struct {
+ s *Service
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Returns permissions that a caller has on the
+// Identity-Aware Proxy protected
+// resource.
+// More information about managing access via IAP can be found
+// at:
+// https://cloud.google.com/iap/docs/managing-access#managing_access_
+// via_the_api
+func (r *ProjectsIapWebServicesVersionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsIapWebServicesVersionsTestIamPermissionsCall {
+ c := &ProjectsIapWebServicesVersionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.resource = resource
+ c.testiampermissionsrequest = testiampermissionsrequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ProjectsIapWebServicesVersionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsIapWebServicesVersionsTestIamPermissionsCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ProjectsIapWebServicesVersionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsIapWebServicesVersionsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ProjectsIapWebServicesVersionsTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsIapWebServicesVersionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "resource": c.resource,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "iap.projects.iap_web.services.versions.testIamPermissions" call.
+// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
+// was returned at all) in error.(*googleapi.Error).Header. Use
+// googleapi.IsNotModified to check whether the returned error was
+// because http.StatusNotModified was returned.
+func (c *ProjectsIapWebServicesVersionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &TestIamPermissionsResponse{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Returns permissions that a caller has on the Identity-Aware Proxy protected\nresource.\nMore information about managing access via IAP can be found at:\nhttps://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api",
+ // "flatPath": "v1/projects/{projectsId}/iap_web/{iap_webId}/services/{servicesId}/versions/{versionsId}:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "iap.projects.iap_web.services.versions.testIamPermissions",
+ // "parameterOrder": [
+ // "resource"
+ // ],
+ // "parameters": {
+ // "resource": {
+ // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/iap_web/[^/]+/services/[^/]+/versions/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
diff --git a/iap/v1beta1/iap-api.json b/iap/v1beta1/iap-api.json
index f30bf23..e097a06 100644
--- a/iap/v1beta1/iap-api.json
+++ b/iap/v1beta1/iap-api.json
@@ -645,57 +645,9 @@
}
}
},
- "revision": "20180919",
+ "revision": "20181205",
"rootUrl": "https://iap.googleapis.com/",
"schemas": {
- "AuditConfig": {
- "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.",
- "id": "AuditConfig",
- "properties": {
- "auditLogConfigs": {
- "description": "The configuration for logging of each type of permission.",
- "items": {
- "$ref": "AuditLogConfig"
- },
- "type": "array"
- },
- "service": {
- "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "AuditLogConfig": {
- "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.",
- "id": "AuditLogConfig",
- "properties": {
- "exemptedMembers": {
- "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "logType": {
- "description": "The log type that this config enables.",
- "enum": [
- "LOG_TYPE_UNSPECIFIED",
- "ADMIN_READ",
- "DATA_WRITE",
- "DATA_READ"
- ],
- "enumDescriptions": [
- "Default case. Should never be this.",
- "Admin reads. Example: CloudIAM getIamPolicy",
- "Data writes. Example: CloudSQL Users create",
- "Data reads. Example: CloudSQL Users list"
- ],
- "type": "string"
- }
- },
- "type": "object"
- },
"Binding": {
"description": "Associates `members` with a `role`.",
"id": "Binding",
@@ -751,13 +703,6 @@
"description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**JSON Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\n**YAML Example**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-other-app@appspot.gserviceaccount.com\n role: roles/owner\n - members:\n - user:sean@example.com\n role: roles/viewer\n\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam/docs).",
"id": "Policy",
"properties": {
- "auditConfigs": {
- "description": "Specifies cloud audit logging configuration for this policy.",
- "items": {
- "$ref": "AuditConfig"
- },
- "type": "array"
- },
"bindings": {
"description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.",
"items": {
@@ -785,11 +730,6 @@
"policy": {
"$ref": "Policy",
"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them."
- },
- "updateMask": {
- "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.",
- "format": "google-fieldmask",
- "type": "string"
}
},
"type": "object"
diff --git a/iap/v1beta1/iap-gen.go b/iap/v1beta1/iap-gen.go
index 4999685..b5f92f5 100644
--- a/iap/v1beta1/iap-gen.go
+++ b/iap/v1beta1/iap-gen.go
@@ -161,160 +161,6 @@
s *Service
}
-// AuditConfig: Specifies the audit configuration for a service.
-// The configuration determines which permission types are logged, and
-// what
-// identities, if any, are exempted from logging.
-// An AuditConfig must have one or more AuditLogConfigs.
-//
-// If there are AuditConfigs for both `allServices` and a specific
-// service,
-// the union of the two AuditConfigs is used for that service: the
-// log_types
-// specified in each AuditConfig are enabled, and the exempted_members
-// in each
-// AuditLogConfig are exempted.
-//
-// Example Policy with multiple AuditConfigs:
-//
-// {
-// "audit_configs": [
-// {
-// "service": "allServices"
-// "audit_log_configs": [
-// {
-// "log_type": "DATA_READ",
-// "exempted_members": [
-// "user:foo@gmail.com"
-// ]
-// },
-// {
-// "log_type": "DATA_WRITE",
-// },
-// {
-// "log_type": "ADMIN_READ",
-// }
-// ]
-// },
-// {
-// "service": "fooservice.googleapis.com"
-// "audit_log_configs": [
-// {
-// "log_type": "DATA_READ",
-// },
-// {
-// "log_type": "DATA_WRITE",
-// "exempted_members": [
-// "user:bar@gmail.com"
-// ]
-// }
-// ]
-// }
-// ]
-// }
-//
-// For fooservice, this policy enables DATA_READ, DATA_WRITE and
-// ADMIN_READ
-// logging. It also exempts foo@gmail.com from DATA_READ logging,
-// and
-// bar@gmail.com from DATA_WRITE logging.
-type AuditConfig struct {
- // AuditLogConfigs: The configuration for logging of each type of
- // permission.
- AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
-
- // Service: Specifies a service that will be enabled for audit
- // logging.
- // For example, `storage.googleapis.com`,
- // `cloudsql.googleapis.com`.
- // `allServices` is a special value that covers all services.
- Service string `json:"service,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AuditLogConfigs") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
-}
-
-func (s *AuditConfig) MarshalJSON() ([]byte, error) {
- type NoMethod AuditConfig
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
-// AuditLogConfig: Provides the configuration for logging a type of
-// permissions.
-// Example:
-//
-// {
-// "audit_log_configs": [
-// {
-// "log_type": "DATA_READ",
-// "exempted_members": [
-// "user:foo@gmail.com"
-// ]
-// },
-// {
-// "log_type": "DATA_WRITE",
-// }
-// ]
-// }
-//
-// This enables 'DATA_READ' and 'DATA_WRITE' logging, while
-// exempting
-// foo@gmail.com from DATA_READ logging.
-type AuditLogConfig struct {
- // ExemptedMembers: Specifies the identities that do not cause logging
- // for this type of
- // permission.
- // Follows the same format of Binding.members.
- ExemptedMembers []string `json:"exemptedMembers,omitempty"`
-
- // LogType: The log type that this config enables.
- //
- // Possible values:
- // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
- // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
- // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
- // "DATA_READ" - Data reads. Example: CloudSQL Users list
- LogType string `json:"logType,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ExemptedMembers") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
-}
-
-func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
- type NoMethod AuditLogConfig
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
// Binding: Associates `members` with a `role`.
type Binding struct {
// Condition: Unimplemented. The condition that is associated with this
@@ -497,10 +343,6 @@
// For a description of IAM and its features, see the
// [IAM developer's guide](https://cloud.google.com/iam/docs).
type Policy struct {
- // AuditConfigs: Specifies cloud audit logging configuration for this
- // policy.
- AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
-
// Bindings: Associates a list of `members` to a `role`.
// `bindings` with no members will result in an error.
Bindings []*Binding `json:"bindings,omitempty"`
@@ -532,7 +374,7 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
+ // ForceSendFields is a list of field names (e.g. "Bindings") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
@@ -540,10 +382,10 @@
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "AuditConfigs") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
+ // NullFields is a list of field names (e.g. "Bindings") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
@@ -565,15 +407,6 @@
// might reject them.
Policy *Policy `json:"policy,omitempty"`
- // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
- // policy to modify. Only
- // the fields in the mask will be modified. If no mask is provided,
- // the
- // following default mask is used:
- // paths: "bindings, etag"
- // This field is only used by Cloud IAM.
- UpdateMask string `json:"updateMask,omitempty"`
-
// ForceSendFields is a list of field names (e.g. "Policy") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json
index e015c79..55f6920 100644
--- a/monitoring/v3/monitoring-api.json
+++ b/monitoring/v3/monitoring-api.json
@@ -1452,7 +1452,7 @@
}
}
},
- "revision": "20181126",
+ "revision": "20181205",
"rootUrl": "https://monitoring.googleapis.com/",
"schemas": {
"Aggregation": {
@@ -2225,6 +2225,20 @@
"peerProjectId": {
"description": "The GCP project_id where the internal checker lives. Not necessary the same as the workspace project.",
"type": "string"
+ },
+ "state": {
+ "description": "The current operational state of the internal checker.",
+ "enum": [
+ "UNSPECIFIED",
+ "CREATING",
+ "RUNNING"
+ ],
+ "enumDescriptions": [
+ "An internal checker should never be in the unspecified state.",
+ "The checker is being created, provisioned, and configured. A checker in this state can be returned by ListInternalCheckers or GetInternalChecker, as well as by examining the longrunning.Operation that created it.",
+ "The checker is running and available for use. A checker in this state can be returned by ListInternalCheckers or GetInternalChecker as well as by examining the longrunning.Operation that created it. If a checker is being torn down, it is neither visible nor usable, so there is no \"deleting\" or \"down\" state."
+ ],
+ "type": "string"
}
},
"type": "object"
diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go
index 1ac5b00..f9bc2fa 100644
--- a/monitoring/v3/monitoring-gen.go
+++ b/monitoring/v3/monitoring-gen.go
@@ -1713,6 +1713,22 @@
// Not necessary the same as the workspace project.
PeerProjectId string `json:"peerProjectId,omitempty"`
+ // State: The current operational state of the internal checker.
+ //
+ // Possible values:
+ // "UNSPECIFIED" - An internal checker should never be in the
+ // unspecified state.
+ // "CREATING" - The checker is being created, provisioned, and
+ // configured. A checker in this state can be returned by
+ // ListInternalCheckers or GetInternalChecker, as well as by examining
+ // the longrunning.Operation that created it.
+ // "RUNNING" - The checker is running and available for use. A checker
+ // in this state can be returned by ListInternalCheckers or
+ // GetInternalChecker as well as by examining the longrunning.Operation
+ // that created it. If a checker is being torn down, it is neither
+ // visible nor usable, so there is no "deleting" or "down" state.
+ State string `json:"state,omitempty"`
+
// ForceSendFields is a list of field names (e.g. "DisplayName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json
index f40deef..6adcca8 100644
--- a/redis/v1/redis-api.json
+++ b/redis/v1/redis-api.json
@@ -12,7 +12,7 @@
"baseUrl": "https://redis.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Cloud Redis",
- "description": "The Google Cloud Memorystore for Redis API is used for creating and managing Redis instances on the Google Cloud Platform.",
+ "description": "Creates and manages Redis instances on the Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/memorystore/docs/redis/",
"fullyEncodeReservedExpansion": true,
@@ -458,7 +458,7 @@
}
}
},
- "revision": "20181031",
+ "revision": "20181203",
"rootUrl": "https://redis.googleapis.com/",
"schemas": {
"Empty": {
diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json
index e05984e..ec76c5f 100644
--- a/redis/v1beta1/redis-api.json
+++ b/redis/v1beta1/redis-api.json
@@ -12,7 +12,7 @@
"baseUrl": "https://redis.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Cloud Redis",
- "description": "The Google Cloud Memorystore for Redis API is used for creating and managing Redis instances on the Google Cloud Platform.",
+ "description": "Creates and manages Redis instances on the Google Cloud Platform.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/memorystore/docs/redis/",
"fullyEncodeReservedExpansion": true,
@@ -458,7 +458,7 @@
}
}
},
- "revision": "20181031",
+ "revision": "20181203",
"rootUrl": "https://redis.googleapis.com/",
"schemas": {
"Empty": {
diff --git a/runtimeconfig/v1beta1/runtimeconfig-api.json b/runtimeconfig/v1beta1/runtimeconfig-api.json
index 80c1d23..716359c 100644
--- a/runtimeconfig/v1beta1/runtimeconfig-api.json
+++ b/runtimeconfig/v1beta1/runtimeconfig-api.json
@@ -798,7 +798,7 @@
}
}
},
- "revision": "20181126",
+ "revision": "20181210",
"rootUrl": "https://runtimeconfig.googleapis.com/",
"schemas": {
"Binding": {
@@ -1105,7 +1105,7 @@
"type": "string"
},
"value": {
- "description": "The binary value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. The value must be\nbase64 encoded. Only one of `value` or `text` can be set.",
+ "description": "The binary value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. The value must be\nbase64 encoded, and must comply with IETF RFC4648\n(https://www.ietf.org/rfc/rfc4648.txt). Only one of `value` or `text`\ncan be set.",
"format": "byte",
"type": "string"
}
diff --git a/runtimeconfig/v1beta1/runtimeconfig-gen.go b/runtimeconfig/v1beta1/runtimeconfig-gen.go
index cff4d81..b156073 100644
--- a/runtimeconfig/v1beta1/runtimeconfig-gen.go
+++ b/runtimeconfig/v1beta1/runtimeconfig-gen.go
@@ -1032,7 +1032,11 @@
// be less
// than 4096 bytes. Empty values are also accepted. The value must
// be
- // base64 encoded. Only one of `value` or `text` can be set.
+ // base64 encoded, and must comply with IETF
+ // RFC4648
+ // (https://www.ietf.org/rfc/rfc4648.txt). Only one of `value` or
+ // `text`
+ // can be set.
Value string `json:"value,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json
index 8c18043..a112d4b 100644
--- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json
+++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json
@@ -485,7 +485,7 @@
}
}
},
- "revision": "20181127",
+ "revision": "20181207",
"rootUrl": "https://serviceconsumermanagement.googleapis.com/",
"schemas": {
"AddTenantProjectRequest": {
@@ -598,7 +598,7 @@
"type": "string"
},
"authorizationUrl": {
- "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
+ "description": "Redirect URL if JWT token is required but not present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
"type": "string"
},
"id": {
diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go
index 67dfaba..644fbf9 100644
--- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go
+++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go
@@ -352,7 +352,7 @@
// bookstore_web.apps.googleusercontent.com
Audiences string `json:"audiences,omitempty"`
- // AuthorizationUrl: Redirect URL if JWT token is required but no
+ // AuthorizationUrl: Redirect URL if JWT token is required but not
// present or is expired.
// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
AuthorizationUrl string `json:"authorizationUrl,omitempty"`
diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json
index bc04848..1cd7fe7 100644
--- a/servicenetworking/v1beta/servicenetworking-api.json
+++ b/servicenetworking/v1beta/servicenetworking-api.json
@@ -140,7 +140,7 @@
"services": {
"methods": {
"addSubnetwork": {
- "description": "Service producers use this method to provision a new subnet in\npeered service shared VPC network.\nIt will validate previously provided allocated ranges, find\nnon-conflicting sub-range of requested size (expressed in\nnumber of leading bits of ipv4 network mask, as in CIDR range\nnotation). It will then create a subnetwork in the request\nregion. The subsequent call will try to reuse the\nsubnetwork previously created if subnetwork name, region and\nprefix length of the IP range match.\nOperation\u003cresponse: Subnetwork\u003e",
+ "description": "For service producers, provisions a new subnet in a\npeered service's shared VPC network in the requested region and with the\nrequested size that's expressed as a CIDR range (number of leading bits of\nipV4 network mask). The method checks against the assigned allocated ranges\nto find a non-conflicting IP address range. The method will reuse a subnet\nif subsequent calls contain the same subnet name, region, prefix length.\nThis method will make producer's tenant project to be a shared VPC service\nproject as needed.\nThe response from the `get` operation will be of type `Subnetwork` if the\noperation successfully completes.",
"flatPath": "v1beta/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork",
"httpMethod": "POST",
"id": "servicenetworking.services.addSubnetwork",
@@ -149,7 +149,7 @@
],
"parameters": {
"parent": {
- "description": "Required. This is a 'tenant' project in the service producer organization.\nservices/{service}/{collection-id}/{resource-id}\n{collection id} is the cloud resource collection type representing the\ntenant project. Only 'projects' are currently supported.\n{resource id} is the tenant project numeric id: '123456'.\n{service} the name of the peering service, for example\n'service-peering.example.com'. This service must be activated.\nin the consumer project.",
+ "description": "Required. A tenant project in the service producer organization, in the\nfollowing format: services/{service}/{collection-id}/{resource-id}.\n{collection-id} is the cloud resource collection type that represents the\ntenant project. Only `projects` are supported.\n{resource-id} is the tenant project numeric id, such as\n`123456`. {service} the name of the peering service, such as\n`service-peering.example.com`. This service must already be\nenabled in the service consumer's project.",
"location": "path",
"pattern": "^services/[^/]+/[^/]+/[^/]+$",
"required": true,
@@ -169,7 +169,7 @@
]
},
"patch": {
- "description": "Allocated ranges specified for the connection may be updated.\nOperation\u003cresponse: Connection\u003e.",
+ "description": "Updates the allocated ranges that are assigned to a connection.\nThe response from the `get` operation will be of type `Connection` if the\noperation successfully completes.",
"flatPath": "v1beta/services/{servicesId}",
"httpMethod": "PATCH",
"id": "servicenetworking.services.patch",
@@ -183,14 +183,14 @@
"type": "boolean"
},
"name": {
- "description": "Provider peering service that is managing peering connectivity for a\nservice provider organization.\nFor Google services that support this functionality it is\n'services/servicenetworking.googleapis.com'.",
+ "description": "The service producer peering service that is managing peering connectivity\nfor a service producer organization.\nFor Google services that support this functionality, this is\n`services/servicenetworking.googleapis.com`.",
"location": "path",
"pattern": "^services/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
- "description": "The update mask. If this is omitted, it defaults to \"*\". Only reserved\npeering ranges list may be updated.",
+ "description": "The update mask. If this is omitted, it defaults to \"*\". You can only\nupdate the listed peering ranges.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
@@ -207,13 +207,42 @@
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management"
]
+ },
+ "searchRange": {
+ "description": "Service producers can use this method to find a currently unused range\nwithin consumer allocated ranges. This returned range is not reserved,\nand not guaranteed to remain unused.\nIt will validate previously provided allocated ranges, find\nnon-conflicting sub-range of requested size (expressed in\nnumber of leading bits of ipv4 network mask, as in CIDR range\nnotation).\nOperation\u003cresponse: Range\u003e",
+ "flatPath": "v1beta/services/{servicesId}:searchRange",
+ "httpMethod": "POST",
+ "id": "servicenetworking.services.searchRange",
+ "parameterOrder": [
+ "parent"
+ ],
+ "parameters": {
+ "parent": {
+ "description": "Required. This is in a form services/{service}.\n{service} the name of the private access management service, for example\n'service-peering.example.com'.",
+ "location": "path",
+ "pattern": "^services/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1beta/{+parent}:searchRange",
+ "request": {
+ "$ref": "SearchRangeRequest"
+ },
+ "response": {
+ "$ref": "Operation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/service.management"
+ ]
}
},
"resources": {
"connections": {
"methods": {
"create": {
- "description": "To connect service to a VPC network peering connection\nmust be established prior to service provisioning.\nThis method must be invoked by the consumer VPC network administrator\nIt will establish a permanent peering connection with a shared\nnetwork created in the service producer organization and register a\nallocated IP range(s) to be used for service subnetwork provisioning.\nThis connection will be used for all supported services in the service\nproducer organization, so it only needs to be invoked once.\nOperation\u003cresponse: Connection\u003e.",
+ "description": "Creates a private connection that establishes a VPC Network Peering\nconnection to a VPC network in the service producer's organization.\nThe administrator of the service consumer's VPC network invokes this\nmethod. The administrator must assign one or more allocated IP ranges for\nprovisioning subnetworks in the service producer's VPC network. This\nconnection is used for all supported services in the service producer's\norganization, so it only needs to be invoked once. The response from the\n`get` operation will be of type `Connection` if the operation successfully\ncompletes.",
"flatPath": "v1beta/services/{servicesId}/connections",
"httpMethod": "POST",
"id": "servicenetworking.services.connections.create",
@@ -222,7 +251,7 @@
],
"parameters": {
"parent": {
- "description": "Provider peering service that is managing peering connectivity for a\nservice provider organization.\nFor Google services that support this functionality it is\n'services/servicenetworking.googleapis.com'.",
+ "description": "The service that is managing peering connectivity for a service producer's\norganization. For Google services that support this functionality, this\nvalue is `services/servicenetworking.googleapis.com`.",
"location": "path",
"pattern": "^services/[^/]+$",
"required": true,
@@ -242,7 +271,7 @@
]
},
"list": {
- "description": "Service consumers use this method to list configured peering connection for\nthe given service and consumer network.",
+ "description": "List the private connections that are configured in a service consumer's\nVPC network.",
"flatPath": "v1beta/services/{servicesId}/connections",
"httpMethod": "GET",
"id": "servicenetworking.services.connections.list",
@@ -251,12 +280,12 @@
],
"parameters": {
"network": {
- "description": "Network name in the consumer project. This network must have been\nalready peered with a shared VPC network using CreateConnection\nmethod.\nMust be in a form 'projects/{project}/global/networks/{network}'.\n{project} is a project number, as in '12345'\n{network} is network name.",
+ "description": "The name of service consumer's VPC network that's connected with service\nproducer network through a private connection. The network name must be in\nthe following format:\n`projects/{project}/global/networks/{network}`. {project} is a\nproject number, such as in `12345` that includes the VPC service\nconsumer's VPC network. {network} is the name of the service consumer's VPC\nnetwork.",
"location": "query",
"type": "string"
},
"parent": {
- "description": "Provider peering service that is managing peering connectivity for a\nservice provider organization.\nFor Google services that support this functionality it is\n'services/servicenetworking.googleapis.com'.\nFor \"-\" all configured public peering services will be queried.",
+ "description": "The service that is managing peering connectivity for a service producer's\norganization. For Google services that support this functionality, this\nvalue is `services/servicenetworking.googleapis.com`.\nIf you specify `-` as the parameter value, all configured public peering\nservices are listed.",
"location": "path",
"pattern": "^services/[^/]+$",
"required": true,
@@ -277,7 +306,7 @@
}
}
},
- "revision": "20181128",
+ "revision": "20181207",
"rootUrl": "https://servicenetworking.googleapis.com/",
"schemas": {
"AddSubnetworkRequest": {
@@ -285,24 +314,24 @@
"id": "AddSubnetworkRequest",
"properties": {
"consumer": {
- "description": "Required. Resource representing service consumer. It may be different from\nthe project number in consumer network parameter in case of that network\nbeing a shared VPC network. In that case, Service Networking will validate\nthat this resource belongs to that shared VPC.\nFor example 'projects/123456'.",
+ "description": "Required. A resource that represents the service consumer, such as\n`projects/123456`. The project number can be different from the\nvalue in the consumer network parameter. For example, the network might be\npart of a Shared VPC network. In those cases, Service Networking validates\nthat this resource belongs to that Shared VPC.",
"type": "string"
},
"consumerNetwork": {
- "description": "Required. Network name in the consumer project. This network must have been\nalready peered with a shared VPC network using CreateConnection\nmethod.\nMust be in a form 'projects/{project}/global/networks/{network}'.\n{project} is a project number, as in '12345'\n{network} is network name.",
+ "description": "Required. The name of the service consumer's VPC network. The network\nmust have an existing private connection that was provisioned through the\nconnections.create method. The name must be in the following format:\n`projects/{project}/global/networks/{network}`, where {project}\nis a project number, such as `12345`. {network} is the name of a\nVPC network in the project.",
"type": "string"
},
"description": {
- "description": "Optional. Description of the subnetwork.",
+ "description": "An optional description of the subnet.",
"type": "string"
},
"ipPrefixLength": {
- "description": "Required. The prefix length of the IP range.\nUse usual CIDR range notation.\nFor example, '30' to provision subnet with x.x.x.x/30 CIDR range.\nActual range will be determined using allocated range for the consumer\npeered network and returned in the result.",
+ "description": "Required. The prefix length of the subnet's IP address range. Use CIDR\nrange notation, such as `30` to provision a subnet with an\n`x.x.x.x/30` CIDR range. The IP address range is drawn from a\npool of available ranges in the service consumer's allocated range.",
"format": "int32",
"type": "integer"
},
"region": {
- "description": "Required. Cloud [region](/compute/docs/reference/rest/v1/regions) for the new\nsubnetwork.",
+ "description": "Required. The name of a [region](/compute/docs/regions-zones)\nfor the subnet, such `europe-west1`.",
"type": "string"
},
"requestedAddress": {
@@ -310,11 +339,11 @@
"type": "string"
},
"subnetwork": {
- "description": "Required. Name for the new subnetwork.\nMust be a legal [subnetwork](compute/docs/reference/rest/v1/subnetworks)\nname.",
+ "description": "Required. A name for the new subnet. For information about the naming\nrequirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks)\nin the Compute API documentation.",
"type": "string"
},
"subnetworkUsers": {
- "description": "Optional. List of members that will be granted 'compute.networkUser' role\non the newly added subnetwork.",
+ "description": "A list of members that are granted the `compute.networkUser`\nrole on the subnet.",
"items": {
"type": "string"
},
@@ -384,7 +413,7 @@
"type": "string"
},
"authorizationUrl": {
- "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
+ "description": "Redirect URL if JWT token is required but not present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
"type": "string"
},
"id": {
@@ -552,26 +581,26 @@
"type": "object"
},
"Connection": {
- "description": "Message returning the created service connection.",
+ "description": "Represents a private connection resource. A private connection is implemented\nas a VPC Network Peering connection between a service producer's VPC network\nand a service consumer's VPC network.",
"id": "Connection",
"properties": {
"network": {
- "description": "Name of VPC network connected with service producer network.\nMust be in a form 'projects/{project}/global/networks/{network}'.\n{project} is a project number, as in '12345'\n{network} is a network name.",
+ "description": "The name of service consumer's VPC network that's connected with service\nproducer network, in the following format:\n`projects/{project}/global/networks/{network}`.\n`{project}` is a project number, such as in `12345` that includes\nthe VPC service consumer's VPC network. `{network}` is the name of the\nservice consumer's VPC network.",
"type": "string"
},
"peering": {
- "description": "Output only.\nName of the peering connection that is created by the peering service.",
+ "description": "Output only.\nThe name of the VPC Network Peering connection that was created by the\nservice producer.",
"type": "string"
},
"reservedPeeringRanges": {
- "description": "Named IP address range(s) of PEERING type allocated for this service\nprovider.\nNote that invoking this method with a different range when connection is\nalready established will not modify already provisioned service\nproducer subnetworks.",
+ "description": "The name of one or more allocated IP address ranges for this service\nproducer of type `PEERING`.\nNote that invoking this method with a different range when connection is\nalready established will not modify already provisioned service\nproducer subnetworks.",
"items": {
"type": "string"
},
"type": "array"
},
"service": {
- "description": "Output only.\nName of the peering service associated with this connection.\n\"services/{service name}",
+ "description": "Output only.\nThe name of the peering service that's associated with this connection, in\nthe following format: `services/{service name}`.",
"type": "string"
}
},
@@ -1558,6 +1587,22 @@
},
"type": "object"
},
+ "SearchRangeRequest": {
+ "description": "Request to search for an unused range within allocated ranges.",
+ "id": "SearchRangeRequest",
+ "properties": {
+ "ipPrefixLength": {
+ "description": "Required. The prefix length of the IP range.\nUse usual CIDR range notation.\nFor example, '30' to find unused x.x.x.x/30 CIDR range.\nActual range will be determined using allocated range for the consumer\npeered network and returned in the result.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "network": {
+ "description": "Network name in the consumer project. This network must have been\nalready peered with a shared VPC network using CreateConnection\nmethod.\nMust be in a form 'projects/{project}/global/networks/{network}'.\n{project} is a project number, as in '12345'\n{network} is network name.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Service": {
"description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth",
"id": "Service",
@@ -1759,11 +1804,11 @@
"type": "object"
},
"Subnetwork": {
- "description": "Message returning the created service subnetwork.",
+ "description": "Represents a subnet that was created by a peered service.",
"id": "Subnetwork",
"properties": {
"ipCidrRange": {
- "description": "Subnetwork CIDR range in \"10.x.x.x/y\" format.",
+ "description": "Subnetwork CIDR range in `10.x.x.x/y` format.",
"type": "string"
},
"name": {
@@ -1771,7 +1816,7 @@
"type": "string"
},
"network": {
- "description": "Shared VPC host project network peered with consumer network.\nFor example: projects/1234321/global/networks/host-network",
+ "description": "In the Shared VPC host project, the VPC network that's peered with the\nconsumer network. For example:\n`projects/1234321/global/networks/host-network`",
"type": "string"
}
},
diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go
index 157931c..c3b5c5d 100644
--- a/servicenetworking/v1beta/servicenetworking-gen.go
+++ b/servicenetworking/v1beta/servicenetworking-gen.go
@@ -119,43 +119,41 @@
// AddSubnetworkRequest: Request to create a subnetwork in a previously
// peered service network.
type AddSubnetworkRequest struct {
- // Consumer: Required. Resource representing service consumer. It may be
- // different from
- // the project number in consumer network parameter in case of that
- // network
- // being a shared VPC network. In that case, Service Networking will
- // validate
- // that this resource belongs to that shared VPC.
- // For example 'projects/123456'.
+ // Consumer: Required. A resource that represents the service consumer,
+ // such as
+ // `projects/123456`. The project number can be different from the
+ // value in the consumer network parameter. For example, the network
+ // might be
+ // part of a Shared VPC network. In those cases, Service Networking
+ // validates
+ // that this resource belongs to that Shared VPC.
Consumer string `json:"consumer,omitempty"`
- // ConsumerNetwork: Required. Network name in the consumer project.
- // This network must have been
- // already peered with a shared VPC network using
- // CreateConnection
- // method.
- // Must be in a form
- // 'projects/{project}/global/networks/{network}'.
- // {project} is a project number, as in '12345'
- // {network} is network name.
+ // ConsumerNetwork: Required. The name of the service consumer's VPC
+ // network. The network
+ // must have an existing private connection that was provisioned through
+ // the
+ // connections.create method. The name must be in the following
+ // format:
+ // `projects/{project}/global/networks/{network}`, where {project}
+ // is a project number, such as `12345`. {network} is the name of a
+ // VPC network in the project.
ConsumerNetwork string `json:"consumerNetwork,omitempty"`
- // Description: Optional. Description of the subnetwork.
+ // Description: An optional description of the subnet.
Description string `json:"description,omitempty"`
- // IpPrefixLength: Required. The prefix length of the IP range.
- // Use usual CIDR range notation.
- // For example, '30' to provision subnet with x.x.x.x/30 CIDR
- // range.
- // Actual range will be determined using allocated range for the
- // consumer
- // peered network and returned in the result.
+ // IpPrefixLength: Required. The prefix length of the subnet's IP
+ // address range. Use CIDR
+ // range notation, such as `30` to provision a subnet with
+ // an
+ // `x.x.x.x/30` CIDR range. The IP address range is drawn from a
+ // pool of available ranges in the service consumer's allocated range.
IpPrefixLength int64 `json:"ipPrefixLength,omitempty"`
- // Region: Required. Cloud
- // [region](/compute/docs/reference/rest/v1/regions) for the
- // new
- // subnetwork.
+ // Region: Required. The name of a
+ // [region](/compute/docs/regions-zones)
+ // for the subnet, such `europe-west1`.
Region string `json:"region,omitempty"`
// RequestedAddress: Optional. The starting address of a range. The
@@ -169,15 +167,16 @@
// range isn't available, the call fails.
RequestedAddress string `json:"requestedAddress,omitempty"`
- // Subnetwork: Required. Name for the new subnetwork.
- // Must be a legal
- // [subnetwork](compute/docs/reference/rest/v1/subnetworks)
- // name.
+ // Subnetwork: Required. A name for the new subnet. For information
+ // about the naming
+ // requirements, see
+ // [subnetwork](/compute/docs/reference/rest/v1/subnetworks)
+ // in the Compute API documentation.
Subnetwork string `json:"subnetwork,omitempty"`
- // SubnetworkUsers: Optional. List of members that will be granted
- // 'compute.networkUser' role
- // on the newly added subnetwork.
+ // SubnetworkUsers: A list of members that are granted the
+ // `compute.networkUser`
+ // role on the subnet.
SubnetworkUsers []string `json:"subnetworkUsers,omitempty"`
// ForceSendFields is a list of field names (e.g. "Consumer") to
@@ -329,7 +328,7 @@
// bookstore_web.apps.googleusercontent.com
Audiences string `json:"audiences,omitempty"`
- // AuthorizationUrl: Redirect URL if JWT token is required but no
+ // AuthorizationUrl: Redirect URL if JWT token is required but not
// present or is expired.
// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
AuthorizationUrl string `json:"authorizationUrl,omitempty"`
@@ -792,24 +791,32 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// Connection: Message returning the created service connection.
+// Connection: Represents a private connection resource. A private
+// connection is implemented
+// as a VPC Network Peering connection between a service producer's VPC
+// network
+// and a service consumer's VPC network.
type Connection struct {
- // Network: Name of VPC network connected with service producer
- // network.
- // Must be in a form
- // 'projects/{project}/global/networks/{network}'.
- // {project} is a project number, as in '12345'
- // {network} is a network name.
+ // Network: The name of service consumer's VPC network that's connected
+ // with service
+ // producer network, in the following
+ // format:
+ // `projects/{project}/global/networks/{network}`.
+ // `{project}` is a project number, such as in `12345` that includes
+ // the VPC service consumer's VPC network. `{network}` is the name of
+ // the
+ // service consumer's VPC network.
Network string `json:"network,omitempty"`
// Peering: Output only.
- // Name of the peering connection that is created by the peering
- // service.
+ // The name of the VPC Network Peering connection that was created by
+ // the
+ // service producer.
Peering string `json:"peering,omitempty"`
- // ReservedPeeringRanges: Named IP address range(s) of PEERING type
- // allocated for this service
- // provider.
+ // ReservedPeeringRanges: The name of one or more allocated IP address
+ // ranges for this service
+ // producer of type `PEERING`.
// Note that invoking this method with a different range when connection
// is
// already established will not modify already provisioned
@@ -818,9 +825,9 @@
ReservedPeeringRanges []string `json:"reservedPeeringRanges,omitempty"`
// Service: Output only.
- // Name of the peering service associated with this
- // connection.
- // "services/{service name}
+ // The name of the peering service that's associated with this
+ // connection, in
+ // the following format: `services/{service name}`.
Service string `json:"service,omitempty"`
// ForceSendFields is a list of field names (e.g. "Network") to
@@ -3461,6 +3468,52 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// SearchRangeRequest: Request to search for an unused range within
+// allocated ranges.
+type SearchRangeRequest struct {
+ // IpPrefixLength: Required. The prefix length of the IP range.
+ // Use usual CIDR range notation.
+ // For example, '30' to find unused x.x.x.x/30 CIDR range.
+ // Actual range will be determined using allocated range for the
+ // consumer
+ // peered network and returned in the result.
+ IpPrefixLength int64 `json:"ipPrefixLength,omitempty"`
+
+ // Network: Network name in the consumer project. This network must
+ // have been
+ // already peered with a shared VPC network using
+ // CreateConnection
+ // method.
+ // Must be in a form
+ // 'projects/{project}/global/networks/{network}'.
+ // {project} is a project number, as in '12345'
+ // {network} is network name.
+ Network string `json:"network,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "IpPrefixLength") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "IpPrefixLength") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *SearchRangeRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod SearchRangeRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Service: `Service` is the root object of Google service configuration
// schema. It
// describes basic information about a service, such as the name and
@@ -3830,18 +3883,20 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// Subnetwork: Message returning the created service subnetwork.
+// Subnetwork: Represents a subnet that was created by a peered service.
type Subnetwork struct {
- // IpCidrRange: Subnetwork CIDR range in "10.x.x.x/y" format.
+ // IpCidrRange: Subnetwork CIDR range in `10.x.x.x/y` format.
IpCidrRange string `json:"ipCidrRange,omitempty"`
// Name: Subnetwork name.
// See https://cloud.google.com/compute/docs/vpc/
Name string `json:"name,omitempty"`
- // Network: Shared VPC host project network peered with consumer
- // network.
- // For example: projects/1234321/global/networks/host-network
+ // Network: In the Shared VPC host project, the VPC network that's
+ // peered with the
+ // consumer network. For
+ // example:
+ // `projects/1234321/global/networks/host-network`
Network string `json:"network,omitempty"`
// ForceSendFields is a list of field names (e.g. "IpCidrRange") to
@@ -4362,19 +4417,24 @@
header_ http.Header
}
-// AddSubnetwork: Service producers use this method to provision a new
-// subnet in
-// peered service shared VPC network.
-// It will validate previously provided allocated ranges,
-// find
-// non-conflicting sub-range of requested size (expressed in
-// number of leading bits of ipv4 network mask, as in CIDR
-// range
-// notation). It will then create a subnetwork in the request
-// region. The subsequent call will try to reuse the
-// subnetwork previously created if subnetwork name, region and
-// prefix length of the IP range match.
-// Operation<response: Subnetwork>
+// AddSubnetwork: For service producers, provisions a new subnet in
+// a
+// peered service's shared VPC network in the requested region and with
+// the
+// requested size that's expressed as a CIDR range (number of leading
+// bits of
+// ipV4 network mask). The method checks against the assigned allocated
+// ranges
+// to find a non-conflicting IP address range. The method will reuse a
+// subnet
+// if subsequent calls contain the same subnet name, region, prefix
+// length.
+// This method will make producer's tenant project to be a shared VPC
+// service
+// project as needed.
+// The response from the `get` operation will be of type `Subnetwork` if
+// the
+// operation successfully completes.
func (r *ServicesService) AddSubnetwork(parent string, addsubnetworkrequest *AddSubnetworkRequest) *ServicesAddSubnetworkCall {
c := &ServicesAddSubnetworkCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
@@ -4472,7 +4532,7 @@
}
return ret, nil
// {
- // "description": "Service producers use this method to provision a new subnet in\npeered service shared VPC network.\nIt will validate previously provided allocated ranges, find\nnon-conflicting sub-range of requested size (expressed in\nnumber of leading bits of ipv4 network mask, as in CIDR range\nnotation). It will then create a subnetwork in the request\nregion. The subsequent call will try to reuse the\nsubnetwork previously created if subnetwork name, region and\nprefix length of the IP range match.\nOperation\u003cresponse: Subnetwork\u003e",
+ // "description": "For service producers, provisions a new subnet in a\npeered service's shared VPC network in the requested region and with the\nrequested size that's expressed as a CIDR range (number of leading bits of\nipV4 network mask). The method checks against the assigned allocated ranges\nto find a non-conflicting IP address range. The method will reuse a subnet\nif subsequent calls contain the same subnet name, region, prefix length.\nThis method will make producer's tenant project to be a shared VPC service\nproject as needed.\nThe response from the `get` operation will be of type `Subnetwork` if the\noperation successfully completes.",
// "flatPath": "v1beta/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork",
// "httpMethod": "POST",
// "id": "servicenetworking.services.addSubnetwork",
@@ -4481,7 +4541,7 @@
// ],
// "parameters": {
// "parent": {
- // "description": "Required. This is a 'tenant' project in the service producer organization.\nservices/{service}/{collection-id}/{resource-id}\n{collection id} is the cloud resource collection type representing the\ntenant project. Only 'projects' are currently supported.\n{resource id} is the tenant project numeric id: '123456'.\n{service} the name of the peering service, for example\n'service-peering.example.com'. This service must be activated.\nin the consumer project.",
+ // "description": "Required. A tenant project in the service producer organization, in the\nfollowing format: services/{service}/{collection-id}/{resource-id}.\n{collection-id} is the cloud resource collection type that represents the\ntenant project. Only `projects` are supported.\n{resource-id} is the tenant project numeric id, such as\n`123456`. {service} the name of the peering service, such as\n`service-peering.example.com`. This service must already be\nenabled in the service consumer's project.",
// "location": "path",
// "pattern": "^services/[^/]+/[^/]+/[^/]+$",
// "required": true,
@@ -4514,9 +4574,11 @@
header_ http.Header
}
-// Patch: Allocated ranges specified for the connection may be
-// updated.
-// Operation<response: Connection>.
+// Patch: Updates the allocated ranges that are assigned to a
+// connection.
+// The response from the `get` operation will be of type `Connection` if
+// the
+// operation successfully completes.
func (r *ServicesService) Patch(name string, connection *Connection) *ServicesPatchCall {
c := &ServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
@@ -4533,8 +4595,8 @@
}
// UpdateMask sets the optional parameter "updateMask": The update mask.
-// If this is omitted, it defaults to "*". Only reserved
-// peering ranges list may be updated.
+// If this is omitted, it defaults to "*". You can only
+// update the listed peering ranges.
func (c *ServicesPatchCall) UpdateMask(updateMask string) *ServicesPatchCall {
c.urlParams_.Set("updateMask", updateMask)
return c
@@ -4630,7 +4692,7 @@
}
return ret, nil
// {
- // "description": "Allocated ranges specified for the connection may be updated.\nOperation\u003cresponse: Connection\u003e.",
+ // "description": "Updates the allocated ranges that are assigned to a connection.\nThe response from the `get` operation will be of type `Connection` if the\noperation successfully completes.",
// "flatPath": "v1beta/services/{servicesId}",
// "httpMethod": "PATCH",
// "id": "servicenetworking.services.patch",
@@ -4644,14 +4706,14 @@
// "type": "boolean"
// },
// "name": {
- // "description": "Provider peering service that is managing peering connectivity for a\nservice provider organization.\nFor Google services that support this functionality it is\n'services/servicenetworking.googleapis.com'.",
+ // "description": "The service producer peering service that is managing peering connectivity\nfor a service producer organization.\nFor Google services that support this functionality, this is\n`services/servicenetworking.googleapis.com`.",
// "location": "path",
// "pattern": "^services/[^/]+$",
// "required": true,
// "type": "string"
// },
// "updateMask": {
- // "description": "The update mask. If this is omitted, it defaults to \"*\". Only reserved\npeering ranges list may be updated.",
+ // "description": "The update mask. If this is omitted, it defaults to \"*\". You can only\nupdate the listed peering ranges.",
// "format": "google-fieldmask",
// "location": "query",
// "type": "string"
@@ -4672,6 +4734,157 @@
}
+// method id "servicenetworking.services.searchRange":
+
+type ServicesSearchRangeCall struct {
+ s *APIService
+ parent string
+ searchrangerequest *SearchRangeRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SearchRange: Service producers can use this method to find a
+// currently unused range
+// within consumer allocated ranges. This returned range is not
+// reserved,
+// and not guaranteed to remain unused.
+// It will validate previously provided allocated ranges,
+// find
+// non-conflicting sub-range of requested size (expressed in
+// number of leading bits of ipv4 network mask, as in CIDR
+// range
+// notation).
+// Operation<response: Range>
+func (r *ServicesService) SearchRange(parent string, searchrangerequest *SearchRangeRequest) *ServicesSearchRangeCall {
+ c := &ServicesSearchRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.parent = parent
+ c.searchrangerequest = searchrangerequest
+ return c
+}
+
+// Fields allows partial responses to be retrieved. See
+// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
+// for more information.
+func (c *ServicesSearchRangeCall) Fields(s ...googleapi.Field) *ServicesSearchRangeCall {
+ c.urlParams_.Set("fields", googleapi.CombineFields(s))
+ return c
+}
+
+// Context sets the context to be used in this call's Do method. Any
+// pending HTTP request will be aborted if the provided context is
+// canceled.
+func (c *ServicesSearchRangeCall) Context(ctx context.Context) *ServicesSearchRangeCall {
+ c.ctx_ = ctx
+ return c
+}
+
+// Header returns an http.Header that can be modified by the caller to
+// add HTTP headers to the request.
+func (c *ServicesSearchRangeCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ServicesSearchRangeCall) doRequest(alt string) (*http.Response, error) {
+ reqHeaders := make(http.Header)
+ for k, v := range c.header_ {
+ reqHeaders[k] = v
+ }
+ reqHeaders.Set("User-Agent", c.s.userAgent())
+ var body io.Reader = nil
+ body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchrangerequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ c.urlParams_.Set("prettyPrint", "false")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:searchRange")
+ urls += "?" + c.urlParams_.Encode()
+ req, err := http.NewRequest("POST", urls, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "parent": c.parent,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "servicenetworking.services.searchRange" call.
+// Exactly one of *Operation or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *Operation.ServerResponse.Header or (if a response was returned at
+// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
+// to check whether the returned error was because
+// http.StatusNotModified was returned.
+func (c *ServicesSearchRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
+ gensupport.SetOptions(c.urlParams_, opts...)
+ res, err := c.doRequest("json")
+ if res != nil && res.StatusCode == http.StatusNotModified {
+ if res.Body != nil {
+ res.Body.Close()
+ }
+ return nil, &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ defer googleapi.CloseBody(res)
+ if err := googleapi.CheckResponse(res); err != nil {
+ return nil, err
+ }
+ ret := &Operation{
+ ServerResponse: googleapi.ServerResponse{
+ Header: res.Header,
+ HTTPStatusCode: res.StatusCode,
+ },
+ }
+ target := &ret
+ if err := gensupport.DecodeResponse(target, res); err != nil {
+ return nil, err
+ }
+ return ret, nil
+ // {
+ // "description": "Service producers can use this method to find a currently unused range\nwithin consumer allocated ranges. This returned range is not reserved,\nand not guaranteed to remain unused.\nIt will validate previously provided allocated ranges, find\nnon-conflicting sub-range of requested size (expressed in\nnumber of leading bits of ipv4 network mask, as in CIDR range\nnotation).\nOperation\u003cresponse: Range\u003e",
+ // "flatPath": "v1beta/services/{servicesId}:searchRange",
+ // "httpMethod": "POST",
+ // "id": "servicenetworking.services.searchRange",
+ // "parameterOrder": [
+ // "parent"
+ // ],
+ // "parameters": {
+ // "parent": {
+ // "description": "Required. This is in a form services/{service}.\n{service} the name of the private access management service, for example\n'service-peering.example.com'.",
+ // "location": "path",
+ // "pattern": "^services/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1beta/{+parent}:searchRange",
+ // "request": {
+ // "$ref": "SearchRangeRequest"
+ // },
+ // "response": {
+ // "$ref": "Operation"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/service.management"
+ // ]
+ // }
+
+}
+
// method id "servicenetworking.services.connections.create":
type ServicesConnectionsCreateCall struct {
@@ -4683,21 +4896,23 @@
header_ http.Header
}
-// Create: To connect service to a VPC network peering connection
-// must be established prior to service provisioning.
-// This method must be invoked by the consumer VPC network
-// administrator
-// It will establish a permanent peering connection with a
-// shared
-// network created in the service producer organization and register
-// a
-// allocated IP range(s) to be used for service subnetwork
-// provisioning.
-// This connection will be used for all supported services in the
-// service
-// producer organization, so it only needs to be invoked
-// once.
-// Operation<response: Connection>.
+// Create: Creates a private connection that establishes a VPC Network
+// Peering
+// connection to a VPC network in the service producer's
+// organization.
+// The administrator of the service consumer's VPC network invokes
+// this
+// method. The administrator must assign one or more allocated IP ranges
+// for
+// provisioning subnetworks in the service producer's VPC network.
+// This
+// connection is used for all supported services in the service
+// producer's
+// organization, so it only needs to be invoked once. The response from
+// the
+// `get` operation will be of type `Connection` if the operation
+// successfully
+// completes.
func (r *ServicesConnectionsService) Create(parent string, connection *Connection) *ServicesConnectionsCreateCall {
c := &ServicesConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
@@ -4795,7 +5010,7 @@
}
return ret, nil
// {
- // "description": "To connect service to a VPC network peering connection\nmust be established prior to service provisioning.\nThis method must be invoked by the consumer VPC network administrator\nIt will establish a permanent peering connection with a shared\nnetwork created in the service producer organization and register a\nallocated IP range(s) to be used for service subnetwork provisioning.\nThis connection will be used for all supported services in the service\nproducer organization, so it only needs to be invoked once.\nOperation\u003cresponse: Connection\u003e.",
+ // "description": "Creates a private connection that establishes a VPC Network Peering\nconnection to a VPC network in the service producer's organization.\nThe administrator of the service consumer's VPC network invokes this\nmethod. The administrator must assign one or more allocated IP ranges for\nprovisioning subnetworks in the service producer's VPC network. This\nconnection is used for all supported services in the service producer's\norganization, so it only needs to be invoked once. The response from the\n`get` operation will be of type `Connection` if the operation successfully\ncompletes.",
// "flatPath": "v1beta/services/{servicesId}/connections",
// "httpMethod": "POST",
// "id": "servicenetworking.services.connections.create",
@@ -4804,7 +5019,7 @@
// ],
// "parameters": {
// "parent": {
- // "description": "Provider peering service that is managing peering connectivity for a\nservice provider organization.\nFor Google services that support this functionality it is\n'services/servicenetworking.googleapis.com'.",
+ // "description": "The service that is managing peering connectivity for a service producer's\norganization. For Google services that support this functionality, this\nvalue is `services/servicenetworking.googleapis.com`.",
// "location": "path",
// "pattern": "^services/[^/]+$",
// "required": true,
@@ -4837,24 +5052,27 @@
header_ http.Header
}
-// List: Service consumers use this method to list configured peering
-// connection for
-// the given service and consumer network.
+// List: List the private connections that are configured in a service
+// consumer's
+// VPC network.
func (r *ServicesConnectionsService) List(parent string) *ServicesConnectionsListCall {
c := &ServicesConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
return c
}
-// Network sets the optional parameter "network": Network name in the
-// consumer project. This network must have been
-// already peered with a shared VPC network using
-// CreateConnection
-// method.
-// Must be in a form
-// 'projects/{project}/global/networks/{network}'.
-// {project} is a project number, as in '12345'
-// {network} is network name.
+// Network sets the optional parameter "network": The name of service
+// consumer's VPC network that's connected with service
+// producer network through a private connection. The network name must
+// be in
+// the following format:
+// `projects/{project}/global/networks/{network}`. {project} is
+// a
+// project number, such as in `12345` that includes the VPC
+// service
+// consumer's VPC network. {network} is the name of the service
+// consumer's VPC
+// network.
func (c *ServicesConnectionsListCall) Network(network string) *ServicesConnectionsListCall {
c.urlParams_.Set("network", network)
return c
@@ -4958,7 +5176,7 @@
}
return ret, nil
// {
- // "description": "Service consumers use this method to list configured peering connection for\nthe given service and consumer network.",
+ // "description": "List the private connections that are configured in a service consumer's\nVPC network.",
// "flatPath": "v1beta/services/{servicesId}/connections",
// "httpMethod": "GET",
// "id": "servicenetworking.services.connections.list",
@@ -4967,12 +5185,12 @@
// ],
// "parameters": {
// "network": {
- // "description": "Network name in the consumer project. This network must have been\nalready peered with a shared VPC network using CreateConnection\nmethod.\nMust be in a form 'projects/{project}/global/networks/{network}'.\n{project} is a project number, as in '12345'\n{network} is network name.",
+ // "description": "The name of service consumer's VPC network that's connected with service\nproducer network through a private connection. The network name must be in\nthe following format:\n`projects/{project}/global/networks/{network}`. {project} is a\nproject number, such as in `12345` that includes the VPC service\nconsumer's VPC network. {network} is the name of the service consumer's VPC\nnetwork.",
// "location": "query",
// "type": "string"
// },
// "parent": {
- // "description": "Provider peering service that is managing peering connectivity for a\nservice provider organization.\nFor Google services that support this functionality it is\n'services/servicenetworking.googleapis.com'.\nFor \"-\" all configured public peering services will be queried.",
+ // "description": "The service that is managing peering connectivity for a service producer's\norganization. For Google services that support this functionality, this\nvalue is `services/servicenetworking.googleapis.com`.\nIf you specify `-` as the parameter value, all configured public peering\nservices are listed.",
// "location": "path",
// "pattern": "^services/[^/]+$",
// "required": true,
diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json
index 44903d3..a5a3704 100644
--- a/serviceusage/v1/serviceusage-api.json
+++ b/serviceusage/v1/serviceusage-api.json
@@ -393,7 +393,7 @@
}
}
},
- "revision": "20181105",
+ "revision": "20181207",
"rootUrl": "https://serviceusage.googleapis.com/",
"schemas": {
"Api": {
@@ -457,7 +457,7 @@
"type": "string"
},
"authorizationUrl": {
- "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
+ "description": "Redirect URL if JWT token is required but not present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
"type": "string"
},
"id": {
diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go
index 8807d21..418bc40 100644
--- a/serviceusage/v1/serviceusage-gen.go
+++ b/serviceusage/v1/serviceusage-gen.go
@@ -233,7 +233,7 @@
// bookstore_web.apps.googleusercontent.com
Audiences string `json:"audiences,omitempty"`
- // AuthorizationUrl: Redirect URL if JWT token is required but no
+ // AuthorizationUrl: Redirect URL if JWT token is required but not
// present or is expired.
// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
AuthorizationUrl string `json:"authorizationUrl,omitempty"`
diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json
index 4df4326..d974227 100644
--- a/serviceusage/v1beta1/serviceusage-api.json
+++ b/serviceusage/v1beta1/serviceusage-api.json
@@ -338,7 +338,7 @@
}
}
},
- "revision": "20181105",
+ "revision": "20181207",
"rootUrl": "https://serviceusage.googleapis.com/",
"schemas": {
"Api": {
@@ -402,7 +402,7 @@
"type": "string"
},
"authorizationUrl": {
- "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
+ "description": "Redirect URL if JWT token is required but not present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.",
"type": "string"
},
"id": {
diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go
index c27616f..99e2ac0 100644
--- a/serviceusage/v1beta1/serviceusage-gen.go
+++ b/serviceusage/v1beta1/serviceusage-gen.go
@@ -233,7 +233,7 @@
// bookstore_web.apps.googleusercontent.com
Audiences string `json:"audiences,omitempty"`
- // AuthorizationUrl: Redirect URL if JWT token is required but no
+ // AuthorizationUrl: Redirect URL if JWT token is required but not
// present or is expired.
// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
AuthorizationUrl string `json:"authorizationUrl,omitempty"`
diff --git a/speech/v1/speech-api.json b/speech/v1/speech-api.json
index 272f3af..67997d2 100644
--- a/speech/v1/speech-api.json
+++ b/speech/v1/speech-api.json
@@ -118,7 +118,7 @@
"name": {
"description": "The name of the operation resource.",
"location": "path",
- "pattern": "^[^/]+$",
+ "pattern": "^.+$",
"required": true,
"type": "string"
}
@@ -211,7 +211,7 @@
}
}
},
- "revision": "20180914",
+ "revision": "20181207",
"rootUrl": "https://speech.googleapis.com/",
"schemas": {
"ListOperationsResponse": {
@@ -232,6 +232,28 @@
},
"type": "object"
},
+ "LongRunningRecognizeMetadata": {
+ "description": "Describes the progress of a long-running `LongRunningRecognize` call. It is\nincluded in the `metadata` field of the `Operation` returned by the\n`GetOperation` call of the `google::longrunning::Operations` service.",
+ "id": "LongRunningRecognizeMetadata",
+ "properties": {
+ "lastUpdateTime": {
+ "description": "Time of the most recent processing update.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "progressPercent": {
+ "description": "Approximate percentage of audio processed thus far. Guaranteed to be 100\nwhen the audio is fully processed and the results are available.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "startTime": {
+ "description": "Time when the request was received.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"LongRunningRecognizeRequest": {
"description": "The top-level message sent by the client for the `LongRunningRecognize`\nmethod.",
"id": "LongRunningRecognizeRequest",
@@ -247,6 +269,20 @@
},
"type": "object"
},
+ "LongRunningRecognizeResponse": {
+ "description": "The only message returned to the client by the `LongRunningRecognize` method.\nIt contains the result as zero or more sequential `SpeechRecognitionResult`\nmessages. It is included in the `result.response` field of the `Operation`\nreturned by the `GetOperation` call of the `google::longrunning::Operations`\nservice.",
+ "id": "LongRunningRecognizeResponse",
+ "properties": {
+ "results": {
+ "description": "Output only. Sequential list of transcription results corresponding to\nsequential portions of audio.",
+ "items": {
+ "$ref": "SpeechRecognitionResult"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
"Operation": {
"description": "This resource represents a long-running operation that is the result of a\nnetwork API call.",
"id": "Operation",
@@ -486,11 +522,6 @@
"format": "google-duration",
"type": "string"
},
- "speakerTag": {
- "description": "Output only. A distinct integer value is assigned for every speaker within\nthe audio. This field specifies which one of those speakers was detected to\nhave spoken this word. Value ranges from '1' to diarization_speaker_count.\nspeaker_tag is set if enable_speaker_diarization = 'true' and only in the\ntop alternative.",
- "format": "int32",
- "type": "integer"
- },
"startTime": {
"description": "Output only. Time offset relative to the beginning of the audio,\nand corresponding to the start of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.",
"format": "google-duration",
diff --git a/speech/v1/speech-gen.go b/speech/v1/speech-gen.go
index 50c97e6..e812ad2 100644
--- a/speech/v1/speech-gen.go
+++ b/speech/v1/speech-gen.go
@@ -140,6 +140,47 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// LongRunningRecognizeMetadata: Describes the progress of a
+// long-running `LongRunningRecognize` call. It is
+// included in the `metadata` field of the `Operation` returned by
+// the
+// `GetOperation` call of the `google::longrunning::Operations` service.
+type LongRunningRecognizeMetadata struct {
+ // LastUpdateTime: Time of the most recent processing update.
+ LastUpdateTime string `json:"lastUpdateTime,omitempty"`
+
+ // ProgressPercent: Approximate percentage of audio processed thus far.
+ // Guaranteed to be 100
+ // when the audio is fully processed and the results are available.
+ ProgressPercent int64 `json:"progressPercent,omitempty"`
+
+ // StartTime: Time when the request was received.
+ StartTime string `json:"startTime,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "LastUpdateTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "LastUpdateTime") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LongRunningRecognizeMetadata) MarshalJSON() ([]byte, error) {
+ type NoMethod LongRunningRecognizeMetadata
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// LongRunningRecognizeRequest: The top-level message sent by the client
// for the `LongRunningRecognize`
// method.
@@ -175,6 +216,44 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// LongRunningRecognizeResponse: The only message returned to the client
+// by the `LongRunningRecognize` method.
+// It contains the result as zero or more sequential
+// `SpeechRecognitionResult`
+// messages. It is included in the `result.response` field of the
+// `Operation`
+// returned by the `GetOperation` call of the
+// `google::longrunning::Operations`
+// service.
+type LongRunningRecognizeResponse struct {
+ // Results: Output only. Sequential list of transcription results
+ // corresponding to
+ // sequential portions of audio.
+ Results []*SpeechRecognitionResult `json:"results,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Results") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Results") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *LongRunningRecognizeResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LongRunningRecognizeResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Operation: This resource represents a long-running operation that is
// the result of a
// network API call.
@@ -863,17 +942,6 @@
// vary.
EndTime string `json:"endTime,omitempty"`
- // SpeakerTag: Output only. A distinct integer value is assigned for
- // every speaker within
- // the audio. This field specifies which one of those speakers was
- // detected to
- // have spoken this word. Value ranges from '1' to
- // diarization_speaker_count.
- // speaker_tag is set if enable_speaker_diarization = 'true' and only in
- // the
- // top alternative.
- SpeakerTag int64 `json:"speakerTag,omitempty"`
-
// StartTime: Output only. Time offset relative to the beginning of the
// audio,
// and corresponding to the start of the spoken word.
@@ -1041,7 +1109,7 @@
// "name": {
// "description": "The name of the operation resource.",
// "location": "path",
- // "pattern": "^[^/]+$",
+ // "pattern": "^.+$",
// "required": true,
// "type": "string"
// }
diff --git a/speech/v1p1beta1/speech-api.json b/speech/v1p1beta1/speech-api.json
index 4127f42..00f8bc9 100644
--- a/speech/v1p1beta1/speech-api.json
+++ b/speech/v1p1beta1/speech-api.json
@@ -118,7 +118,7 @@
"name": {
"description": "The name of the operation resource.",
"location": "path",
- "pattern": "^[^/]+$",
+ "pattern": "^.+$",
"required": true,
"type": "string"
}
@@ -130,313 +130,43 @@
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
- }
- }
- },
- "projects": {
- "resources": {
- "locations": {
- "resources": {
- "datasets": {
- "methods": {
- "create": {
- "description": "Performs asynchronous data upload for AutoML: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains\na `Dataset` message.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets",
- "httpMethod": "POST",
- "id": "speech.projects.locations.datasets.create",
- "parameterOrder": [
- "parent"
- ],
- "parameters": {
- "parent": {
- "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+parent}/datasets",
- "request": {
- "$ref": "Dataset"
- },
- "response": {
- "$ref": "Operation"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- },
- "get": {
- "description": "Get the dataset associated with the dataset resource.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
- "httpMethod": "GET",
- "id": "speech.projects.locations.datasets.get",
- "parameterOrder": [
- "name"
- ],
- "parameters": {
- "includeModelInfo": {
- "description": "If true then also include information about the models built using this\ndataset.",
- "location": "query",
- "type": "boolean"
- },
- "name": {
- "description": "The resource name of the dataset to retrieve. Form :-\n'/projects/{project_number}/locations/{location_id}/datasets/{dataset_id}'",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+name}",
- "response": {
- "$ref": "Dataset"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- },
- "list": {
- "description": "Fetch the list of dataset associated with this project.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets",
- "httpMethod": "GET",
- "id": "speech.projects.locations.datasets.list",
- "parameterOrder": [
- "parent"
- ],
- "parameters": {
- "filter": {
- "description": "Filter the response based on display_name of the dataset. For e.g\ndisplay_name=Foo The filter string is case sensitive",
- "location": "query",
- "type": "string"
- },
- "includeModelInfo": {
- "description": "If true then also include information about the models built using the\ndatasets.",
- "location": "query",
- "type": "boolean"
- },
- "pageSize": {
- "description": "The maximum number of items to return.",
- "format": "int32",
- "location": "query",
- "type": "integer"
- },
- "pageToken": {
- "description": "The next_page_token value returned from a previous List request, if any.",
- "location": "query",
- "type": "string"
- },
- "parent": {
- "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+parent}/datasets",
- "response": {
- "$ref": "ListDatasetsResponse"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- },
- "refreshData": {
- "description": "Refresh data for a dataset.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:refreshData",
- "httpMethod": "POST",
- "id": "speech.projects.locations.datasets.refreshData",
- "parameterOrder": [
- "name"
- ],
- "parameters": {
- "name": {
- "description": "The resource name of the destination dataset.",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+name}:refreshData",
- "request": {
- "$ref": "RefreshDataRequest"
- },
- "response": {
- "$ref": "Operation"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- }
- }
+ },
+ "list": {
+ "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
+ "flatPath": "v1p1beta1/operations",
+ "httpMethod": "GET",
+ "id": "speech.operations.list",
+ "parameterOrder": [],
+ "parameters": {
+ "filter": {
+ "description": "The standard list filter.",
+ "location": "query",
+ "type": "string"
},
- "log_data_stats": {
- "methods": {
- "list": {
- "description": "List all log data stats associated with this project.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/log_data_stats",
- "httpMethod": "GET",
- "id": "speech.projects.locations.log_data_stats.list",
- "parameterOrder": [
- "parent"
- ],
- "parameters": {
- "parent": {
- "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+parent}/log_data_stats",
- "response": {
- "$ref": "ListLogDataStatsResponse"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- }
- }
+ "name": {
+ "description": "The name of the operation's parent resource.",
+ "location": "query",
+ "type": "string"
},
- "models": {
- "methods": {
- "create": {
- "description": "Performs asynchronous model training for AutoML: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains a `Model`\nmessage.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models",
- "httpMethod": "POST",
- "id": "speech.projects.locations.models.create",
- "parameterOrder": [
- "parent"
- ],
- "parameters": {
- "name": {
- "description": "Required. Resource name of the dataset being used to create the model.\n'/projects/{project_id}/locations/{location_id}/datasets/{dataset_id}'",
- "location": "query",
- "type": "string"
- },
- "parent": {
- "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+parent}/models",
- "request": {
- "$ref": "Model"
- },
- "response": {
- "$ref": "Operation"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- },
- "deploy": {
- "description": "Performs asynchronous model deployment of the model: receive results\nvia the google.longrunning.Operations interface. After the operation is\ncompleted this returns either an `Operation.error` in case of error or\na `google.protobuf.Empty` if the deployment was successful.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models/{modelsId}:deploy",
- "httpMethod": "POST",
- "id": "speech.projects.locations.models.deploy",
- "parameterOrder": [
- "name"
- ],
- "parameters": {
- "name": {
- "description": "Resource name of the model.\nFormat: \"projects/{project_id}/locations/{location_id}/models/{model_id}\"",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+/models/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+name}:deploy",
- "request": {
- "$ref": "DeployModelRequest"
- },
- "response": {
- "$ref": "Operation"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- },
- "evaluate": {
- "description": "Performs asynchronous evaluation of the model: receive results\nvia the google.longrunning.Operations interface. After the operation is\ncompleted this returns either an `Operation.error` in case of error or\na `EvaluateModelResponse` with the evaluation results.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models/{modelsId}:evaluate",
- "httpMethod": "POST",
- "id": "speech.projects.locations.models.evaluate",
- "parameterOrder": [
- "name"
- ],
- "parameters": {
- "name": {
- "description": "Resource name of the model.\nFormat: \"projects/{project_id}/locations/{location_id}/models/{model_id}\"",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+/models/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+name}:evaluate",
- "request": {
- "$ref": "EvaluateModelRequest"
- },
- "response": {
- "$ref": "Operation"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- },
- "list": {
- "description": "Fetch the list of models associated with this project.",
- "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models",
- "httpMethod": "GET",
- "id": "speech.projects.locations.models.list",
- "parameterOrder": [
- "parent"
- ],
- "parameters": {
- "filter": {
- "description": "Filter the response based on display_name of the model. For e.g\ndisplay_name=Foo The filter string is case sensitive",
- "location": "query",
- "type": "string"
- },
- "pageSize": {
- "description": "The maximum number of items to return.",
- "format": "int32",
- "location": "query",
- "type": "integer"
- },
- "pageToken": {
- "description": "The next_page_token value returned from a previous List request, if any.",
- "location": "query",
- "type": "string"
- },
- "parent": {
- "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- "location": "path",
- "pattern": "^projects/[^/]+/locations/[^/]+$",
- "required": true,
- "type": "string"
- }
- },
- "path": "v1p1beta1/{+parent}/models",
- "response": {
- "$ref": "ListModelsResponse"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform"
- ]
- }
- }
+ "pageSize": {
+ "description": "The standard list page size.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "pageToken": {
+ "description": "The standard list page token.",
+ "location": "query",
+ "type": "string"
}
- }
+ },
+ "path": "v1p1beta1/operations",
+ "response": {
+ "$ref": "ListOperationsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
}
}
},
@@ -481,248 +211,45 @@
}
}
},
- "revision": "20181107",
+ "revision": "20181207",
"rootUrl": "https://speech.googleapis.com/",
"schemas": {
- "DataErrors": {
- "description": "Different types of dataset errors and the stats associated with each error.",
- "id": "DataErrors",
+ "ListOperationsResponse": {
+ "description": "The response message for Operations.ListOperations.",
+ "id": "ListOperationsResponse",
"properties": {
- "count": {
- "description": "Number of records having errors associated with the enum.",
- "format": "int32",
- "type": "integer"
- },
- "errorType": {
- "description": "Type of the error.",
- "enum": [
- "ERROR_TYPE_UNSPECIFIED",
- "UNSUPPORTED_AUDIO_FORMAT",
- "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT",
- "FILE_TOO_LARGE"
- ],
- "enumDescriptions": [
- "Not specified.",
- "Audio format not in the formats supported by the cloud speech API",
- "File format different from what is specified in the file name extension",
- "File too large. Maximum allowed size is 50 MB."
- ],
+ "nextPageToken": {
+ "description": "The standard List next-page token.",
"type": "string"
+ },
+ "operations": {
+ "description": "A list of operations that matches the specified filter in the request.",
+ "items": {
+ "$ref": "Operation"
+ },
+ "type": "array"
}
},
"type": "object"
},
- "DataStats": {
- "description": "Contains stats about the data which was uploaded and preprocessed to be\nuse by downstream pipelines like training, evals pipelines.",
- "id": "DataStats",
+ "LongRunningRecognizeMetadata": {
+ "description": "Describes the progress of a long-running `LongRunningRecognize` call. It is\nincluded in the `metadata` field of the `Operation` returned by the\n`GetOperation` call of the `google::longrunning::Operations` service.",
+ "id": "LongRunningRecognizeMetadata",
"properties": {
- "dataErrors": {
- "description": "Different types of data errors and the counts associated with them.",
- "items": {
- "$ref": "DataErrors"
- },
- "type": "array"
- },
- "testExampleCount": {
- "description": "The number of examples used for testing.",
- "format": "int32",
- "type": "integer"
- },
- "trainingExampleCount": {
- "description": "The number of examples used for training.",
- "format": "int32",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "Dataset": {
- "description": "Specifies the parameters needed for creating a dataset. In addition this\nis also the message returned to the client by the `CreateDataset` method.\nIt is included in the `result.response` field of the `Operation`\nreturned by the `GetOperation` call of the `google::longrunning::Operations`\nservice.",
- "id": "Dataset",
- "properties": {
- "blockingOperationIds": {
- "description": "Output only. All the blocking operations associated with this dataset.\nLike (pre-processing, training-model, testing-model)",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "bucketName": {
- "description": "If set, the log data to be used in this dataset is restricted to the\nbucket specified. This field is only applicable if use_logged_data is true.\nIf use_logged_data is true, but this field is not set, then all logs will\nbe used for training the models. See: RecognitionMetadata for information\non setting up data logs.",
- "type": "string"
- },
- "createTime": {
- "description": "Output only. The timestamp this dataset is created.",
+ "lastUpdateTime": {
+ "description": "Time of the most recent processing update.",
"format": "google-datetime",
"type": "string"
},
- "dataProcessingRegion": {
- "description": "Location where the data should be processed. If not specified then we will\npick a location on behalf of the user for storing and processing the data.\nCurrently only us-central is supported.",
- "type": "string"
+ "progressPercent": {
+ "description": "Approximate percentage of audio processed thus far. Guaranteed to be 100\nwhen the audio is fully processed and the results are available.",
+ "format": "int32",
+ "type": "integer"
},
- "dataStats": {
- "$ref": "DataStats",
- "description": "Output only. Stats assoiated with the data."
- },
- "displayName": {
- "description": "Required. Name of the data set for display.",
- "type": "string"
- },
- "hasSufficientData": {
- "description": "Output only. True if the data is sufficient to create custom models.",
- "type": "boolean"
- },
- "languageCode": {
- "description": "Required. The language of the supplied audio as a\n[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.\nExample: \"en-US\".\nSee [Language Support](/speech-to-text/docs/languages)\nfor a list of the currently supported language codes.",
- "type": "string"
- },
- "models": {
- "description": "All the models (including models pending training) built using the dataset.",
- "items": {
- "$ref": "Model"
- },
- "type": "array"
- },
- "name": {
- "description": "Output only. Resource name of the dataset. Form :-\n'/projects/{project_number}/locations/{location_id}/datasets/{dataset_id}'",
- "type": "string"
- },
- "updateTime": {
- "description": "Output only. The timestamp this dataset is last updated.",
+ "startTime": {
+ "description": "Time when the request was received.",
"format": "google-datetime",
"type": "string"
- },
- "uri": {
- "description": "URI that points to a file in csv file where each row has following format.\n\u003cgs_path_to_audio\u003e,\u003cgs_path_to_transcript\u003e,\u003clabel\u003e\nlabel can be HUMAN_TRANSCRIBED or MACHINE_TRANSCRIBED. To be valid, rows\nmust do the following:\n1. Each row must have at least a label and \u003cgs_path_to_transcript\u003e\n2. If a row is marked HUMAN_TRANSCRIBED, then you must specify both\n\u003cgs_path_to_audio\u003e and \u003cgs_path_to_transcript\u003e. Only WAV file formats\nwhich encode linear 16-bit pulse-code modulation (PCM) audio format are\nsupported. The maximum audio file size is 50 MB. Also note that the audio\nhas to be single channel audio.\n3. There has to be at least 500 rows labelled HUMAN_TRANSCRIBED covering\nat least ~10K words in order to get reliable word error rate results.\n4. To create a language model, you should provide at least 100,000 words\nin your transcriptions as training data if you have conversational and\ncaptions type of data. You should provide at least 10,000 words if you\nhave short utterances like voice commands and search type of use cases.\nCurrently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats will be ignored).\nFor more information, see\n[Request URIs](/storage/docs/reference-uris).",
- "type": "string"
- },
- "useLoggedData": {
- "description": "If this is true, then use the previously logged data (for the project)\nThe logs data for this project will be preprocessed and prepared for\ndownstream pipelines (like training)",
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "DeployModelRequest": {
- "description": "Message sent by the client for the `DeployModel` method.",
- "id": "DeployModelRequest",
- "properties": {},
- "type": "object"
- },
- "EvaluateModelRequest": {
- "description": "Message sent by the client for the `EvaluateModel` method.",
- "id": "EvaluateModelRequest",
- "properties": {},
- "type": "object"
- },
- "EvaluateModelResponse": {
- "description": "The only message returned to the client by the `EvaluateModel` method. This\nis also returned as part of the Dataset message returned to the client by\nthe CreateDataset method. It is included in the `result.response` field of\nthe `Operation` returned by the `GetOperation` call of the\n`google::longrunning::Operations` service.",
- "id": "EvaluateModelResponse",
- "properties": {
- "isEnhancedModel": {
- "description": "If true then it means we are referring to the results of an enhanced\nversion of the model_type. Currently only PHONE_CALL model_type has an\nenhanced version.",
- "type": "boolean"
- },
- "modelType": {
- "description": "Required. The type of model used in this evaluation.",
- "enum": [
- "MODEL_TYPE_UNSPECIFIED",
- "DEFAULT",
- "COMMAND_AND_SEARCH",
- "PHONE_CALL",
- "VIDEO"
- ],
- "enumDescriptions": [
- "",
- "Model for audio that is not one of the specific models below. This is\na generic model and can be used in various scenarios but is not\nnecessarily the best in any particular scenario.",
- "Model for audio from short queries like voice commands or voice search",
- "Model for phone call conversation type op audio.",
- "Model for audio that originated from from video or includes multiple\nspeakers."
- ],
- "type": "string"
- },
- "wordCount": {
- "description": "Number of words used in the word_error_rate computation.",
- "format": "int32",
- "type": "integer"
- },
- "wordErrorRate": {
- "description": "Word error rate metric computed on the test set using the AutoML model.",
- "format": "float",
- "type": "number"
- }
- },
- "type": "object"
- },
- "ListDatasetsResponse": {
- "id": "ListDatasetsResponse",
- "properties": {
- "datasets": {
- "description": "Repeated list of data sets containing details about each data set.",
- "items": {
- "$ref": "Dataset"
- },
- "type": "array"
- },
- "nextPageToken": {
- "description": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "ListLogDataStatsResponse": {
- "description": "Message received by the client for the `ListLogDataStats` method.",
- "id": "ListLogDataStatsResponse",
- "properties": {
- "logDataEnabled": {
- "description": "Output only. True if user has opted in for log data collection.",
- "type": "boolean"
- },
- "logDataStats": {
- "description": "The stats for each bucket.",
- "items": {
- "$ref": "LogBucketStats"
- },
- "type": "array"
- },
- "totalCount": {
- "description": "The overall count for log data (including all bucket data).",
- "format": "int32",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "ListModelsResponse": {
- "id": "ListModelsResponse",
- "properties": {
- "models": {
- "description": "Repeated list of models containing details about each model.",
- "items": {
- "$ref": "Model"
- },
- "type": "array"
- },
- "nextPageToken": {
- "description": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "LogBucketStats": {
- "description": "Stats for log data within a bucket.",
- "id": "LogBucketStats",
- "properties": {
- "bucketName": {
- "description": "The display name for the bucket in which logs are collected.",
- "type": "string"
- },
- "count": {
- "description": "Number of audio samples that have been collected in this bucket.",
- "format": "int32",
- "type": "integer"
}
},
"type": "object"
@@ -742,43 +269,16 @@
},
"type": "object"
},
- "Model": {
- "description": "Specifies the model parameters needed for training a model. In addition this\nis also the message returned to the client by the `CreateModel` method.\nIt is included in the `result.response` field of the `Operation`\nreturned by the `GetOperation` call of the `google::longrunning::Operations`\nservice.",
- "id": "Model",
+ "LongRunningRecognizeResponse": {
+ "description": "The only message returned to the client by the `LongRunningRecognize` method.\nIt contains the result as zero or more sequential `SpeechRecognitionResult`\nmessages. It is included in the `result.response` field of the `Operation`\nreturned by the `GetOperation` call of the `google::longrunning::Operations`\nservice.",
+ "id": "LongRunningRecognizeResponse",
"properties": {
- "createTime": {
- "description": "Output only. Timestamp when this model was created.",
- "format": "google-datetime",
- "type": "string"
- },
- "displayName": {
- "description": "Required. Display name of the model to be trained.",
- "type": "string"
- },
- "evaluateModelResponses": {
- "description": "Output only. Evaluation results associated with this model. A model can\ncontain multiple sub-models in which case the evaluation results for\nall of those are available. If there are no sub models then there would\nbe just a single EvaluateModelResponse.",
+ "results": {
+ "description": "Output only. Sequential list of transcription results corresponding to\nsequential portions of audio.",
"items": {
- "$ref": "EvaluateModelResponse"
+ "$ref": "SpeechRecognitionResult"
},
"type": "array"
- },
- "name": {
- "description": "Output only. Resource name of the model.\nFormat: \"projects/{project_id}/locations/{location_id}/models/{model_id}\"",
- "type": "string"
- },
- "trainingType": {
- "description": "Required. Type of the training to perform.",
- "enum": [
- "TRAINING_TYPE_UNSPECIFIED",
- "CUSTOM_ADAPTATION_LANGUAGE_MODEL",
- "PREBUILT_MODEL"
- ],
- "enumDescriptions": [
- "",
- "Build adaptation language model based on the users data. These models are\nbuilt on top of the existing prebuilt models (like phone_call, video\netc.).",
- "Output only. This is set to indicate that the model we are talking about\nis a prebuilt model (for e.g in the context of evaluations)."
- ],
- "type": "string"
}
},
"type": "object"
@@ -850,8 +350,12 @@
"format": "int32",
"type": "integer"
},
+ "diarizationConfig": {
+ "$ref": "SpeakerDiarizationConfig",
+ "description": "*Optional* Config to enable speaker diarization and set additional\nparameters to make diarization better suited for your application.\nNote: When this is enabled, we send all the words from the beginning of the\naudio for the top alternative in every consecutive STREAMING responses.\nThis is done in order to improve our speaker tags as our models learn to\nidentify the speakers in the conversation over time.\nFor non-streaming requests, the diarization results will be provided only\nin the top alternative of the FINAL SpeechRecognitionResult."
+ },
"diarizationSpeakerCount": {
- "description": "*Optional*\nIf set, specifies the estimated number of speakers in the conversation.\nIf not set, defaults to '2'.\nIgnored unless enable_speaker_diarization is set to true.\"",
+ "description": "*Optional*\nIf set, specifies the estimated number of speakers in the conversation.\nIf not set, defaults to '2'.\nIgnored unless enable_speaker_diarization is set to true.\"\nNote: Use diarization_config instead. This field will be DEPRECATED soon.",
"format": "int32",
"type": "integer"
},
@@ -864,7 +368,7 @@
"type": "boolean"
},
"enableSpeakerDiarization": {
- "description": "*Optional* If 'true', enables speaker detection for each recognized word in\nthe top alternative of the recognition result using a speaker_tag provided\nin the WordInfo.\nNote: When this is true, we send all the words from the beginning of the\naudio for the top alternative in every consecutive STREAMING responses.\nThis is done in order to improve our speaker tags as our models learn to\nidentify the speakers in the conversation over time.\nFor non-streaming requests, the diarization results will be provided only\nin the top alternative of the FINAL SpeechRecognitionResult.",
+ "description": "*Optional* If 'true', enables speaker detection for each recognized word in\nthe top alternative of the recognition result using a speaker_tag provided\nin the WordInfo.\nNote: Use diarization_config instead. This field will be DEPRECATED soon.",
"type": "boolean"
},
"enableWordConfidence": {
@@ -1042,13 +546,6 @@
"Speech was recorded indoors."
],
"type": "string"
- },
- "tags": {
- "description": "A freeform field to tag this input sample with. This can be used for\ngrouping the logs into separate buckets. This enables selective purging of\ndata based on the tags, and also for training models in AutoML.",
- "items": {
- "type": "string"
- },
- "type": "array"
}
},
"type": "object"
@@ -1082,13 +579,22 @@
},
"type": "object"
},
- "RefreshDataRequest": {
- "description": "Message sent by the client to refresh data in a existing dataset.",
- "id": "RefreshDataRequest",
+ "SpeakerDiarizationConfig": {
+ "id": "SpeakerDiarizationConfig",
"properties": {
- "uri": {
- "description": "URI that points to a file in csv file where each row has following format.\n\u003cgs_path_to_audio\u003e,\u003cgs_path_to_transcript\u003e,\u003clabel\u003e\nlabel can be HUMAN_TRANSCRIBED or MACHINE_TRANSCRIBED. Few rules for a row\nto be considered valid are :-\n1. Each row must have at least a label and \u003cgs_path_to_transcript\u003e\n2. If a row is marked HUMAN_TRANSCRIBED, then both \u003cgs_path_to_audio\u003e\nand \u003cgs_path_to_transcript\u003e needs to be specified.\n3. There has to be minimum 500 number of rows labelled HUMAN_TRANSCRIBED if\nevaluation stats are required.\n4. If use_logged_data_for_training is set to true, then we ignore the rows\nlabelled as MACHINE_TRANSCRIBED.\n5. There has to be minimum 100,000 words in the transcripts in order to\nprovide sufficient textual training data for the language model.\nCurrently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats will be ignored).\nFor more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).",
- "type": "string"
+ "enableSpeakerDiarization": {
+ "description": "*Optional* If 'true', enables speaker detection for each recognized word in\nthe top alternative of the recognition result using a speaker_tag provided\nin the WordInfo.",
+ "type": "boolean"
+ },
+ "maxSpeakerCount": {
+ "description": "*Optional* Only used if diarization_speaker_count is not set.\nMaximum number of speakers in the conversation. This range gives you more\nflexibility by allowing the system to automatically determine the correct\nnumber of speakers. If not set, the default value is 6.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "minSpeakerCount": {
+ "description": "*Optional* Only used if diarization_speaker_count is not set.\nMinimum number of speakers in the conversation. This range gives you more\nflexibility by allowing the system to automatically determine the correct\nnumber of speakers. If not set, the default value is 2.",
+ "format": "int32",
+ "type": "integer"
}
},
"type": "object"
@@ -1103,22 +609,6 @@
"type": "string"
},
"type": "array"
- },
- "strength": {
- "description": "Hint strength to use (high, medium or low). If you use a high strength then\nyou are more likely to see those phrases in the results. If strength is not\nspecified then by default medium strength will be used. If you'd like\ndifferent phrases to have different strengths, you can specify multiple\nspeech_contexts.",
- "enum": [
- "STRENGTH_UNSPECIFIED",
- "LOW",
- "MEDIUM",
- "HIGH"
- ],
- "enumDescriptions": [
- "",
- "Low strength",
- "Medium strength",
- "High strength"
- ],
- "type": "string"
}
},
"type": "object"
diff --git a/speech/v1p1beta1/speech-gen.go b/speech/v1p1beta1/speech-gen.go
index 6ea13c7..12e5c09 100644
--- a/speech/v1p1beta1/speech-gen.go
+++ b/speech/v1p1beta1/speech-gen.go
@@ -64,7 +64,6 @@
}
s := &Service{client: client, BasePath: basePath}
s.Operations = NewOperationsService(s)
- s.Projects = NewProjectsService(s)
s.Speech = NewSpeechService(s)
return s, nil
}
@@ -76,8 +75,6 @@
Operations *OperationsService
- Projects *ProjectsService
-
Speech *SpeechService
}
@@ -97,63 +94,6 @@
s *Service
}
-func NewProjectsService(s *Service) *ProjectsService {
- rs := &ProjectsService{s: s}
- rs.Locations = NewProjectsLocationsService(s)
- return rs
-}
-
-type ProjectsService struct {
- s *Service
-
- Locations *ProjectsLocationsService
-}
-
-func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
- rs := &ProjectsLocationsService{s: s}
- rs.Datasets = NewProjectsLocationsDatasetsService(s)
- rs.LogDataStats = NewProjectsLocationsLogDataStatsService(s)
- rs.Models = NewProjectsLocationsModelsService(s)
- return rs
-}
-
-type ProjectsLocationsService struct {
- s *Service
-
- Datasets *ProjectsLocationsDatasetsService
-
- LogDataStats *ProjectsLocationsLogDataStatsService
-
- Models *ProjectsLocationsModelsService
-}
-
-func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService {
- rs := &ProjectsLocationsDatasetsService{s: s}
- return rs
-}
-
-type ProjectsLocationsDatasetsService struct {
- s *Service
-}
-
-func NewProjectsLocationsLogDataStatsService(s *Service) *ProjectsLocationsLogDataStatsService {
- rs := &ProjectsLocationsLogDataStatsService{s: s}
- return rs
-}
-
-type ProjectsLocationsLogDataStatsService struct {
- s *Service
-}
-
-func NewProjectsLocationsModelsService(s *Service) *ProjectsLocationsModelsService {
- rs := &ProjectsLocationsModelsService{s: s}
- return rs
-}
-
-type ProjectsLocationsModelsService struct {
- s *Service
-}
-
func NewSpeechService(s *Service) *SpeechService {
rs := &SpeechService{s: s}
return rs
@@ -163,277 +103,61 @@
s *Service
}
-// DataErrors: Different types of dataset errors and the stats
-// associated with each error.
-type DataErrors struct {
- // Count: Number of records having errors associated with the enum.
- Count int64 `json:"count,omitempty"`
+// ListOperationsResponse: The response message for
+// Operations.ListOperations.
+type ListOperationsResponse struct {
+ // NextPageToken: The standard List next-page token.
+ NextPageToken string `json:"nextPageToken,omitempty"`
- // ErrorType: Type of the error.
- //
- // Possible values:
- // "ERROR_TYPE_UNSPECIFIED" - Not specified.
- // "UNSUPPORTED_AUDIO_FORMAT" - Audio format not in the formats
- // supported by the cloud speech API
- // "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT" - File format different
- // from what is specified in the file name extension
- // "FILE_TOO_LARGE" - File too large. Maximum allowed size is 50 MB.
- ErrorType string `json:"errorType,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Count") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Count") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
-}
-
-func (s *DataErrors) MarshalJSON() ([]byte, error) {
- type NoMethod DataErrors
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
-// DataStats: Contains stats about the data which was uploaded and
-// preprocessed to be
-// use by downstream pipelines like training, evals pipelines.
-type DataStats struct {
- // DataErrors: Different types of data errors and the counts associated
- // with them.
- DataErrors []*DataErrors `json:"dataErrors,omitempty"`
-
- // TestExampleCount: The number of examples used for testing.
- TestExampleCount int64 `json:"testExampleCount,omitempty"`
-
- // TrainingExampleCount: The number of examples used for training.
- TrainingExampleCount int64 `json:"trainingExampleCount,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DataErrors") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DataErrors") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
-}
-
-func (s *DataStats) MarshalJSON() ([]byte, error) {
- type NoMethod DataStats
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
-// Dataset: Specifies the parameters needed for creating a dataset. In
-// addition this
-// is also the message returned to the client by the `CreateDataset`
-// method.
-// It is included in the `result.response` field of the
-// `Operation`
-// returned by the `GetOperation` call of the
-// `google::longrunning::Operations`
-// service.
-type Dataset struct {
- // BlockingOperationIds: Output only. All the blocking operations
- // associated with this dataset.
- // Like (pre-processing, training-model, testing-model)
- BlockingOperationIds []string `json:"blockingOperationIds,omitempty"`
-
- // BucketName: If set, the log data to be used in this dataset is
- // restricted to the
- // bucket specified. This field is only applicable if use_logged_data is
- // true.
- // If use_logged_data is true, but this field is not set, then all logs
- // will
- // be used for training the models. See: RecognitionMetadata for
- // information
- // on setting up data logs.
- BucketName string `json:"bucketName,omitempty"`
-
- // CreateTime: Output only. The timestamp this dataset is created.
- CreateTime string `json:"createTime,omitempty"`
-
- // DataProcessingRegion: Location where the data should be processed. If
- // not specified then we will
- // pick a location on behalf of the user for storing and processing the
- // data.
- // Currently only us-central is supported.
- DataProcessingRegion string `json:"dataProcessingRegion,omitempty"`
-
- // DataStats: Output only. Stats assoiated with the data.
- DataStats *DataStats `json:"dataStats,omitempty"`
-
- // DisplayName: Required. Name of the data set for display.
- DisplayName string `json:"displayName,omitempty"`
-
- // HasSufficientData: Output only. True if the data is sufficient to
- // create custom models.
- HasSufficientData bool `json:"hasSufficientData,omitempty"`
-
- // LanguageCode: Required. The language of the supplied audio as
- // a
- // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language
- // tag.
- // Example: "en-US".
- // See [Language Support](/speech-to-text/docs/languages)
- // for a list of the currently supported language codes.
- LanguageCode string `json:"languageCode,omitempty"`
-
- // Models: All the models (including models pending training) built
- // using the dataset.
- Models []*Model `json:"models,omitempty"`
-
- // Name: Output only. Resource name of the dataset. Form
- // :-
- // '/projects/{project_number}/locations/{location_id}/datasets/{datas
- // et_id}'
- Name string `json:"name,omitempty"`
-
- // UpdateTime: Output only. The timestamp this dataset is last updated.
- UpdateTime string `json:"updateTime,omitempty"`
-
- // Uri: URI that points to a file in csv file where each row has
- // following
- // format.
- // <gs_path_to_audio>,<gs_path_to_transcript>,<label>
- // label can be HUMAN_TRANSCRIBED or MACHINE_TRANSCRIBED. To be valid,
- // rows
- // must do the following:
- // 1. Each row must have at least a label and <gs_path_to_transcript>
- // 2. If a row is marked HUMAN_TRANSCRIBED, then you must specify
- // both
- // <gs_path_to_audio> and <gs_path_to_transcript>. Only WAV file
- // formats
- // which encode linear 16-bit pulse-code modulation (PCM) audio format
- // are
- // supported. The maximum audio file size is 50 MB. Also note that the
- // audio
- // has to be single channel audio.
- // 3. There has to be at least 500 rows labelled HUMAN_TRANSCRIBED
- // covering
- // at least ~10K words in order to get reliable word error rate
- // results.
- // 4. To create a language model, you should provide at least 100,000
- // words
- // in your transcriptions as training data if you have conversational
- // and
- // captions type of data. You should provide at least 10,000 words if
- // you
- // have short utterances like voice commands and search type of use
- // cases.
- // Currently, only Google Cloud Storage URIs are
- // supported, which must be specified in the following
- // format:
- // `gs://bucket_name/object_name` (other URI formats will be
- // ignored).
- // For more information, see
- // [Request URIs](/storage/docs/reference-uris).
- Uri string `json:"uri,omitempty"`
-
- // UseLoggedData: If this is true, then use the previously logged data
- // (for the project)
- // The logs data for this project will be preprocessed and prepared
- // for
- // downstream pipelines (like training)
- UseLoggedData bool `json:"useLoggedData,omitempty"`
+ // Operations: A list of operations that matches the specified filter in
+ // the request.
+ Operations []*Operation `json:"operations,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g.
- // "BlockingOperationIds") to unconditionally include in API requests.
- // By default, fields with empty values are omitted from API requests.
- // However, any non-pointer, non-interface field appearing in
- // ForceSendFields will be sent to the server regardless of whether the
- // field is empty or not. This may be used to include empty fields in
- // Patch requests.
+ // ForceSendFields is a list of field names (e.g. "NextPageToken") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "BlockingOperationIds") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
+ // NullFields is a list of field names (e.g. "NextPageToken") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
-func (s *Dataset) MarshalJSON() ([]byte, error) {
- type NoMethod Dataset
+func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListOperationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// DeployModelRequest: Message sent by the client for the `DeployModel`
-// method.
-type DeployModelRequest struct {
-}
-
-// EvaluateModelRequest: Message sent by the client for the
-// `EvaluateModel` method.
-type EvaluateModelRequest struct {
-}
-
-// EvaluateModelResponse: The only message returned to the client by the
-// `EvaluateModel` method. This
-// is also returned as part of the Dataset message returned to the
-// client by
-// the CreateDataset method. It is included in the `result.response`
-// field of
-// the `Operation` returned by the `GetOperation` call of
+// LongRunningRecognizeMetadata: Describes the progress of a
+// long-running `LongRunningRecognize` call. It is
+// included in the `metadata` field of the `Operation` returned by
// the
-// `google::longrunning::Operations` service.
-type EvaluateModelResponse struct {
- // IsEnhancedModel: If true then it means we are referring to the
- // results of an enhanced
- // version of the model_type. Currently only PHONE_CALL model_type has
- // an
- // enhanced version.
- IsEnhancedModel bool `json:"isEnhancedModel,omitempty"`
+// `GetOperation` call of the `google::longrunning::Operations` service.
+type LongRunningRecognizeMetadata struct {
+ // LastUpdateTime: Time of the most recent processing update.
+ LastUpdateTime string `json:"lastUpdateTime,omitempty"`
- // ModelType: Required. The type of model used in this evaluation.
- //
- // Possible values:
- // "MODEL_TYPE_UNSPECIFIED"
- // "DEFAULT" - Model for audio that is not one of the specific models
- // below. This is
- // a generic model and can be used in various scenarios but is
- // not
- // necessarily the best in any particular scenario.
- // "COMMAND_AND_SEARCH" - Model for audio from short queries like
- // voice commands or voice search
- // "PHONE_CALL" - Model for phone call conversation type op audio.
- // "VIDEO" - Model for audio that originated from from video or
- // includes multiple
- // speakers.
- ModelType string `json:"modelType,omitempty"`
+ // ProgressPercent: Approximate percentage of audio processed thus far.
+ // Guaranteed to be 100
+ // when the audio is fully processed and the results are available.
+ ProgressPercent int64 `json:"progressPercent,omitempty"`
- // WordCount: Number of words used in the word_error_rate computation.
- WordCount int64 `json:"wordCount,omitempty"`
+ // StartTime: Time when the request was received.
+ StartTime string `json:"startTime,omitempty"`
- // WordErrorRate: Word error rate metric computed on the test set using
- // the AutoML model.
- WordErrorRate float64 `json:"wordErrorRate,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "IsEnhancedModel") to
+ // ForceSendFields is a list of field names (e.g. "LastUpdateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
@@ -441,7 +165,7 @@
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "IsEnhancedModel") to
+ // NullFields is a list of field names (e.g. "LastUpdateTime") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
@@ -451,170 +175,8 @@
NullFields []string `json:"-"`
}
-func (s *EvaluateModelResponse) MarshalJSON() ([]byte, error) {
- type NoMethod EvaluateModelResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
-func (s *EvaluateModelResponse) UnmarshalJSON(data []byte) error {
- type NoMethod EvaluateModelResponse
- var s1 struct {
- WordErrorRate gensupport.JSONFloat64 `json:"wordErrorRate"`
- *NoMethod
- }
- s1.NoMethod = (*NoMethod)(s)
- if err := json.Unmarshal(data, &s1); err != nil {
- return err
- }
- s.WordErrorRate = float64(s1.WordErrorRate)
- return nil
-}
-
-type ListDatasetsResponse struct {
- // Datasets: Repeated list of data sets containing details about each
- // data set.
- Datasets []*Dataset `json:"datasets,omitempty"`
-
- // NextPageToken: Token to retrieve the next page of results, or empty
- // if there are no
- // more results in the list.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Datasets") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Datasets") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
-}
-
-func (s *ListDatasetsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListDatasetsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
-// ListLogDataStatsResponse: Message received by the client for the
-// `ListLogDataStats` method.
-type ListLogDataStatsResponse struct {
- // LogDataEnabled: Output only. True if user has opted in for log data
- // collection.
- LogDataEnabled bool `json:"logDataEnabled,omitempty"`
-
- // LogDataStats: The stats for each bucket.
- LogDataStats []*LogBucketStats `json:"logDataStats,omitempty"`
-
- // TotalCount: The overall count for log data (including all bucket
- // data).
- TotalCount int64 `json:"totalCount,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "LogDataEnabled") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "LogDataEnabled") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
-}
-
-func (s *ListLogDataStatsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListLogDataStatsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
-type ListModelsResponse struct {
- // Models: Repeated list of models containing details about each model.
- Models []*Model `json:"models,omitempty"`
-
- // NextPageToken: Token to retrieve the next page of results, or empty
- // if there are no
- // more results in the list.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Models") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Models") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
-}
-
-func (s *ListModelsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListModelsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
-}
-
-// LogBucketStats: Stats for log data within a bucket.
-type LogBucketStats struct {
- // BucketName: The display name for the bucket in which logs are
- // collected.
- BucketName string `json:"bucketName,omitempty"`
-
- // Count: Number of audio samples that have been collected in this
- // bucket.
- Count int64 `json:"count,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "BucketName") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "BucketName") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
-}
-
-func (s *LogBucketStats) MarshalJSON() ([]byte, error) {
- type NoMethod LogBucketStats
+func (s *LongRunningRecognizeMetadata) MarshalJSON() ([]byte, error) {
+ type NoMethod LongRunningRecognizeMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -654,51 +216,22 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// Model: Specifies the model parameters needed for training a model. In
-// addition this
-// is also the message returned to the client by the `CreateModel`
-// method.
-// It is included in the `result.response` field of the
+// LongRunningRecognizeResponse: The only message returned to the client
+// by the `LongRunningRecognize` method.
+// It contains the result as zero or more sequential
+// `SpeechRecognitionResult`
+// messages. It is included in the `result.response` field of the
// `Operation`
// returned by the `GetOperation` call of the
// `google::longrunning::Operations`
// service.
-type Model struct {
- // CreateTime: Output only. Timestamp when this model was created.
- CreateTime string `json:"createTime,omitempty"`
+type LongRunningRecognizeResponse struct {
+ // Results: Output only. Sequential list of transcription results
+ // corresponding to
+ // sequential portions of audio.
+ Results []*SpeechRecognitionResult `json:"results,omitempty"`
- // DisplayName: Required. Display name of the model to be trained.
- DisplayName string `json:"displayName,omitempty"`
-
- // EvaluateModelResponses: Output only. Evaluation results associated
- // with this model. A model can
- // contain multiple sub-models in which case the evaluation results
- // for
- // all of those are available. If there are no sub models then there
- // would
- // be just a single EvaluateModelResponse.
- EvaluateModelResponses []*EvaluateModelResponse `json:"evaluateModelResponses,omitempty"`
-
- // Name: Output only. Resource name of the model.
- // Format:
- // "projects/{project_id}/locations/{location_id}/models/{model_id}"
- Name string `json:"name,omitempty"`
-
- // TrainingType: Required. Type of the training to perform.
- //
- // Possible values:
- // "TRAINING_TYPE_UNSPECIFIED"
- // "CUSTOM_ADAPTATION_LANGUAGE_MODEL" - Build adaptation language
- // model based on the users data. These models are
- // built on top of the existing prebuilt models (like phone_call,
- // video
- // etc.).
- // "PREBUILT_MODEL" - Output only. This is set to indicate that the
- // model we are talking about
- // is a prebuilt model (for e.g in the context of evaluations).
- TrainingType string `json:"trainingType,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "CreateTime") to
+ // ForceSendFields is a list of field names (e.g. "Results") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
@@ -706,7 +239,7 @@
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "CreateTime") to include in
+ // NullFields is a list of field names (e.g. "Results") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
@@ -715,8 +248,8 @@
NullFields []string `json:"-"`
}
-func (s *Model) MarshalJSON() ([]byte, error) {
- type NoMethod Model
+func (s *LongRunningRecognizeResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod LongRunningRecognizeResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -885,11 +418,29 @@
// `enable_separate_recognition_per_channel` to 'true'.
AudioChannelCount int64 `json:"audioChannelCount,omitempty"`
+ // DiarizationConfig: *Optional* Config to enable speaker diarization
+ // and set additional
+ // parameters to make diarization better suited for your
+ // application.
+ // Note: When this is enabled, we send all the words from the beginning
+ // of the
+ // audio for the top alternative in every consecutive STREAMING
+ // responses.
+ // This is done in order to improve our speaker tags as our models learn
+ // to
+ // identify the speakers in the conversation over time.
+ // For non-streaming requests, the diarization results will be provided
+ // only
+ // in the top alternative of the FINAL SpeechRecognitionResult.
+ DiarizationConfig *SpeakerDiarizationConfig `json:"diarizationConfig,omitempty"`
+
// DiarizationSpeakerCount: *Optional*
// If set, specifies the estimated number of speakers in the
// conversation.
// If not set, defaults to '2'.
// Ignored unless enable_speaker_diarization is set to true."
+ // Note: Use diarization_config instead. This field will be DEPRECATED
+ // soon.
DiarizationSpeakerCount int64 `json:"diarizationSpeakerCount,omitempty"`
// EnableAutomaticPunctuation: *Optional* If 'true', adds punctuation to
@@ -924,16 +475,8 @@
// the top alternative of the recognition result using a speaker_tag
// provided
// in the WordInfo.
- // Note: When this is true, we send all the words from the beginning of
- // the
- // audio for the top alternative in every consecutive STREAMING
- // responses.
- // This is done in order to improve our speaker tags as our models learn
- // to
- // identify the speakers in the conversation over time.
- // For non-streaming requests, the diarization results will be provided
- // only
- // in the top alternative of the FINAL SpeechRecognitionResult.
+ // Note: Use diarization_config instead. This field will be DEPRECATED
+ // soon.
EnableSpeakerDiarization bool `json:"enableSpeakerDiarization,omitempty"`
// EnableWordConfidence: *Optional* If `true`, the top result includes a
@@ -1250,13 +793,6 @@
// "OTHER_INDOOR_DEVICE" - Speech was recorded indoors.
RecordingDeviceType string `json:"recordingDeviceType,omitempty"`
- // Tags: A freeform field to tag this input sample with. This can be
- // used for
- // grouping the logs into separate buckets. This enables selective
- // purging of
- // data based on the tags, and also for training models in AutoML.
- Tags []string `json:"tags,omitempty"`
-
// ForceSendFields is a list of field names (e.g. "AudioTopic") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -1352,58 +888,53 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// RefreshDataRequest: Message sent by the client to refresh data in a
-// existing dataset.
-type RefreshDataRequest struct {
- // Uri: URI that points to a file in csv file where each row has
- // following
- // format.
- // <gs_path_to_audio>,<gs_path_to_transcript>,<label>
- // label can be HUMAN_TRANSCRIBED or MACHINE_TRANSCRIBED. Few rules for
- // a row
- // to be considered valid are :-
- // 1. Each row must have at least a label and <gs_path_to_transcript>
- // 2. If a row is marked HUMAN_TRANSCRIBED, then both
- // <gs_path_to_audio>
- // and <gs_path_to_transcript> needs to be specified.
- // 3. There has to be minimum 500 number of rows labelled
- // HUMAN_TRANSCRIBED if
- // evaluation stats are required.
- // 4. If use_logged_data_for_training is set to true, then we ignore the
- // rows
- // labelled as MACHINE_TRANSCRIBED.
- // 5. There has to be minimum 100,000 words in the transcripts in order
- // to
- // provide sufficient textual training data for the language
- // model.
- // Currently, only Google Cloud Storage URIs are
- // supported, which must be specified in the following
- // format:
- // `gs://bucket_name/object_name` (other URI formats will be
- // ignored).
- // For more information, see
- // [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
- Uri string `json:"uri,omitempty"`
+type SpeakerDiarizationConfig struct {
+ // EnableSpeakerDiarization: *Optional* If 'true', enables speaker
+ // detection for each recognized word in
+ // the top alternative of the recognition result using a speaker_tag
+ // provided
+ // in the WordInfo.
+ EnableSpeakerDiarization bool `json:"enableSpeakerDiarization,omitempty"`
- // ForceSendFields is a list of field names (e.g. "Uri") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
+ // MaxSpeakerCount: *Optional* Only used if diarization_speaker_count is
+ // not set.
+ // Maximum number of speakers in the conversation. This range gives you
+ // more
+ // flexibility by allowing the system to automatically determine the
+ // correct
+ // number of speakers. If not set, the default value is 6.
+ MaxSpeakerCount int64 `json:"maxSpeakerCount,omitempty"`
+
+ // MinSpeakerCount: *Optional* Only used if diarization_speaker_count is
+ // not set.
+ // Minimum number of speakers in the conversation. This range gives you
+ // more
+ // flexibility by allowing the system to automatically determine the
+ // correct
+ // number of speakers. If not set, the default value is 2.
+ MinSpeakerCount int64 `json:"minSpeakerCount,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g.
+ // "EnableSpeakerDiarization") to unconditionally include in API
+ // requests. By default, fields with empty values are omitted from API
+ // requests. However, any non-pointer, non-interface field appearing in
+ // ForceSendFields will be sent to the server regardless of whether the
+ // field is empty or not. This may be used to include empty fields in
+ // Patch requests.
ForceSendFields []string `json:"-"`
- // NullFields is a list of field names (e.g. "Uri") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
+ // NullFields is a list of field names (e.g. "EnableSpeakerDiarization")
+ // to include in API requests with the JSON null value. By default,
+ // fields with empty values are omitted from API requests. However, any
+ // field with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
NullFields []string `json:"-"`
}
-func (s *RefreshDataRequest) MarshalJSON() ([]byte, error) {
- type NoMethod RefreshDataRequest
+func (s *SpeakerDiarizationConfig) MarshalJSON() ([]byte, error) {
+ type NoMethod SpeakerDiarizationConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@@ -1425,23 +956,6 @@
// [usage limits](/speech-to-text/quotas#content).
Phrases []string `json:"phrases,omitempty"`
- // Strength: Hint strength to use (high, medium or low). If you use a
- // high strength then
- // you are more likely to see those phrases in the results. If strength
- // is not
- // specified then by default medium strength will be used. If you'd
- // like
- // different phrases to have different strengths, you can specify
- // multiple
- // speech_contexts.
- //
- // Possible values:
- // "STRENGTH_UNSPECIFIED"
- // "LOW" - Low strength
- // "MEDIUM" - Medium strength
- // "HIGH" - High strength
- Strength string `json:"strength,omitempty"`
-
// ForceSendFields is a list of field names (e.g. "Phrases") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -1917,7 +1431,7 @@
// "name": {
// "description": "The name of the operation resource.",
// "location": "path",
- // "pattern": "^[^/]+$",
+ // "pattern": "^.+$",
// "required": true,
// "type": "string"
// }
@@ -1933,1291 +1447,62 @@
}
-// method id "speech.projects.locations.datasets.create":
+// method id "speech.operations.list":
-type ProjectsLocationsDatasetsCreateCall struct {
- s *Service
- parent string
- dataset *Dataset
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
-}
-
-// Create: Performs asynchronous data upload for AutoML: receive results
-// via the
-// google.longrunning.Operations interface. Returns either
-// an
-// `Operation.error` or an `Operation.response` which contains
-// a `Dataset` message.
-func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall {
- c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.dataset = dataset
- return c
-}
-
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/datasets")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.datasets.create" call.
-// Exactly one of *Operation or error will be non-nil. Any non-2xx
-// status code is an error. Response headers are in either
-// *Operation.ServerResponse.Header or (if a response was returned at
-// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
-// to check whether the returned error was because
-// http.StatusNotModified was returned.
-func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Operation{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Performs asynchronous data upload for AutoML: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains\na `Dataset` message.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets",
- // "httpMethod": "POST",
- // "id": "speech.projects.locations.datasets.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+parent}/datasets",
- // "request": {
- // "$ref": "Dataset"
- // },
- // "response": {
- // "$ref": "Operation"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// method id "speech.projects.locations.datasets.get":
-
-type ProjectsLocationsDatasetsGetCall struct {
+type OperationsListCall struct {
s *Service
- name string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
-// Get: Get the dataset associated with the dataset resource.
-func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall {
- c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.name = name
+// List: Lists operations that match the specified filter in the
+// request. If the
+// server doesn't support this method, it returns
+// `UNIMPLEMENTED`.
+//
+// NOTE: the `name` binding allows API services to override the
+// binding
+// to use different resource name schemes, such as `users/*/operations`.
+// To
+// override the binding, API services can add a binding such
+// as
+// "/v1/{name=users/*}/operations" to their service configuration.
+// For backwards compatibility, the default name includes the
+// operations
+// collection id, however overriding users must ensure the name
+// binding
+// is the parent resource, without the operations collection id.
+func (r *OperationsService) List() *OperationsListCall {
+ c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
-// IncludeModelInfo sets the optional parameter "includeModelInfo": If
-// true then also include information about the models built using
-// this
-// dataset.
-func (c *ProjectsLocationsDatasetsGetCall) IncludeModelInfo(includeModelInfo bool) *ProjectsLocationsDatasetsGetCall {
- c.urlParams_.Set("includeModelInfo", fmt.Sprint(includeModelInfo))
- return c
-}
-
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// IfNoneMatch sets the optional parameter which makes the operation
-// fail if the object's ETag matches the given value. This is useful for
-// getting updates only after the object has changed since the last
-// request. Use googleapi.IsNotModified to check whether the response
-// error from Do is the result of In-None-Match.
-func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "name": c.name,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.datasets.get" call.
-// Exactly one of *Dataset or error will be non-nil. Any non-2xx status
-// code is an error. Response headers are in either
-// *Dataset.ServerResponse.Header or (if a response was returned at all)
-// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
-// check whether the returned error was because http.StatusNotModified
-// was returned.
-func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Dataset{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Get the dataset associated with the dataset resource.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
- // "httpMethod": "GET",
- // "id": "speech.projects.locations.datasets.get",
- // "parameterOrder": [
- // "name"
- // ],
- // "parameters": {
- // "includeModelInfo": {
- // "description": "If true then also include information about the models built using this\ndataset.",
- // "location": "query",
- // "type": "boolean"
- // },
- // "name": {
- // "description": "The resource name of the dataset to retrieve. Form :-\n'/projects/{project_number}/locations/{location_id}/datasets/{dataset_id}'",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+name}",
- // "response": {
- // "$ref": "Dataset"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// method id "speech.projects.locations.datasets.list":
-
-type ProjectsLocationsDatasetsListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
-}
-
-// List: Fetch the list of dataset associated with this project.
-func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall {
- c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
-}
-
-// Filter sets the optional parameter "filter": Filter the response
-// based on display_name of the dataset. For e.g
-// display_name=Foo The filter string is case sensitive
-func (c *ProjectsLocationsDatasetsListCall) Filter(filter string) *ProjectsLocationsDatasetsListCall {
+// Filter sets the optional parameter "filter": The standard list
+// filter.
+func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
c.urlParams_.Set("filter", filter)
return c
}
-// IncludeModelInfo sets the optional parameter "includeModelInfo": If
-// true then also include information about the models built using
-// the
-// datasets.
-func (c *ProjectsLocationsDatasetsListCall) IncludeModelInfo(includeModelInfo bool) *ProjectsLocationsDatasetsListCall {
- c.urlParams_.Set("includeModelInfo", fmt.Sprint(includeModelInfo))
- return c
-}
-
-// PageSize sets the optional parameter "pageSize": The maximum number
-// of items to return.
-func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall {
- c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
- return c
-}
-
-// PageToken sets the optional parameter "pageToken": The
-// next_page_token value returned from a previous List request, if any.
-func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
-}
-
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// IfNoneMatch sets the optional parameter which makes the operation
-// fail if the object's ETag matches the given value. This is useful for
-// getting updates only after the object has changed since the last
-// request. Use googleapi.IsNotModified to check whether the response
-// error from Do is the result of In-None-Match.
-func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall {
- c.ifNoneMatch_ = entityTag
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsDatasetsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/datasets")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.datasets.list" call.
-// Exactly one of *ListDatasetsResponse or error will be non-nil. Any
-// non-2xx status code is an error. Response headers are in either
-// *ListDatasetsResponse.ServerResponse.Header or (if a response was
-// returned at all) in error.(*googleapi.Error).Header. Use
-// googleapi.IsNotModified to check whether the returned error was
-// because http.StatusNotModified was returned.
-func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListDatasetsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Fetch the list of dataset associated with this project.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets",
- // "httpMethod": "GET",
- // "id": "speech.projects.locations.datasets.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "filter": {
- // "description": "Filter the response based on display_name of the dataset. For e.g\ndisplay_name=Foo The filter string is case sensitive",
- // "location": "query",
- // "type": "string"
- // },
- // "includeModelInfo": {
- // "description": "If true then also include information about the models built using the\ndatasets.",
- // "location": "query",
- // "type": "boolean"
- // },
- // "pageSize": {
- // "description": "The maximum number of items to return.",
- // "format": "int32",
- // "location": "query",
- // "type": "integer"
- // },
- // "pageToken": {
- // "description": "The next_page_token value returned from a previous List request, if any.",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+parent}/datasets",
- // "response": {
- // "$ref": "ListDatasetsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// Pages invokes f for each page of results.
-// A non-nil error returned from f will halt the iteration.
-// The provided context supersedes any context provided to the Context method.
-func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
-}
-
-// method id "speech.projects.locations.datasets.refreshData":
-
-type ProjectsLocationsDatasetsRefreshDataCall struct {
- s *Service
- name string
- refreshdatarequest *RefreshDataRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
-}
-
-// RefreshData: Refresh data for a dataset.
-func (r *ProjectsLocationsDatasetsService) RefreshData(name string, refreshdatarequest *RefreshDataRequest) *ProjectsLocationsDatasetsRefreshDataCall {
- c := &ProjectsLocationsDatasetsRefreshDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.name = name
- c.refreshdatarequest = refreshdatarequest
- return c
-}
-
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsDatasetsRefreshDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsRefreshDataCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsDatasetsRefreshDataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsRefreshDataCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsDatasetsRefreshDataCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsDatasetsRefreshDataCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.refreshdatarequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}:refreshData")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "name": c.name,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.datasets.refreshData" call.
-// Exactly one of *Operation or error will be non-nil. Any non-2xx
-// status code is an error. Response headers are in either
-// *Operation.ServerResponse.Header or (if a response was returned at
-// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
-// to check whether the returned error was because
-// http.StatusNotModified was returned.
-func (c *ProjectsLocationsDatasetsRefreshDataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Operation{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Refresh data for a dataset.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:refreshData",
- // "httpMethod": "POST",
- // "id": "speech.projects.locations.datasets.refreshData",
- // "parameterOrder": [
- // "name"
- // ],
- // "parameters": {
- // "name": {
- // "description": "The resource name of the destination dataset.",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+name}:refreshData",
- // "request": {
- // "$ref": "RefreshDataRequest"
- // },
- // "response": {
- // "$ref": "Operation"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// method id "speech.projects.locations.log_data_stats.list":
-
-type ProjectsLocationsLogDataStatsListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
-}
-
-// List: List all log data stats associated with this project.
-func (r *ProjectsLocationsLogDataStatsService) List(parent string) *ProjectsLocationsLogDataStatsListCall {
- c := &ProjectsLocationsLogDataStatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
-}
-
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsLogDataStatsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLogDataStatsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// IfNoneMatch sets the optional parameter which makes the operation
-// fail if the object's ETag matches the given value. This is useful for
-// getting updates only after the object has changed since the last
-// request. Use googleapi.IsNotModified to check whether the response
-// error from Do is the result of In-None-Match.
-func (c *ProjectsLocationsLogDataStatsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLogDataStatsListCall {
- c.ifNoneMatch_ = entityTag
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsLogDataStatsListCall) Context(ctx context.Context) *ProjectsLocationsLogDataStatsListCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsLogDataStatsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsLogDataStatsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/log_data_stats")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.log_data_stats.list" call.
-// Exactly one of *ListLogDataStatsResponse or error will be non-nil.
-// Any non-2xx status code is an error. Response headers are in either
-// *ListLogDataStatsResponse.ServerResponse.Header or (if a response was
-// returned at all) in error.(*googleapi.Error).Header. Use
-// googleapi.IsNotModified to check whether the returned error was
-// because http.StatusNotModified was returned.
-func (c *ProjectsLocationsLogDataStatsListCall) Do(opts ...googleapi.CallOption) (*ListLogDataStatsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListLogDataStatsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "List all log data stats associated with this project.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/log_data_stats",
- // "httpMethod": "GET",
- // "id": "speech.projects.locations.log_data_stats.list",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "parent": {
- // "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+parent}/log_data_stats",
- // "response": {
- // "$ref": "ListLogDataStatsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// method id "speech.projects.locations.models.create":
-
-type ProjectsLocationsModelsCreateCall struct {
- s *Service
- parent string
- model *Model
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
-}
-
-// Create: Performs asynchronous model training for AutoML: receive
-// results via the
-// google.longrunning.Operations interface. Returns either
-// an
-// `Operation.error` or an `Operation.response` which contains a
-// `Model`
-// message.
-func (r *ProjectsLocationsModelsService) Create(parent string, model *Model) *ProjectsLocationsModelsCreateCall {
- c := &ProjectsLocationsModelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- c.model = model
- return c
-}
-
-// Name sets the optional parameter "name": Required. Resource name of
-// the dataset being used to create the
-// model.
-// '/projects/{project_id}/locations/{location_id}/datasets/{datas
-// et_id}'
-func (c *ProjectsLocationsModelsCreateCall) Name(name string) *ProjectsLocationsModelsCreateCall {
+// Name sets the optional parameter "name": The name of the operation's
+// parent resource.
+func (c *OperationsListCall) Name(name string) *OperationsListCall {
c.urlParams_.Set("name", name)
return c
}
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsModelsCreateCall) Context(ctx context.Context) *ProjectsLocationsModelsCreateCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsModelsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsModelsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.model)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/models")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.models.create" call.
-// Exactly one of *Operation or error will be non-nil. Any non-2xx
-// status code is an error. Response headers are in either
-// *Operation.ServerResponse.Header or (if a response was returned at
-// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
-// to check whether the returned error was because
-// http.StatusNotModified was returned.
-func (c *ProjectsLocationsModelsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Operation{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Performs asynchronous model training for AutoML: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains a `Model`\nmessage.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models",
- // "httpMethod": "POST",
- // "id": "speech.projects.locations.models.create",
- // "parameterOrder": [
- // "parent"
- // ],
- // "parameters": {
- // "name": {
- // "description": "Required. Resource name of the dataset being used to create the model.\n'/projects/{project_id}/locations/{location_id}/datasets/{dataset_id}'",
- // "location": "query",
- // "type": "string"
- // },
- // "parent": {
- // "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+parent}/models",
- // "request": {
- // "$ref": "Model"
- // },
- // "response": {
- // "$ref": "Operation"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// method id "speech.projects.locations.models.deploy":
-
-type ProjectsLocationsModelsDeployCall struct {
- s *Service
- name string
- deploymodelrequest *DeployModelRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
-}
-
-// Deploy: Performs asynchronous model deployment of the model: receive
-// results
-// via the google.longrunning.Operations interface. After the operation
-// is
-// completed this returns either an `Operation.error` in case of error
-// or
-// a `google.protobuf.Empty` if the deployment was successful.
-func (r *ProjectsLocationsModelsService) Deploy(name string, deploymodelrequest *DeployModelRequest) *ProjectsLocationsModelsDeployCall {
- c := &ProjectsLocationsModelsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.name = name
- c.deploymodelrequest = deploymodelrequest
- return c
-}
-
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsModelsDeployCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeployCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsModelsDeployCall) Context(ctx context.Context) *ProjectsLocationsModelsDeployCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsModelsDeployCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsModelsDeployCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymodelrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}:deploy")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "name": c.name,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.models.deploy" call.
-// Exactly one of *Operation or error will be non-nil. Any non-2xx
-// status code is an error. Response headers are in either
-// *Operation.ServerResponse.Header or (if a response was returned at
-// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
-// to check whether the returned error was because
-// http.StatusNotModified was returned.
-func (c *ProjectsLocationsModelsDeployCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Operation{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Performs asynchronous model deployment of the model: receive results\nvia the google.longrunning.Operations interface. After the operation is\ncompleted this returns either an `Operation.error` in case of error or\na `google.protobuf.Empty` if the deployment was successful.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models/{modelsId}:deploy",
- // "httpMethod": "POST",
- // "id": "speech.projects.locations.models.deploy",
- // "parameterOrder": [
- // "name"
- // ],
- // "parameters": {
- // "name": {
- // "description": "Resource name of the model.\nFormat: \"projects/{project_id}/locations/{location_id}/models/{model_id}\"",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+/models/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+name}:deploy",
- // "request": {
- // "$ref": "DeployModelRequest"
- // },
- // "response": {
- // "$ref": "Operation"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// method id "speech.projects.locations.models.evaluate":
-
-type ProjectsLocationsModelsEvaluateCall struct {
- s *Service
- name string
- evaluatemodelrequest *EvaluateModelRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
-}
-
-// Evaluate: Performs asynchronous evaluation of the model: receive
-// results
-// via the google.longrunning.Operations interface. After the operation
-// is
-// completed this returns either an `Operation.error` in case of error
-// or
-// a `EvaluateModelResponse` with the evaluation results.
-func (r *ProjectsLocationsModelsService) Evaluate(name string, evaluatemodelrequest *EvaluateModelRequest) *ProjectsLocationsModelsEvaluateCall {
- c := &ProjectsLocationsModelsEvaluateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.name = name
- c.evaluatemodelrequest = evaluatemodelrequest
- return c
-}
-
-// Fields allows partial responses to be retrieved. See
-// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
-// for more information.
-func (c *ProjectsLocationsModelsEvaluateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
-}
-
-// Context sets the context to be used in this call's Do method. Any
-// pending HTTP request will be aborted if the provided context is
-// canceled.
-func (c *ProjectsLocationsModelsEvaluateCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluateCall {
- c.ctx_ = ctx
- return c
-}
-
-// Header returns an http.Header that can be modified by the caller to
-// add HTTP headers to the request.
-func (c *ProjectsLocationsModelsEvaluateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
-}
-
-func (c *ProjectsLocationsModelsEvaluateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.evaluatemodelrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+name}:evaluate")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "name": c.name,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
-}
-
-// Do executes the "speech.projects.locations.models.evaluate" call.
-// Exactly one of *Operation or error will be non-nil. Any non-2xx
-// status code is an error. Response headers are in either
-// *Operation.ServerResponse.Header or (if a response was returned at
-// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
-// to check whether the returned error was because
-// http.StatusNotModified was returned.
-func (c *ProjectsLocationsModelsEvaluateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Operation{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Performs asynchronous evaluation of the model: receive results\nvia the google.longrunning.Operations interface. After the operation is\ncompleted this returns either an `Operation.error` in case of error or\na `EvaluateModelResponse` with the evaluation results.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models/{modelsId}:evaluate",
- // "httpMethod": "POST",
- // "id": "speech.projects.locations.models.evaluate",
- // "parameterOrder": [
- // "name"
- // ],
- // "parameters": {
- // "name": {
- // "description": "Resource name of the model.\nFormat: \"projects/{project_id}/locations/{location_id}/models/{model_id}\"",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+/models/[^/]+$",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1p1beta1/{+name}:evaluate",
- // "request": {
- // "$ref": "EvaluateModelRequest"
- // },
- // "response": {
- // "$ref": "Operation"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/cloud-platform"
- // ]
- // }
-
-}
-
-// method id "speech.projects.locations.models.list":
-
-type ProjectsLocationsModelsListCall struct {
- s *Service
- parent string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
-}
-
-// List: Fetch the list of models associated with this project.
-func (r *ProjectsLocationsModelsService) List(parent string) *ProjectsLocationsModelsListCall {
- c := &ProjectsLocationsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.parent = parent
- return c
-}
-
-// Filter sets the optional parameter "filter": Filter the response
-// based on display_name of the model. For e.g
-// display_name=Foo The filter string is case sensitive
-func (c *ProjectsLocationsModelsListCall) Filter(filter string) *ProjectsLocationsModelsListCall {
- c.urlParams_.Set("filter", filter)
- return c
-}
-
-// PageSize sets the optional parameter "pageSize": The maximum number
-// of items to return.
-func (c *ProjectsLocationsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsListCall {
+// PageSize sets the optional parameter "pageSize": The standard list
+// page size.
+func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
-// PageToken sets the optional parameter "pageToken": The
-// next_page_token value returned from a previous List request, if any.
-func (c *ProjectsLocationsModelsListCall) PageToken(pageToken string) *ProjectsLocationsModelsListCall {
+// PageToken sets the optional parameter "pageToken": The standard list
+// page token.
+func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
@@ -3225,7 +1510,7 @@
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
-func (c *ProjectsLocationsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListCall {
+func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
@@ -3235,7 +1520,7 @@
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
-func (c *ProjectsLocationsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListCall {
+func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
c.ifNoneMatch_ = entityTag
return c
}
@@ -3243,21 +1528,21 @@
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
-func (c *ProjectsLocationsModelsListCall) Context(ctx context.Context) *ProjectsLocationsModelsListCall {
+func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
-func (c *ProjectsLocationsModelsListCall) Header() http.Header {
+func (c *OperationsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
-func (c *ProjectsLocationsModelsListCall) doRequest(alt string) (*http.Response, error) {
+func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
@@ -3269,27 +1554,24 @@
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/{+parent}/models")
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1p1beta1/operations")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "parent": c.parent,
- })
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
-// Do executes the "speech.projects.locations.models.list" call.
-// Exactly one of *ListModelsResponse or error will be non-nil. Any
+// Do executes the "speech.operations.list" call.
+// Exactly one of *ListOperationsResponse or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
-// *ListModelsResponse.ServerResponse.Header or (if a response was
+// *ListOperationsResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
-func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*ListModelsResponse, error) {
+func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
@@ -3308,7 +1590,7 @@
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
- ret := &ListModelsResponse{
+ ret := &ListOperationsResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
@@ -3320,41 +1602,37 @@
}
return ret, nil
// {
- // "description": "Fetch the list of models associated with this project.",
- // "flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/models",
+ // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
+ // "flatPath": "v1p1beta1/operations",
// "httpMethod": "GET",
- // "id": "speech.projects.locations.models.list",
- // "parameterOrder": [
- // "parent"
- // ],
+ // "id": "speech.operations.list",
+ // "parameterOrder": [],
// "parameters": {
// "filter": {
- // "description": "Filter the response based on display_name of the model. For e.g\ndisplay_name=Foo The filter string is case sensitive",
+ // "description": "The standard list filter.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "name": {
+ // "description": "The name of the operation's parent resource.",
// "location": "query",
// "type": "string"
// },
// "pageSize": {
- // "description": "The maximum number of items to return.",
+ // "description": "The standard list page size.",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
- // "description": "The next_page_token value returned from a previous List request, if any.",
+ // "description": "The standard list page token.",
// "location": "query",
// "type": "string"
- // },
- // "parent": {
- // "description": "Required. Resource name of the parent. Has the format :-\n\"projects/{project_id}/locations/{location_id}\"",
- // "location": "path",
- // "pattern": "^projects/[^/]+/locations/[^/]+$",
- // "required": true,
- // "type": "string"
// }
// },
- // "path": "v1p1beta1/{+parent}/models",
+ // "path": "v1p1beta1/operations",
// "response": {
- // "$ref": "ListModelsResponse"
+ // "$ref": "ListOperationsResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
@@ -3366,7 +1644,7 @@
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
-func (c *ProjectsLocationsModelsListCall) Pages(ctx context.Context, f func(*ListModelsResponse) error) error {
+func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json
index 2bc6260..4a50f79 100644
--- a/streetviewpublish/v1/streetviewpublish-api.json
+++ b/streetviewpublish/v1/streetviewpublish-api.json
@@ -296,7 +296,7 @@
]
},
"batchUpdate": {
- "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e",
+ "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\nThe number of\nUpdatePhotoRequest\nmessages in a\nBatchUpdatePhotosRequest\nmust not exceed 20.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e",
"flatPath": "v1/photos:batchUpdate",
"httpMethod": "POST",
"id": "streetviewpublish.photos.batchUpdate",
@@ -362,7 +362,7 @@
}
}
},
- "revision": "20181128",
+ "revision": "20181210",
"rootUrl": "https://streetviewpublish.googleapis.com/",
"schemas": {
"BatchDeletePhotosRequest": {
diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go
index f8b6ea8..9bf2aa8 100644
--- a/streetviewpublish/v1/streetviewpublish-gen.go
+++ b/streetviewpublish/v1/streetviewpublish-gen.go
@@ -2296,6 +2296,12 @@
// all
// fields.
//
+// The number of
+// UpdatePhotoRequest
+// messages in a
+// BatchUpdatePhotosRequest
+// must not exceed 20.
+//
// <aside class="note"><b>Note:</b> To
// update
// Pose.altitude,
@@ -2394,7 +2400,7 @@
}
return ret, nil
// {
- // "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e",
+ // "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\nThe number of\nUpdatePhotoRequest\nmessages in a\nBatchUpdatePhotosRequest\nmust not exceed 20.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e",
// "flatPath": "v1/photos:batchUpdate",
// "httpMethod": "POST",
// "id": "streetviewpublish.photos.batchUpdate",
diff --git a/support/bundler/bundler_test.go b/support/bundler/bundler_test.go
index 4495f71..ec23ad3 100644
--- a/support/bundler/bundler_test.go
+++ b/support/bundler/bundler_test.go
@@ -282,7 +282,7 @@
var wg sync.WaitGroup
defer wg.Wait()
- for i := 0; i < 5000; i++ {
+ for i := 0; i < 50; i++ {
b.Add(i, 1)
if i%100 == 0 {
i := i
diff --git a/texttospeech/v1beta1/texttospeech-api.json b/texttospeech/v1beta1/texttospeech-api.json
index 0db45e8..4544fa9 100644
--- a/texttospeech/v1beta1/texttospeech-api.json
+++ b/texttospeech/v1beta1/texttospeech-api.json
@@ -152,7 +152,7 @@
}
}
},
- "revision": "20180727",
+ "revision": "20181208",
"rootUrl": "https://texttospeech.googleapis.com/",
"schemas": {
"AudioConfig": {
@@ -176,7 +176,7 @@
"type": "string"
},
"effectsProfileId": {
- "description": "An identifier which selects 'audio effects' profiles that are applied on\n(post synthesized) text to speech.\nEffects are applied on top of each other in the order they are given.",
+ "description": "An identifier which selects 'audio effects' profiles that are applied on\n(post synthesized) text to speech.\nEffects are applied on top of each other in the order they are given.\nSee\n\n[audio-profiles](https:\n//cloud.google.com/text-to-speech/docs/audio-profiles)\nfor current supported profile ids.",
"items": {
"type": "string"
},
diff --git a/texttospeech/v1beta1/texttospeech-gen.go b/texttospeech/v1beta1/texttospeech-gen.go
index 52fbfba..6d1093f 100644
--- a/texttospeech/v1beta1/texttospeech-gen.go
+++ b/texttospeech/v1beta1/texttospeech-gen.go
@@ -127,7 +127,14 @@
// EffectsProfileId: An identifier which selects 'audio effects'
// profiles that are applied on
// (post synthesized) text to speech.
- // Effects are applied on top of each other in the order they are given.
+ // Effects are applied on top of each other in the order they are
+ // given.
+ // See
+ //
+ // [audio-profiles](https:
+ // //cloud.google.com/text-to-speech/
+ // docs/audio-profiles)
+ // for current supported profile ids.
EffectsProfileId []string `json:"effectsProfileId,omitempty"`
// Pitch: Optional speaking pitch, in the range [-20.0, 20.0]. 20 means
diff --git a/vision/v1/vision-api.json b/vision/v1/vision-api.json
index 35523e3..ec7a947 100644
--- a/vision/v1/vision-api.json
+++ b/vision/v1/vision-api.json
@@ -384,7 +384,7 @@
]
},
"delete": {
- "description": "Permanently deletes a ProductSet. All Products and ReferenceImages in the\nProductSet will be deleted.\n\nThe actual image files are not deleted from Google Cloud Storage.\n\nPossible errors:\n\n* Returns NOT_FOUND if the ProductSet does not exist.",
+ "description": "Permanently deletes a ProductSet. Products and ReferenceImages in the\nProductSet are not deleted.\n\nThe actual image files are not deleted from Google Cloud Storage.\n\nPossible errors:\n\n* Returns NOT_FOUND if the ProductSet does not exist.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}",
"httpMethod": "DELETE",
"id": "vision.projects.locations.productSets.delete",
@@ -906,7 +906,7 @@
}
}
},
- "revision": "20181112",
+ "revision": "20181209",
"rootUrl": "https://vision.googleapis.com/",
"schemas": {
"AddProductToProductSetRequest": {
diff --git a/vision/v1/vision-gen.go b/vision/v1/vision-gen.go
index 8a48f4b..27877ec 100644
--- a/vision/v1/vision-gen.go
+++ b/vision/v1/vision-gen.go
@@ -13142,9 +13142,9 @@
header_ http.Header
}
-// Delete: Permanently deletes a ProductSet. All Products and
+// Delete: Permanently deletes a ProductSet. Products and
// ReferenceImages in the
-// ProductSet will be deleted.
+// ProductSet are not deleted.
//
// The actual image files are not deleted from Google Cloud
// Storage.
@@ -13243,7 +13243,7 @@
}
return ret, nil
// {
- // "description": "Permanently deletes a ProductSet. All Products and ReferenceImages in the\nProductSet will be deleted.\n\nThe actual image files are not deleted from Google Cloud Storage.\n\nPossible errors:\n\n* Returns NOT_FOUND if the ProductSet does not exist.",
+ // "description": "Permanently deletes a ProductSet. Products and ReferenceImages in the\nProductSet are not deleted.\n\nThe actual image files are not deleted from Google Cloud Storage.\n\nPossible errors:\n\n* Returns NOT_FOUND if the ProductSet does not exist.",
// "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}",
// "httpMethod": "DELETE",
// "id": "vision.projects.locations.productSets.delete",