all: autogenerated update (2018-03-10)
Add:
- pagespeedonline/v4
Update:
- adexchangebuyer2/v2beta1
- appengine/v1
- appengine/v1alpha
- appengine/v1beta
- appengine/v1beta4
- appengine/v1beta5
- cloudbilling/v1
- container/v1
- content/v2
- dataproc/v1
- dataproc/v1beta2
- dlp/v2beta2
- genomics/v2alpha1
- ml/v1
- monitoring/v3
- oslogin/v1
- oslogin/v1alpha
- oslogin/v1beta
- proximitybeacon/v1beta1
- serviceconsumermanagement/v1
- serviceusage/v1beta1
- spanner/v1
- testing/v1
diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json
index d342dc3..0fd6134 100644
--- a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json
+++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json
@@ -1947,7 +1947,7 @@
}
}
},
- "revision": "20180305",
+ "revision": "20180308",
"rootUrl": "https://adexchangebuyer.googleapis.com/",
"schemas": {
"AbsoluteDateRange": {
@@ -2846,8 +2846,6 @@
"description": "DEPRECATED: use repeated formats field instead.\nThe format on which to filter; optional.",
"enum": [
"FORMAT_UNSPECIFIED",
- "DISPLAY",
- "VIDEO",
"NATIVE_DISPLAY",
"NATIVE_VIDEO",
"NON_NATIVE_DISPLAY",
@@ -2855,8 +2853,6 @@
],
"enumDescriptions": [
"A placeholder for an undefined format; indicates that no format filter\nwill be applied.",
- "DEPRECATED: use combination of NATIVE_DISPLAY and NON_NATIVE_DISPLAY\nThe ad impression is display format (i.e. an image).",
- "DEPRECATED: use combination of NATIVE_VIDEO and NON_NATIVE_VIDEO\nThe ad impression is video format.",
"The ad impression is a native ad, and display (i.e. image) format.",
"The ad impression is a native ad, and video format.",
"The ad impression is not a native ad, and display (i.e. image) format.",
@@ -2868,8 +2864,6 @@
"description": "The list of formats on which to filter; may be empty. The filters\nrepresented by multiple formats are ORed together (i.e. if non-empty,\nresults must match any one of the formats).",
"enumDescriptions": [
"A placeholder for an undefined format; indicates that no format filter\nwill be applied.",
- "DEPRECATED: use combination of NATIVE_DISPLAY and NON_NATIVE_DISPLAY\nThe ad impression is display format (i.e. an image).",
- "DEPRECATED: use combination of NATIVE_VIDEO and NON_NATIVE_VIDEO\nThe ad impression is video format.",
"The ad impression is a native ad, and display (i.e. image) format.",
"The ad impression is a native ad, and video format.",
"The ad impression is not a native ad, and display (i.e. image) format.",
@@ -2878,8 +2872,6 @@
"items": {
"enum": [
"FORMAT_UNSPECIFIED",
- "DISPLAY",
- "VIDEO",
"NATIVE_DISPLAY",
"NATIVE_VIDEO",
"NON_NATIVE_DISPLAY",
diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go
index 1989152..ba85957 100644
--- a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go
+++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go
@@ -1682,12 +1682,6 @@
// "FORMAT_UNSPECIFIED" - A placeholder for an undefined format;
// indicates that no format filter
// will be applied.
- // "DISPLAY" - DEPRECATED: use combination of NATIVE_DISPLAY and
- // NON_NATIVE_DISPLAY
- // The ad impression is display format (i.e. an image).
- // "VIDEO" - DEPRECATED: use combination of NATIVE_VIDEO and
- // NON_NATIVE_VIDEO
- // The ad impression is video format.
// "NATIVE_DISPLAY" - The ad impression is a native ad, and display
// (i.e. image) format.
// "NATIVE_VIDEO" - The ad impression is a native ad, and video
@@ -1708,12 +1702,6 @@
// "FORMAT_UNSPECIFIED" - A placeholder for an undefined format;
// indicates that no format filter
// will be applied.
- // "DISPLAY" - DEPRECATED: use combination of NATIVE_DISPLAY and
- // NON_NATIVE_DISPLAY
- // The ad impression is display format (i.e. an image).
- // "VIDEO" - DEPRECATED: use combination of NATIVE_VIDEO and
- // NON_NATIVE_VIDEO
- // The ad impression is video format.
// "NATIVE_DISPLAY" - The ad impression is a native ad, and display
// (i.e. image) format.
// "NATIVE_VIDEO" - The ad impression is a native ad, and video
diff --git a/api-list.json b/api-list.json
index 31395b5..6e55b78 100644
--- a/api-list.json
+++ b/api-list.json
@@ -592,6 +592,21 @@
},
{
"kind": "discovery#directoryItem",
+ "id": "chat:v1",
+ "name": "chat",
+ "version": "v1",
+ "title": "Hangouts Chat API",
+ "description": "Create bots and extend the new Hangouts Chat.",
+ "discoveryRestUrl": "https://chat.googleapis.com/$discovery/rest?version=v1",
+ "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/hangouts/chat",
+ "preferred": true
+ },
+ {
+ "kind": "discovery#directoryItem",
"id": "civicinfo:v2",
"name": "civicinfo",
"version": "v2",
@@ -1984,6 +1999,21 @@
"x32": "https://www.google.com/images/icons/product/pagespeed-32.png"
},
"documentationLink": "https://developers.google.com/speed/docs/insights/v2/getting-started",
+ "preferred": false
+ },
+ {
+ "kind": "discovery#directoryItem",
+ "id": "pagespeedonline:v4",
+ "name": "pagespeedonline",
+ "version": "v4",
+ "title": "PageSpeed Insights API",
+ "description": "Analyzes the performance of a web page and provides tailored suggestions to make that page faster.",
+ "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/pagespeedonline/v4/rest",
+ "discoveryLink": "./apis/pagespeedonline/v4/rest",
+ "icons": {
+ "x16": "https://www.google.com/images/icons/product/pagespeed-16.png",
+ "x32": "https://www.google.com/images/icons/product/pagespeed-32.png"
+ },
"preferred": true
},
{
diff --git a/appengine/v1/appengine-api.json b/appengine/v1/appengine-api.json
index 385b564..5bdd774 100644
--- a/appengine/v1/appengine-api.json
+++ b/appengine/v1/appengine-api.json
@@ -1583,7 +1583,7 @@
}
}
},
- "revision": "20180307",
+ "revision": "20180222",
"rootUrl": "https://appengine.googleapis.com/",
"schemas": {
"ApiConfigHandler": {
@@ -1708,7 +1708,7 @@
"type": "string"
},
"locationId": {
- "description": "Location from which this application runs. Application instances run out of the data centers in the specified location, which is also where all of the application's end user content is stored.Defaults to us-central.View the list of supported locations (https://cloud.google.com/appengine/docs/locations).",
+ "description": "Location from which this application runs. Application instances run out of the data centers in the specified location, which is also where all of the application's end user content is stored.Defaults to us-central1.View the list of supported locations (https://cloud.google.com/appengine/docs/locations).",
"type": "string"
},
"name": {
@@ -2548,10 +2548,6 @@
"description": "A resource that represents Google Cloud Platform location.",
"id": "Location",
"properties": {
- "displayName": {
- "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".",
- "type": "string"
- },
"labels": {
"additionalProperties": {
"type": "string"
diff --git a/appengine/v1/appengine-gen.go b/appengine/v1/appengine-gen.go
index e0b15fa..78c585e 100644
--- a/appengine/v1/appengine-gen.go
+++ b/appengine/v1/appengine-gen.go
@@ -369,7 +369,7 @@
// LocationId: Location from which this application runs. Application
// instances run out of the data centers in the specified location,
// which is also where all of the application's end user content is
- // stored.Defaults to us-central.View the list of supported locations
+ // stored.Defaults to us-central1.View the list of supported locations
// (https://cloud.google.com/appengine/docs/locations).
LocationId string `json:"locationId,omitempty"`
@@ -1910,10 +1910,6 @@
// Location: A resource that represents Google Cloud Platform location.
type Location struct {
- // DisplayName: The friendly name for this location, typically a nearby
- // city name. For example, "Tokyo".
- DisplayName string `json:"displayName,omitempty"`
-
// Labels: Cross-service attributes for the location. For
// example
// {"cloud.googleapis.com/region": "us-east1"}
@@ -1937,7 +1933,7 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "DisplayName") to
+ // 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
@@ -1945,10 +1941,10 @@
// 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
+ // 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:"-"`
diff --git a/appengine/v1alpha/appengine-api.json b/appengine/v1alpha/appengine-api.json
index 1404c0d..aead2f2 100644
--- a/appengine/v1alpha/appengine-api.json
+++ b/appengine/v1alpha/appengine-api.json
@@ -705,7 +705,7 @@
}
}
},
- "revision": "20180307",
+ "revision": "20180222",
"rootUrl": "https://appengine.googleapis.com/",
"schemas": {
"AuthorizedCertificate": {
@@ -937,10 +937,6 @@
"description": "A resource that represents Google Cloud Platform location.",
"id": "Location",
"properties": {
- "displayName": {
- "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".",
- "type": "string"
- },
"labels": {
"additionalProperties": {
"type": "string"
diff --git a/appengine/v1alpha/appengine-gen.go b/appengine/v1alpha/appengine-gen.go
index fb9a243..df6585b 100644
--- a/appengine/v1alpha/appengine-gen.go
+++ b/appengine/v1alpha/appengine-gen.go
@@ -624,10 +624,6 @@
// Location: A resource that represents Google Cloud Platform location.
type Location struct {
- // DisplayName: The friendly name for this location, typically a nearby
- // city name. For example, "Tokyo".
- DisplayName string `json:"displayName,omitempty"`
-
// Labels: Cross-service attributes for the location. For
// example
// {"cloud.googleapis.com/region": "us-east1"}
@@ -651,7 +647,7 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "DisplayName") to
+ // 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
@@ -659,10 +655,10 @@
// 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
+ // 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:"-"`
diff --git a/appengine/v1beta/appengine-api.json b/appengine/v1beta/appengine-api.json
index 4394d65..4c0ada8 100644
--- a/appengine/v1beta/appengine-api.json
+++ b/appengine/v1beta/appengine-api.json
@@ -1583,7 +1583,7 @@
}
}
},
- "revision": "20180307",
+ "revision": "20180222",
"rootUrl": "https://appengine.googleapis.com/",
"schemas": {
"ApiConfigHandler": {
@@ -1708,7 +1708,7 @@
"type": "string"
},
"locationId": {
- "description": "Location from which this application runs. Application instances run out of the data centers in the specified location, which is also where all of the application's end user content is stored.Defaults to us-central.View the list of supported locations (https://cloud.google.com/appengine/docs/locations).",
+ "description": "Location from which this application runs. Application instances run out of the data centers in the specified location, which is also where all of the application's end user content is stored.Defaults to us-central1.View the list of supported locations (https://cloud.google.com/appengine/docs/locations).",
"type": "string"
},
"name": {
@@ -2627,10 +2627,6 @@
"description": "A resource that represents Google Cloud Platform location.",
"id": "Location",
"properties": {
- "displayName": {
- "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".",
- "type": "string"
- },
"labels": {
"additionalProperties": {
"type": "string"
diff --git a/appengine/v1beta/appengine-gen.go b/appengine/v1beta/appengine-gen.go
index 2cf2ef6..f197d87 100644
--- a/appengine/v1beta/appengine-gen.go
+++ b/appengine/v1beta/appengine-gen.go
@@ -369,7 +369,7 @@
// LocationId: Location from which this application runs. Application
// instances run out of the data centers in the specified location,
// which is also where all of the application's end user content is
- // stored.Defaults to us-central.View the list of supported locations
+ // stored.Defaults to us-central1.View the list of supported locations
// (https://cloud.google.com/appengine/docs/locations).
LocationId string `json:"locationId,omitempty"`
@@ -2072,10 +2072,6 @@
// Location: A resource that represents Google Cloud Platform location.
type Location struct {
- // DisplayName: The friendly name for this location, typically a nearby
- // city name. For example, "Tokyo".
- DisplayName string `json:"displayName,omitempty"`
-
// Labels: Cross-service attributes for the location. For
// example
// {"cloud.googleapis.com/region": "us-east1"}
@@ -2099,7 +2095,7 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "DisplayName") to
+ // 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
@@ -2107,10 +2103,10 @@
// 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
+ // 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:"-"`
diff --git a/appengine/v1beta4/appengine-api.json b/appengine/v1beta4/appengine-api.json
index 48a2ff9..c7faa0b 100644
--- a/appengine/v1beta4/appengine-api.json
+++ b/appengine/v1beta4/appengine-api.json
@@ -938,7 +938,7 @@
}
}
},
- "revision": "20180307",
+ "revision": "20180222",
"rootUrl": "https://appengine.googleapis.com/",
"schemas": {
"ApiConfigHandler": {
@@ -1584,10 +1584,6 @@
"description": "A resource that represents Google Cloud Platform location.",
"id": "Location",
"properties": {
- "displayName": {
- "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".",
- "type": "string"
- },
"labels": {
"additionalProperties": {
"type": "string"
diff --git a/appengine/v1beta4/appengine-gen.go b/appengine/v1beta4/appengine-gen.go
index a15ca66..9e319dd 100644
--- a/appengine/v1beta4/appengine-gen.go
+++ b/appengine/v1beta4/appengine-gen.go
@@ -1257,10 +1257,6 @@
// Location: A resource that represents Google Cloud Platform location.
type Location struct {
- // DisplayName: The friendly name for this location, typically a nearby
- // city name. For example, "Tokyo".
- DisplayName string `json:"displayName,omitempty"`
-
// Labels: Cross-service attributes for the location. For
// example
// {"cloud.googleapis.com/region": "us-east1"}
@@ -1284,7 +1280,7 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "DisplayName") to
+ // 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
@@ -1292,10 +1288,10 @@
// 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
+ // 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:"-"`
diff --git a/appengine/v1beta5/appengine-api.json b/appengine/v1beta5/appengine-api.json
index 91c8ae6..387c7e3 100644
--- a/appengine/v1beta5/appengine-api.json
+++ b/appengine/v1beta5/appengine-api.json
@@ -938,7 +938,7 @@
}
}
},
- "revision": "20180307",
+ "revision": "20180222",
"rootUrl": "https://appengine.googleapis.com/",
"schemas": {
"ApiConfigHandler": {
@@ -1584,10 +1584,6 @@
"description": "A resource that represents Google Cloud Platform location.",
"id": "Location",
"properties": {
- "displayName": {
- "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".",
- "type": "string"
- },
"labels": {
"additionalProperties": {
"type": "string"
diff --git a/appengine/v1beta5/appengine-gen.go b/appengine/v1beta5/appengine-gen.go
index 73db162..23bbb1f 100644
--- a/appengine/v1beta5/appengine-gen.go
+++ b/appengine/v1beta5/appengine-gen.go
@@ -1257,10 +1257,6 @@
// Location: A resource that represents Google Cloud Platform location.
type Location struct {
- // DisplayName: The friendly name for this location, typically a nearby
- // city name. For example, "Tokyo".
- DisplayName string `json:"displayName,omitempty"`
-
// Labels: Cross-service attributes for the location. For
// example
// {"cloud.googleapis.com/region": "us-east1"}
@@ -1284,7 +1280,7 @@
// server.
googleapi.ServerResponse `json:"-"`
- // ForceSendFields is a list of field names (e.g. "DisplayName") to
+ // 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
@@ -1292,10 +1288,10 @@
// 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
+ // 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:"-"`
diff --git a/cloudbilling/v1/cloudbilling-api.json b/cloudbilling/v1/cloudbilling-api.json
index 601b31b..4022f82 100644
--- a/cloudbilling/v1/cloudbilling-api.json
+++ b/cloudbilling/v1/cloudbilling-api.json
@@ -117,8 +117,26 @@
"resources": {
"billingAccounts": {
"methods": {
+ "create": {
+ "description": "Creates a billing account.\nThis method can only be used to create\n[billing subaccounts](https://cloud.google.com/billing/docs/concepts).\nWhen creating a subaccount, the current authenticated user must have the\n`billing.accounts.update` IAM permission on the master account, which is\ntypically given to billing account\n[administrators](https://cloud.google.com/billing/docs/how-to/billing-access).\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ "flatPath": "v1/billingAccounts",
+ "httpMethod": "POST",
+ "id": "cloudbilling.billingAccounts.create",
+ "parameterOrder": [],
+ "parameters": {},
+ "path": "v1/billingAccounts",
+ "request": {
+ "$ref": "BillingAccount"
+ },
+ "response": {
+ "$ref": "BillingAccount"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
"get": {
- "description": "Gets information about a billing account. The current authenticated user\nmust be an [owner of the billing\naccount](https://support.google.com/cloud/answer/4430947).",
+ "description": "Gets information about a billing account. The current authenticated user\nmust be a [viewer of the billing\naccount](https://cloud.google.com/billing/docs/how-to/billing-access).",
"flatPath": "v1/billingAccounts/{billingAccountsId}",
"httpMethod": "GET",
"id": "cloudbilling.billingAccounts.get",
@@ -142,13 +160,43 @@
"https://www.googleapis.com/auth/cloud-platform"
]
},
+ "getIamPolicy": {
+ "description": "Gets the access control policy for a billing account.\nThe caller must have the `billing.accounts.getIamPolicy` permission on the\naccount, which is often given to billing account\n[viewers](https://cloud.google.com/billing/docs/how-to/billing-access).\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ "flatPath": "v1/billingAccounts/{billingAccountsId}:getIamPolicy",
+ "httpMethod": "GET",
+ "id": "cloudbilling.billingAccounts.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": "^billingAccounts/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:getIamPolicy",
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
"list": {
- "description": "Lists the billing accounts that the current authenticated user\n[owns](https://support.google.com/cloud/answer/4430947).",
+ "description": "Lists the billing accounts that the current authenticated user has\npermission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).",
"flatPath": "v1/billingAccounts",
"httpMethod": "GET",
"id": "cloudbilling.billingAccounts.list",
"parameterOrder": [],
"parameters": {
+ "filter": {
+ "description": "Options for how to filter the returned billing accounts.\nCurrently this only supports filtering for\n[subaccounts](https://cloud.google.com/billing/docs/concepts) under a\nsingle provided reseller billing account.\n(e.g. \"master_billing_account=billingAccounts/012345-678901-ABCDEF\").\nBoolean algebra and other fields are not currently supported.\n\n\u003e This field is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ "location": "query",
+ "type": "string"
+ },
"pageSize": {
"description": "Requested page size. The maximum page size is 100; this is also the\ndefault.",
"format": "int32",
@@ -168,13 +216,103 @@
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
+ },
+ "patch": {
+ "description": "Updates a billing account's fields.\nCurrently the only field that can be edited is `display_name`.\nThe current authenticated user must have the `billing.accounts.update`\nIAM permission, which is typically given to the\n[administrator](https://cloud.google.com/billing/docs/how-to/billing-access)\nof the billing account.\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ "flatPath": "v1/billingAccounts/{billingAccountsId}",
+ "httpMethod": "PATCH",
+ "id": "cloudbilling.billingAccounts.patch",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The name of the billing account resource to be updated.",
+ "location": "path",
+ "pattern": "^billingAccounts/[^/]+$",
+ "required": true,
+ "type": "string"
+ },
+ "updateMask": {
+ "description": "The update mask applied to the resource.\nOnly \"display_name\" is currently supported.",
+ "format": "google-fieldmask",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v1/{+name}",
+ "request": {
+ "$ref": "BillingAccount"
+ },
+ "response": {
+ "$ref": "BillingAccount"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "setIamPolicy": {
+ "description": "Sets the access control policy for a billing account. Replaces any existing\npolicy.\nThe caller must have the `billing.accounts.setIamPolicy` permission on the\naccount, which is often given to billing account\n[administrators](https://cloud.google.com/billing/docs/how-to/billing-access).\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ "flatPath": "v1/billingAccounts/{billingAccountsId}:setIamPolicy",
+ "httpMethod": "POST",
+ "id": "cloudbilling.billingAccounts.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": "^billingAccounts/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:setIamPolicy",
+ "request": {
+ "$ref": "SetIamPolicyRequest"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
+ },
+ "testIamPermissions": {
+ "description": "Tests the access control policy for a billing account. This method takes\nthe resource and a set of permissions as input and returns the subset of\nthe input permissions that the caller is allowed for that resource.\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ "flatPath": "v1/billingAccounts/{billingAccountsId}:testIamPermissions",
+ "httpMethod": "POST",
+ "id": "cloudbilling.billingAccounts.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": "^billingAccounts/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v1/{+resource}:testIamPermissions",
+ "request": {
+ "$ref": "TestIamPermissionsRequest"
+ },
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform"
+ ]
}
},
"resources": {
"projects": {
"methods": {
"list": {
- "description": "Lists the projects associated with a billing account. The current\nauthenticated user must have the \"billing.resourceAssociations.list\" IAM\npermission, which is often given to billing account\n[viewers](https://support.google.com/cloud/answer/4430947).",
+ "description": "Lists the projects associated with a billing account. The current\nauthenticated user must have the `billing.resourceAssociations.list` IAM\npermission, which is often given to billing account\n[viewers](https://cloud.google.com/billing/docs/how-to/billing-access).",
"flatPath": "v1/billingAccounts/{billingAccountsId}/projects",
"httpMethod": "GET",
"id": "cloudbilling.billingAccounts.projects.list",
@@ -241,7 +379,7 @@
]
},
"updateBillingInfo": {
- "description": "Sets or updates the billing account associated with a project. You specify\nthe new billing account by setting the `billing_account_name` in the\n`ProjectBillingInfo` resource to the resource name of a billing account.\nAssociating a project with an open billing account enables billing on the\nproject and allows charges for resource usage. If the project already had a\nbilling account, this method changes the billing account used for resource\nusage charges.\n\n*Note:* Incurred charges that have not yet been reported in the transaction\nhistory of the Google Cloud Console may be billed to the new billing\naccount, even if the charge occurred before the new billing account was\nassigned to the project.\n\nThe current authenticated user must have ownership privileges for both the\n[project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n) and the [billing\naccount](https://support.google.com/cloud/answer/4430947).\n\nYou can disable billing on the project by setting the\n`billing_account_name` field to empty. This action disassociates the\ncurrent billing account from the project. Any billable activity of your\nin-use services will stop, and your application could stop functioning as\nexpected. Any unbilled charges to date will be billed to the previously\nassociated account. The current authenticated user must be either an owner\nof the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have\nmuch the same effect as disabling billing on the project: any paid\nresources used by the project will be shut down. Thus, unless you wish to\ndisable billing, you should always call this method with the name of an\n*open* billing account.",
+ "description": "Sets or updates the billing account associated with a project. You specify\nthe new billing account by setting the `billing_account_name` in the\n`ProjectBillingInfo` resource to the resource name of a billing account.\nAssociating a project with an open billing account enables billing on the\nproject and allows charges for resource usage. If the project already had a\nbilling account, this method changes the billing account used for resource\nusage charges.\n\n*Note:* Incurred charges that have not yet been reported in the transaction\nhistory of the GCP Console might be billed to the new billing\naccount, even if the charge occurred before the new billing account was\nassigned to the project.\n\nThe current authenticated user must have ownership privileges for both the\n[project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n) and the [billing\naccount](https://cloud.google.com/billing/docs/how-to/billing-access).\n\nYou can disable billing on the project by setting the\n`billing_account_name` field to empty. This action disassociates the\ncurrent billing account from the project. Any billable activity of your\nin-use services will stop, and your application could stop functioning as\nexpected. Any unbilled charges to date will be billed to the previously\nassociated account. The current authenticated user must be either an owner\nof the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have\nmuch the same effect as disabling billing on the project: any paid\nresources used by the project will be shut down. Thus, unless you wish to\ndisable billing, you should always call this method with the name of an\n*open* billing account.",
"flatPath": "v1/projects/{projectsId}/billingInfo",
"httpMethod": "PUT",
"id": "cloudbilling.projects.updateBillingInfo",
@@ -355,7 +493,7 @@
}
}
},
- "revision": "20180122",
+ "revision": "20180307",
"rootUrl": "https://cloudbilling.googleapis.com/",
"schemas": {
"AggregationInfo": {
@@ -396,12 +534,64 @@
},
"type": "object"
},
+ "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.\nNext ID: 4",
+ "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"
+ },
"BillingAccount": {
- "description": "A billing account in [Google Cloud\nConsole](https://console.cloud.google.com/). You can assign a billing account\nto one or more projects.",
+ "description": "A billing account in [GCP Console](https://console.cloud.google.com/).\nYou can assign a billing account to one or more projects.",
"id": "BillingAccount",
"properties": {
"displayName": {
- "description": "The display name given to the billing account, such as `My Billing\nAccount`. This name is displayed in the Google Cloud Console.",
+ "description": "The display name given to the billing account, such as `My Billing\nAccount`. This name is displayed in the GCP Console.",
+ "type": "string"
+ },
+ "masterBillingAccount": {
+ "description": "If this account is a\n[subaccount](https://cloud.google.com/billing/docs/concepts), then this\nwill be the resource name of the master billing account that it is being\nresold through.\nOtherwise this will be empty.\n\n\u003e This field is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
"type": "string"
},
"name": {
@@ -415,6 +605,24 @@
},
"type": "object"
},
+ "Binding": {
+ "description": "Associates `members` with a `role`.",
+ "id": "Binding",
+ "properties": {
+ "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` or `joe@example.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`.\nRequired",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Category": {
"description": "Represents the category hierarchy of a SKU.",
"id": "Category",
@@ -531,6 +739,37 @@
},
"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**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\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": {
+ "$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"
+ },
"PricingExpression": {
"description": "Expresses a mathematical pricing formula. For Example:-\n\n`usage_unit: GBy`\n`tiered_rates:`\n `[start_usage_amount: 20, unit_price: $10]`\n `[start_usage_amount: 100, unit_price: $5]`\n\nThe above expresses a pricing formula where the first 20GB is free, the\nnext 80GB is priced at $10 per GB followed by $5 per GB for additional\nusage.",
"id": "PricingExpression",
@@ -601,7 +840,7 @@
"type": "object"
},
"ProjectBillingInfo": {
- "description": "Encapsulation of billing information for a Cloud Console project. A project\nhas at most one associated billing account at a time (but a billing account\ncan be assigned to multiple projects).",
+ "description": "Encapsulation of billing information for a GCP Console project. A project\nhas at most one associated billing account at a time (but a billing account\ncan be assigned to multiple projects).",
"id": "ProjectBillingInfo",
"properties": {
"billingAccountName": {
@@ -642,6 +881,22 @@
},
"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."
+ },
+ "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"
+ },
"Sku": {
"description": "Encapsulates a single SKU in Google Cloud Platform",
"id": "Sku",
@@ -683,6 +938,34 @@
},
"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"
+ },
"TierRate": {
"description": "The price rate indicating starting usage and its corresponding price.",
"id": "TierRate",
@@ -701,6 +984,6 @@
}
},
"servicePath": "",
- "title": "Google Cloud Billing API",
+ "title": "Cloud Billing API",
"version": "v1"
}
\ No newline at end of file
diff --git a/cloudbilling/v1/cloudbilling-gen.go b/cloudbilling/v1/cloudbilling-gen.go
index 239ffeb..f85561f 100644
--- a/cloudbilling/v1/cloudbilling-gen.go
+++ b/cloudbilling/v1/cloudbilling-gen.go
@@ -1,4 +1,4 @@
-// Package cloudbilling provides access to the Google Cloud Billing API.
+// Package cloudbilling provides access to the Cloud Billing API.
//
// See https://cloud.google.com/billing/
//
@@ -177,17 +177,183 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// BillingAccount: A billing account in [Google
-// Cloud
-// Console](https://console.cloud.google.com/). You can assign a billing
-// account
-// to one or more projects.
+// 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.
+ // Next ID: 4
+ 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)
+}
+
+// BillingAccount: A billing account in [GCP
+// Console](https://console.cloud.google.com/).
+// You can assign a billing account to one or more projects.
type BillingAccount struct {
// DisplayName: The display name given to the billing account, such as
// `My Billing
- // Account`. This name is displayed in the Google Cloud Console.
+ // Account`. This name is displayed in the GCP Console.
DisplayName string `json:"displayName,omitempty"`
+ // MasterBillingAccount: If this account is
+ // a
+ // [subaccount](https://cloud.google.com/billing/docs/concepts), then
+ // this
+ // will be the resource name of the master billing account that it is
+ // being
+ // resold through.
+ // Otherwise this will be empty.
+ //
+ // > This field is currently in
+ // > [Beta](https://cloud.google.com/terms/launch-stages).
+ MasterBillingAccount string `json:"masterBillingAccount,omitempty"`
+
// Name: The resource name of the billing account. The resource name has
// the form
// `billingAccounts/{billing_account_id}`. For
@@ -232,6 +398,72 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Binding: Associates `members` with a `role`.
+type Binding struct {
+ // 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` or `joe@example.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`.
+ // Required
+ Role string `json:"role,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Members") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Members") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field 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)
+}
+
// Category: Represents the category hierarchy of a SKU.
type Category struct {
// ResourceFamily: The type of product the SKU refers to.
@@ -476,6 +708,101 @@
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.
+//
+// **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"]
+// }
+// ]
+// }
+//
+// 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"`
+
+ // 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)
+}
+
// PricingExpression: Expresses a mathematical pricing formula. For
// Example:-
//
@@ -659,7 +986,7 @@
return nil
}
-// ProjectBillingInfo: Encapsulation of billing information for a Cloud
+// ProjectBillingInfo: Encapsulation of billing information for a GCP
// Console project. A project
// has at most one associated billing account at a time (but a billing
// account
@@ -760,6 +1087,48 @@
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"`
+
+ // 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,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or 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)
+}
+
// Sku: Encapsulates a single SKU in Google Cloud Platform
type Sku struct {
// Category: The category hierarchy of this SKU, purely for
@@ -817,6 +1186,76 @@
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)
+}
+
// TierRate: The price rate indicating starting usage and its
// corresponding price.
type TierRate struct {
@@ -870,6 +1309,140 @@
return nil
}
+// method id "cloudbilling.billingAccounts.create":
+
+type BillingAccountsCreateCall struct {
+ s *APIService
+ billingaccount *BillingAccount
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Create: Creates a billing account.
+// This method can only be used to create
+// [billing
+// subaccounts](https://cloud.google.com/billing/docs/concepts).
+// When creating a subaccount, the current authenticated user must have
+// the
+// `billing.accounts.update` IAM permission on the master account, which
+// is
+// typically given to billing
+// account
+// [administrators](https://cloud.google.com/billing/docs/how-to/
+// billing-access).
+//
+// > This method is currently in
+// > [Beta](https://cloud.google.com/terms/launch-stages).
+func (r *BillingAccountsService) Create(billingaccount *BillingAccount) *BillingAccountsCreateCall {
+ c := &BillingAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.billingaccount = billingaccount
+ 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 *BillingAccountsCreateCall) Fields(s ...googleapi.Field) *BillingAccountsCreateCall {
+ 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 *BillingAccountsCreateCall) Context(ctx context.Context) *BillingAccountsCreateCall {
+ 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 *BillingAccountsCreateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *BillingAccountsCreateCall) 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.billingaccount)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/billingAccounts")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudbilling.billingAccounts.create" call.
+// Exactly one of *BillingAccount or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *BillingAccount.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 *BillingAccountsCreateCall) Do(opts ...googleapi.CallOption) (*BillingAccount, 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 := &BillingAccount{
+ 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 billing account.\nThis method can only be used to create\n[billing subaccounts](https://cloud.google.com/billing/docs/concepts).\nWhen creating a subaccount, the current authenticated user must have the\n`billing.accounts.update` IAM permission on the master account, which is\ntypically given to billing account\n[administrators](https://cloud.google.com/billing/docs/how-to/billing-access).\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ // "flatPath": "v1/billingAccounts",
+ // "httpMethod": "POST",
+ // "id": "cloudbilling.billingAccounts.create",
+ // "parameterOrder": [],
+ // "parameters": {},
+ // "path": "v1/billingAccounts",
+ // "request": {
+ // "$ref": "BillingAccount"
+ // },
+ // "response": {
+ // "$ref": "BillingAccount"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
// method id "cloudbilling.billingAccounts.get":
type BillingAccountsGetCall struct {
@@ -883,9 +1456,10 @@
// Get: Gets information about a billing account. The current
// authenticated user
-// must be an [owner of the
+// must be a [viewer of the
// billing
-// account](https://support.google.com/cloud/answer/4430947).
+// account](https://cloud.google.com/billing/docs/how-to/billing-
+// access).
func (r *BillingAccountsService) Get(name string) *BillingAccountsGetCall {
c := &BillingAccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
@@ -986,7 +1560,7 @@
}
return ret, nil
// {
- // "description": "Gets information about a billing account. The current authenticated user\nmust be an [owner of the billing\naccount](https://support.google.com/cloud/answer/4430947).",
+ // "description": "Gets information about a billing account. The current authenticated user\nmust be a [viewer of the billing\naccount](https://cloud.google.com/billing/docs/how-to/billing-access).",
// "flatPath": "v1/billingAccounts/{billingAccountsId}",
// "httpMethod": "GET",
// "id": "cloudbilling.billingAccounts.get",
@@ -1013,6 +1587,155 @@
}
+// method id "cloudbilling.billingAccounts.getIamPolicy":
+
+type BillingAccountsGetIamPolicyCall struct {
+ s *APIService
+ resource string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetIamPolicy: Gets the access control policy for a billing
+// account.
+// The caller must have the `billing.accounts.getIamPolicy` permission
+// on the
+// account, which is often given to billing
+// account
+// [viewers](https://cloud.google.com/billing/docs/how-to/billing
+// -access).
+//
+// > This method is currently in
+// > [Beta](https://cloud.google.com/terms/launch-stages).
+func (r *BillingAccountsService) GetIamPolicy(resource string) *BillingAccountsGetIamPolicyCall {
+ c := &BillingAccountsGetIamPolicyCall{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 *BillingAccountsGetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsGetIamPolicyCall {
+ 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 *BillingAccountsGetIamPolicyCall) IfNoneMatch(entityTag string) *BillingAccountsGetIamPolicyCall {
+ 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 *BillingAccountsGetIamPolicyCall) Context(ctx context.Context) *BillingAccountsGetIamPolicyCall {
+ 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 *BillingAccountsGetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *BillingAccountsGetIamPolicyCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ 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 "cloudbilling.billingAccounts.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 *BillingAccountsGetIamPolicyCall) 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 billing account.\nThe caller must have the `billing.accounts.getIamPolicy` permission on the\naccount, which is often given to billing account\n[viewers](https://cloud.google.com/billing/docs/how-to/billing-access).\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ // "flatPath": "v1/billingAccounts/{billingAccountsId}:getIamPolicy",
+ // "httpMethod": "GET",
+ // "id": "cloudbilling.billingAccounts.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": "^billingAccounts/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:getIamPolicy",
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
// method id "cloudbilling.billingAccounts.list":
type BillingAccountsListCall struct {
@@ -1023,14 +1746,34 @@
header_ http.Header
}
-// List: Lists the billing accounts that the current authenticated
-// user
-// [owns](https://support.google.com/cloud/answer/4430947).
+// List: Lists the billing accounts that the current authenticated user
+// has
+// permission to
+// [view](https://cloud.google.com/billing/docs/how-to/billing-access).
func (r *BillingAccountsService) List() *BillingAccountsListCall {
c := &BillingAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
+// Filter sets the optional parameter "filter": Options for how to
+// filter the returned billing accounts.
+// Currently this only supports filtering
+// for
+// [subaccounts](https://cloud.google.com/billing/docs/concepts) under
+// a
+// single provided reseller billing account.
+// (e.g.
+// "master_billing_account=billingAccounts/012345-678901-ABCDEF").
+// Boolea
+// n algebra and other fields are not currently supported.
+//
+// > This field is currently in
+// > [Beta](https://cloud.google.com/terms/launch-stages).
+func (c *BillingAccountsListCall) Filter(filter string) *BillingAccountsListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
// PageSize sets the optional parameter "pageSize": Requested page size.
// The maximum page size is 100; this is also the
// default.
@@ -1141,12 +1884,17 @@
}
return ret, nil
// {
- // "description": "Lists the billing accounts that the current authenticated user\n[owns](https://support.google.com/cloud/answer/4430947).",
+ // "description": "Lists the billing accounts that the current authenticated user has\npermission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).",
// "flatPath": "v1/billingAccounts",
// "httpMethod": "GET",
// "id": "cloudbilling.billingAccounts.list",
// "parameterOrder": [],
// "parameters": {
+ // "filter": {
+ // "description": "Options for how to filter the returned billing accounts.\nCurrently this only supports filtering for\n[subaccounts](https://cloud.google.com/billing/docs/concepts) under a\nsingle provided reseller billing account.\n(e.g. \"master_billing_account=billingAccounts/012345-678901-ABCDEF\").\nBoolean algebra and other fields are not currently supported.\n\n\u003e This field is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ // "location": "query",
+ // "type": "string"
+ // },
// "pageSize": {
// "description": "Requested page size. The maximum page size is 100; this is also the\ndefault.",
// "format": "int32",
@@ -1191,6 +1939,455 @@
}
}
+// method id "cloudbilling.billingAccounts.patch":
+
+type BillingAccountsPatchCall struct {
+ s *APIService
+ name string
+ billingaccount *BillingAccount
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Patch: Updates a billing account's fields.
+// Currently the only field that can be edited is `display_name`.
+// The current authenticated user must have the
+// `billing.accounts.update`
+// IAM permission, which is typically given to
+// the
+// [administrator](https://cloud.google.com/billing/docs/how-to/billi
+// ng-access)
+// of the billing account.
+//
+// > This method is currently in
+// > [Beta](https://cloud.google.com/terms/launch-stages).
+func (r *BillingAccountsService) Patch(name string, billingaccount *BillingAccount) *BillingAccountsPatchCall {
+ c := &BillingAccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.billingaccount = billingaccount
+ return c
+}
+
+// UpdateMask sets the optional parameter "updateMask": The update mask
+// applied to the resource.
+// Only "display_name" is currently supported.
+func (c *BillingAccountsPatchCall) UpdateMask(updateMask string) *BillingAccountsPatchCall {
+ c.urlParams_.Set("updateMask", updateMask)
+ 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 *BillingAccountsPatchCall) Fields(s ...googleapi.Field) *BillingAccountsPatchCall {
+ 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 *BillingAccountsPatchCall) Context(ctx context.Context) *BillingAccountsPatchCall {
+ 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 *BillingAccountsPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *BillingAccountsPatchCall) 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.billingaccount)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("PATCH", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "cloudbilling.billingAccounts.patch" call.
+// Exactly one of *BillingAccount or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *BillingAccount.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 *BillingAccountsPatchCall) Do(opts ...googleapi.CallOption) (*BillingAccount, 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 := &BillingAccount{
+ 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 billing account's fields.\nCurrently the only field that can be edited is `display_name`.\nThe current authenticated user must have the `billing.accounts.update`\nIAM permission, which is typically given to the\n[administrator](https://cloud.google.com/billing/docs/how-to/billing-access)\nof the billing account.\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ // "flatPath": "v1/billingAccounts/{billingAccountsId}",
+ // "httpMethod": "PATCH",
+ // "id": "cloudbilling.billingAccounts.patch",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The name of the billing account resource to be updated.",
+ // "location": "path",
+ // "pattern": "^billingAccounts/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "updateMask": {
+ // "description": "The update mask applied to the resource.\nOnly \"display_name\" is currently supported.",
+ // "format": "google-fieldmask",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+name}",
+ // "request": {
+ // "$ref": "BillingAccount"
+ // },
+ // "response": {
+ // "$ref": "BillingAccount"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudbilling.billingAccounts.setIamPolicy":
+
+type BillingAccountsSetIamPolicyCall struct {
+ s *APIService
+ resource string
+ setiampolicyrequest *SetIamPolicyRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SetIamPolicy: Sets the access control policy for a billing account.
+// Replaces any existing
+// policy.
+// The caller must have the `billing.accounts.setIamPolicy` permission
+// on the
+// account, which is often given to billing
+// account
+// [administrators](https://cloud.google.com/billing/docs/how-to/
+// billing-access).
+//
+// > This method is currently in
+// > [Beta](https://cloud.google.com/terms/launch-stages).
+func (r *BillingAccountsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *BillingAccountsSetIamPolicyCall {
+ c := &BillingAccountsSetIamPolicyCall{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 *BillingAccountsSetIamPolicyCall) Fields(s ...googleapi.Field) *BillingAccountsSetIamPolicyCall {
+ 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 *BillingAccountsSetIamPolicyCall) Context(ctx context.Context) *BillingAccountsSetIamPolicyCall {
+ 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 *BillingAccountsSetIamPolicyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *BillingAccountsSetIamPolicyCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ 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 "cloudbilling.billingAccounts.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 *BillingAccountsSetIamPolicyCall) 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 a billing account. Replaces any existing\npolicy.\nThe caller must have the `billing.accounts.setIamPolicy` permission on the\naccount, which is often given to billing account\n[administrators](https://cloud.google.com/billing/docs/how-to/billing-access).\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ // "flatPath": "v1/billingAccounts/{billingAccountsId}:setIamPolicy",
+ // "httpMethod": "POST",
+ // "id": "cloudbilling.billingAccounts.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": "^billingAccounts/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:setIamPolicy",
+ // "request": {
+ // "$ref": "SetIamPolicyRequest"
+ // },
+ // "response": {
+ // "$ref": "Policy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
+// method id "cloudbilling.billingAccounts.testIamPermissions":
+
+type BillingAccountsTestIamPermissionsCall struct {
+ s *APIService
+ resource string
+ testiampermissionsrequest *TestIamPermissionsRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// TestIamPermissions: Tests the access control policy for a billing
+// account. This method takes
+// the resource and a set of permissions as input and returns the subset
+// of
+// the input permissions that the caller is allowed for that
+// resource.
+//
+// > This method is currently in
+// > [Beta](https://cloud.google.com/terms/launch-stages).
+func (r *BillingAccountsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *BillingAccountsTestIamPermissionsCall {
+ c := &BillingAccountsTestIamPermissionsCall{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 *BillingAccountsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BillingAccountsTestIamPermissionsCall {
+ 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 *BillingAccountsTestIamPermissionsCall) Context(ctx context.Context) *BillingAccountsTestIamPermissionsCall {
+ 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 *BillingAccountsTestIamPermissionsCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *BillingAccountsTestIamPermissionsCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ 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 "cloudbilling.billingAccounts.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 *BillingAccountsTestIamPermissionsCall) 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": "Tests the access control policy for a billing account. This method takes\nthe resource and a set of permissions as input and returns the subset of\nthe input permissions that the caller is allowed for that resource.\n\n\u003e This method is currently in\n\u003e [Beta](https://cloud.google.com/terms/launch-stages).",
+ // "flatPath": "v1/billingAccounts/{billingAccountsId}:testIamPermissions",
+ // "httpMethod": "POST",
+ // "id": "cloudbilling.billingAccounts.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": "^billingAccounts/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v1/{+resource}:testIamPermissions",
+ // "request": {
+ // "$ref": "TestIamPermissionsRequest"
+ // },
+ // "response": {
+ // "$ref": "TestIamPermissionsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform"
+ // ]
+ // }
+
+}
+
// method id "cloudbilling.billingAccounts.projects.list":
type BillingAccountsProjectsListCall struct {
@@ -1204,11 +2401,12 @@
// List: Lists the projects associated with a billing account. The
// current
-// authenticated user must have the "billing.resourceAssociations.list"
+// authenticated user must have the `billing.resourceAssociations.list`
// IAM
// permission, which is often given to billing
// account
-// [viewers](https://support.google.com/cloud/answer/4430947).
+// [viewers](https://cloud.google.com/billing/docs/how-to/billing
+// -access).
func (r *BillingAccountsProjectsService) List(name string) *BillingAccountsProjectsListCall {
c := &BillingAccountsProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
@@ -1328,7 +2526,7 @@
}
return ret, nil
// {
- // "description": "Lists the projects associated with a billing account. The current\nauthenticated user must have the \"billing.resourceAssociations.list\" IAM\npermission, which is often given to billing account\n[viewers](https://support.google.com/cloud/answer/4430947).",
+ // "description": "Lists the projects associated with a billing account. The current\nauthenticated user must have the `billing.resourceAssociations.list` IAM\npermission, which is often given to billing account\n[viewers](https://cloud.google.com/billing/docs/how-to/billing-access).",
// "flatPath": "v1/billingAccounts/{billingAccountsId}/projects",
// "httpMethod": "GET",
// "id": "cloudbilling.billingAccounts.projects.list",
@@ -1559,7 +2757,7 @@
//
// *Note:* Incurred charges that have not yet been reported in the
// transaction
-// history of the Google Cloud Console may be billed to the new
+// history of the GCP Console might be billed to the new
// billing
// account, even if the charge occurred before the new billing account
// was
@@ -1572,10 +2770,10 @@
// 0oxofvnoo
// ) and the
// [billing
-// account](https://support.google.com/cloud/answer/4430947).
+// account](https://cloud.google.com/billing/docs/how-to/billing
+// -access).
//
-// Y
-// ou can disable billing on the project by setting
+// You can disable billing on the project by setting
// the
// `billing_account_name` field to empty. This action disassociates
// the
@@ -1692,7 +2890,7 @@
}
return ret, nil
// {
- // "description": "Sets or updates the billing account associated with a project. You specify\nthe new billing account by setting the `billing_account_name` in the\n`ProjectBillingInfo` resource to the resource name of a billing account.\nAssociating a project with an open billing account enables billing on the\nproject and allows charges for resource usage. If the project already had a\nbilling account, this method changes the billing account used for resource\nusage charges.\n\n*Note:* Incurred charges that have not yet been reported in the transaction\nhistory of the Google Cloud Console may be billed to the new billing\naccount, even if the charge occurred before the new billing account was\nassigned to the project.\n\nThe current authenticated user must have ownership privileges for both the\n[project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n) and the [billing\naccount](https://support.google.com/cloud/answer/4430947).\n\nYou can disable billing on the project by setting the\n`billing_account_name` field to empty. This action disassociates the\ncurrent billing account from the project. Any billable activity of your\nin-use services will stop, and your application could stop functioning as\nexpected. Any unbilled charges to date will be billed to the previously\nassociated account. The current authenticated user must be either an owner\nof the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have\nmuch the same effect as disabling billing on the project: any paid\nresources used by the project will be shut down. Thus, unless you wish to\ndisable billing, you should always call this method with the name of an\n*open* billing account.",
+ // "description": "Sets or updates the billing account associated with a project. You specify\nthe new billing account by setting the `billing_account_name` in the\n`ProjectBillingInfo` resource to the resource name of a billing account.\nAssociating a project with an open billing account enables billing on the\nproject and allows charges for resource usage. If the project already had a\nbilling account, this method changes the billing account used for resource\nusage charges.\n\n*Note:* Incurred charges that have not yet been reported in the transaction\nhistory of the GCP Console might be billed to the new billing\naccount, even if the charge occurred before the new billing account was\nassigned to the project.\n\nThe current authenticated user must have ownership privileges for both the\n[project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n) and the [billing\naccount](https://cloud.google.com/billing/docs/how-to/billing-access).\n\nYou can disable billing on the project by setting the\n`billing_account_name` field to empty. This action disassociates the\ncurrent billing account from the project. Any billable activity of your\nin-use services will stop, and your application could stop functioning as\nexpected. Any unbilled charges to date will be billed to the previously\nassociated account. The current authenticated user must be either an owner\nof the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have\nmuch the same effect as disabling billing on the project: any paid\nresources used by the project will be shut down. Thus, unless you wish to\ndisable billing, you should always call this method with the name of an\n*open* billing account.",
// "flatPath": "v1/projects/{projectsId}/billingInfo",
// "httpMethod": "PUT",
// "id": "cloudbilling.projects.updateBillingInfo",
diff --git a/container/v1/container-api.json b/container/v1/container-api.json
index ef67382..c0525bd 100644
--- a/container/v1/container-api.json
+++ b/container/v1/container-api.json
@@ -1364,7 +1364,7 @@
}
}
},
- "revision": "20180213",
+ "revision": "20180223",
"rootUrl": "https://container.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
@@ -1604,7 +1604,8 @@
"RUNNING",
"RECONCILING",
"STOPPING",
- "ERROR"
+ "ERROR",
+ "DEGRADED"
],
"enumDescriptions": [
"Not set.",
@@ -1612,7 +1613,8 @@
"The RUNNING state indicates the cluster has been created and is fully\nusable.",
"The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.",
"The STOPPING state indicates the cluster is being deleted.",
- "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field."
+ "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field.",
+ "The DEGRADED state indicates the cluster requires user action to restore\nfull functionality. Details can be found in the `statusMessage` field."
],
"type": "string"
},
diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go
index 8328fde..f877c6a 100644
--- a/container/v1/container-gen.go
+++ b/container/v1/container-gen.go
@@ -560,6 +560,10 @@
// "ERROR" - The ERROR state indicates the cluster may be unusable.
// Details
// can be found in the `statusMessage` field.
+ // "DEGRADED" - The DEGRADED state indicates the cluster requires user
+ // action to restore
+ // full functionality. Details can be found in the `statusMessage`
+ // field.
Status string `json:"status,omitempty"`
// StatusMessage: [Output only] Additional information about the current
diff --git a/content/v2/content-api.json b/content/v2/content-api.json
index 68abe21..2211821 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": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/gJB8GL3rqyQgZKVcAAG1fQCi82g\"",
+ "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/1qOLk-oK_dMC3AStRBy-xt64OKE\"",
"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"
@@ -2497,7 +2497,7 @@
}
}
},
- "revision": "20180227",
+ "revision": "20180305",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"Account": {
@@ -3551,7 +3551,7 @@
"description": "The data feed to insert."
},
"datafeedId": {
- "description": "The ID of the data feed to get or delete.",
+ "description": "The ID of the data feed to get, delete or fetch.",
"format": "uint64",
"type": "string"
},
diff --git a/content/v2/content-gen.go b/content/v2/content-gen.go
index 24a9a13..e813669 100644
--- a/content/v2/content-gen.go
+++ b/content/v2/content-gen.go
@@ -1822,7 +1822,7 @@
// Datafeed: The data feed to insert.
Datafeed *Datafeed `json:"datafeed,omitempty"`
- // DatafeedId: The ID of the data feed to get or delete.
+ // 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.
diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json
index 7229cb6..216a1e2 100644
--- a/dataproc/v1/dataproc-api.json
+++ b/dataproc/v1/dataproc-api.json
@@ -9,7 +9,7 @@
}
},
"basePath": "",
- "baseUrl": "https://dataproc.googleapis.com/",
+ "baseUrl": "https://content-dataproc.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Dataproc",
"description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.",
@@ -783,8 +783,8 @@
}
}
},
- "revision": "20180227",
- "rootUrl": "https://dataproc.googleapis.com/",
+ "revision": "20180306",
+ "rootUrl": "https://content-dataproc.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
"description": "Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine.",
@@ -796,7 +796,7 @@
"type": "integer"
},
"acceleratorTypeUri": {
- "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes.Examples:\nhttps://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80\nprojects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80\nnvidia-tesla-k80",
+ "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes.Examples:\nhttps://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80\nprojects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80\nnvidia-tesla-k80",
"type": "string"
}
},
@@ -809,7 +809,7 @@
"type": "object"
},
"Cluster": {
- "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.",
+ "description": "Describes the identifying information, config, and status of a cluster of Compute Engine instances.",
"id": "Cluster",
"properties": {
"clusterName": {
@@ -858,12 +858,12 @@
"id": "ClusterConfig",
"properties": {
"configBucket": {
- "description": "Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.",
+ "description": "Optional. A Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.",
"type": "string"
},
"gceClusterConfig": {
"$ref": "GceClusterConfig",
- "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster."
+ "description": "Required. The shared Compute Engine config settings for all instances in a cluster."
},
"initializationActions": {
"description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n",
@@ -874,11 +874,11 @@
},
"masterConfig": {
"$ref": "InstanceGroupConfig",
- "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster."
+ "description": "Optional. The Compute Engine config settings for the master instance in a cluster."
},
"secondaryWorkerConfig": {
"$ref": "InstanceGroupConfig",
- "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster."
+ "description": "Optional. The Compute Engine config settings for additional worker instances in a cluster."
},
"softwareConfig": {
"$ref": "SoftwareConfig",
@@ -886,7 +886,7 @@
},
"workerConfig": {
"$ref": "InstanceGroupConfig",
- "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster."
+ "description": "Optional. The Compute Engine config settings for worker instances in a cluster."
}
},
"type": "object"
@@ -1089,7 +1089,7 @@
"type": "object"
},
"GceClusterConfig": {
- "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.",
+ "description": "Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster.",
"id": "GceClusterConfig",
"properties": {
"internalIpOnly": {
@@ -1100,15 +1100,15 @@
"additionalProperties": {
"type": "string"
},
- "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).",
+ "description": "The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).",
"type": "object"
},
"networkUri": {
- "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault",
+ "description": "Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault",
"type": "string"
},
"serviceAccount": {
- "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com",
+ "description": "Optional. The service account of the instances. Defaults to the default Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com",
"type": "string"
},
"serviceAccountScopes": {
@@ -1119,18 +1119,18 @@
"type": "array"
},
"subnetworkUri": {
- "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0",
+ "description": "Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0",
"type": "string"
},
"tags": {
- "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).",
+ "description": "The Compute Engine tags to add to all instances (see Tagging instances).",
"items": {
"type": "string"
},
"type": "array"
},
"zoneUri": {
- "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f",
+ "description": "Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f",
"type": "string"
}
},
@@ -1231,11 +1231,11 @@
"type": "object"
},
"InstanceGroupConfig": {
- "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.",
+ "description": "Optional. The config settings for Compute Engine resources in an instance group, such as a master or worker group.",
"id": "InstanceGroupConfig",
"properties": {
"accelerators": {
- "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.",
+ "description": "Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.",
"items": {
"$ref": "AcceleratorConfig"
},
@@ -1246,7 +1246,7 @@
"description": "Optional. Disk option config settings."
},
"imageUri": {
- "description": "Output only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.",
+ "description": "Output only. The Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.",
"type": "string"
},
"instanceNames": {
@@ -1261,12 +1261,12 @@
"type": "boolean"
},
"machineTypeUri": {
- "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2",
+ "description": "Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2",
"type": "string"
},
"managedGroupConfig": {
"$ref": "ManagedGroupConfig",
- "description": "Output only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups."
+ "description": "Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups."
},
"numInstances": {
"description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.",
@@ -1553,7 +1553,7 @@
"id": "NodeInitializationAction",
"properties": {
"executableFile": {
- "description": "Required. Google Cloud Storage URI of executable file.",
+ "description": "Required. Cloud Storage URI of executable file.",
"type": "string"
},
"executionTimeout": {
diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go
index f0e4943..796fb98 100644
--- a/dataproc/v1/dataproc-gen.go
+++ b/dataproc/v1/dataproc-gen.go
@@ -43,7 +43,7 @@
const apiId = "dataproc:v1"
const apiName = "dataproc"
const apiVersion = "v1"
-const basePath = "https://dataproc.googleapis.com/"
+const basePath = "https://content-dataproc.googleapis.com/"
// OAuth2 scopes used by this API.
const (
@@ -140,8 +140,8 @@
AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
// AcceleratorTypeUri: Full URL, partial URI, or short name of the
- // accelerator type resource to expose to this instance. See Google
- // Compute Engine
+ // accelerator type resource to expose to this instance. See Compute
+ // Engine
// AcceleratorTypes.Examples:
// https://www.googleapis.com/compute/beta/pro
// jects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
@@ -180,7 +180,7 @@
}
// Cluster: Describes the identifying information, config, and status of
-// a cluster of Google Compute Engine instances.
+// a cluster of Compute Engine instances.
type Cluster struct {
// ClusterName: Required. The cluster name. Cluster names within a
// project must be unique. Names of deleted clusters can be reused.
@@ -247,8 +247,8 @@
// ClusterConfig: The cluster config.
type ClusterConfig struct {
- // ConfigBucket: Optional. A Google Cloud Storage staging bucket used
- // for sharing generated SSH keys and config. If you do not specify a
+ // ConfigBucket: Optional. A Cloud Storage staging bucket used for
+ // sharing generated SSH keys and config. If you do not specify a
// staging bucket, Cloud Dataproc will determine an appropriate Cloud
// Storage location (US, ASIA, or EU) for your cluster's staging bucket
// according to the Google Compute Engine zone where your cluster is
@@ -256,8 +256,8 @@
// per-location bucket for you.
ConfigBucket string `json:"configBucket,omitempty"`
- // GceClusterConfig: Required. The shared Google Compute Engine config
- // settings for all instances in a cluster.
+ // GceClusterConfig: Required. The shared Compute Engine config settings
+ // for all instances in a cluster.
GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"`
// InitializationActions: Optional. Commands to execute on each node
@@ -276,20 +276,20 @@
//
InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"`
- // MasterConfig: Optional. The Google Compute Engine config settings for
- // the master instance in a cluster.
+ // MasterConfig: Optional. The Compute Engine config settings for the
+ // master instance in a cluster.
MasterConfig *InstanceGroupConfig `json:"masterConfig,omitempty"`
- // SecondaryWorkerConfig: Optional. The Google Compute Engine config
- // settings for additional worker instances in a cluster.
+ // SecondaryWorkerConfig: Optional. The Compute Engine config settings
+ // for additional worker instances in a cluster.
SecondaryWorkerConfig *InstanceGroupConfig `json:"secondaryWorkerConfig,omitempty"`
// SoftwareConfig: Optional. The config settings for software inside the
// cluster.
SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
- // WorkerConfig: Optional. The Google Compute Engine config settings for
- // worker instances in a cluster.
+ // WorkerConfig: Optional. The Compute Engine config settings for worker
+ // instances in a cluster.
WorkerConfig *InstanceGroupConfig `json:"workerConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "ConfigBucket") to
@@ -591,9 +591,8 @@
googleapi.ServerResponse `json:"-"`
}
-// GceClusterConfig: Common config settings for resources of Google
-// Compute Engine cluster instances, applicable to all instances in the
-// cluster.
+// GceClusterConfig: Common config settings for resources of Compute
+// Engine cluster instances, applicable to all instances in the cluster.
type GceClusterConfig struct {
// InternalIpOnly: Optional. If true, all instances in the cluster will
// only have internal IP addresses. By default, clusters are not
@@ -604,15 +603,15 @@
// without external IP addresses.
InternalIpOnly bool `json:"internalIpOnly,omitempty"`
- // Metadata: The Google Compute Engine metadata entries to add to all
- // instances (see Project and instance metadata
+ // Metadata: The Compute Engine metadata entries to add to all instances
+ // (see Project and instance metadata
// (https://cloud.google.com/compute/docs/storing-retrieving-metadata#pro
// ject_and_instance_metadata)).
Metadata map[string]string `json:"metadata,omitempty"`
- // NetworkUri: Optional. The Google Compute Engine network to be used
- // for machine communications. Cannot be specified with subnetwork_uri.
- // If neither network_uri nor subnetwork_uri is specified, the "default"
+ // NetworkUri: Optional. The Compute Engine network to be used for
+ // machine communications. Cannot be specified with subnetwork_uri. If
+ // neither network_uri nor subnetwork_uri is specified, the "default"
// network of the project is used, if it exists. Cannot be a "Custom
// Subnet Network" (see Using Subnetworks for more information).A full
// URL, partial URI, or short name are valid.
@@ -625,7 +624,7 @@
NetworkUri string `json:"networkUri,omitempty"`
// ServiceAccount: Optional. The service account of the instances.
- // Defaults to the default Google Compute Engine service account. Custom
+ // Defaults to the default Compute Engine service account. Custom
// service accounts need permissions equivalent to the folloing IAM
// roles:
// roles/logging.logWriter
@@ -653,9 +652,9 @@
// https://www.googleapis.com/auth/devstorage.full_control
ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
- // SubnetworkUri: Optional. The Google Compute Engine subnetwork to be
- // used for machine communications. Cannot be specified with
- // network_uri.A full URL, partial URI, or short name are valid.
+ // SubnetworkUri: Optional. The Compute Engine subnetwork to be used for
+ // machine communications. Cannot be specified with network_uri.A full
+ // URL, partial URI, or short name are valid.
// Examples:
// https://www.googleapis.com/compute/v1/projects/[project_id]/
// regions/us-east1/sub0
@@ -663,14 +662,14 @@
// sub0
SubnetworkUri string `json:"subnetworkUri,omitempty"`
- // Tags: The Google Compute Engine tags to add to all instances (see
- // Tagging instances).
+ // Tags: The Compute Engine tags to add to all instances (see Tagging
+ // instances).
Tags []string `json:"tags,omitempty"`
- // ZoneUri: Optional. The zone where the Google Compute Engine cluster
- // will be located. On a create request, it is required in the "global"
- // region. If omitted in a non-global Cloud Dataproc region, the service
- // will pick a zone in the corresponding Compute Engine region. On a get
+ // ZoneUri: Optional. The zone where the Compute Engine cluster will be
+ // located. On a create request, it is required in the "global" region.
+ // If omitted in a non-global Cloud Dataproc region, the service will
+ // pick a zone in the corresponding Compute Engine region. On a get
// request, zone will always be present.A full URL, partial URI, or
// short name are valid.
// Examples:
@@ -829,20 +828,19 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// InstanceGroupConfig: Optional. The config settings for Google Compute
-// Engine resources in an instance group, such as a master or worker
-// group.
+// InstanceGroupConfig: Optional. The config settings for Compute Engine
+// resources in an instance group, such as a master or worker group.
type InstanceGroupConfig struct {
- // Accelerators: Optional. The Google Compute Engine accelerator
- // configuration for these instances.Beta Feature: This feature is still
- // under development. It may be changed before final release.
+ // Accelerators: Optional. The Compute Engine accelerator configuration
+ // for these instances.Beta Feature: This feature is still under
+ // development. It may be changed before final release.
Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"`
// DiskConfig: Optional. Disk option config settings.
DiskConfig *DiskConfig `json:"diskConfig,omitempty"`
- // ImageUri: Output only. The Google Compute Engine image resource used
- // for cluster instances. Inferred from SoftwareConfig.image_version.
+ // ImageUri: Output only. The Compute Engine image resource used for
+ // cluster instances. Inferred from SoftwareConfig.image_version.
ImageUri string `json:"imageUri,omitempty"`
// InstanceNames: Optional. The list of instance names. Cloud Dataproc
@@ -855,9 +853,8 @@
// preemptible instances.
IsPreemptible bool `json:"isPreemptible,omitempty"`
- // MachineTypeUri: Optional. The Google Compute Engine machine type used
- // for cluster instances.A full URL, partial URI, or short name are
- // valid.
+ // MachineTypeUri: Optional. The Compute Engine machine type used for
+ // cluster instances.A full URL, partial URI, or short name are valid.
// Examples:
// https://www.googleapis.com/compute/v1/projects/[project_id]/
// zones/us-east1-a/machineTypes/n1-standard-2
@@ -866,7 +863,7 @@
// n1-standard-2
MachineTypeUri string `json:"machineTypeUri,omitempty"`
- // ManagedGroupConfig: Output only. The config for Google Compute Engine
+ // ManagedGroupConfig: Output only. The config for Compute Engine
// Instance Group Manager that manages this group. This is only used for
// preemptible instance groups.
ManagedGroupConfig *ManagedGroupConfig `json:"managedGroupConfig,omitempty"`
@@ -1346,8 +1343,7 @@
// NodeInitializationAction: Specifies an executable to run on a fully
// configured node and a timeout period for executable completion.
type NodeInitializationAction struct {
- // ExecutableFile: Required. Google Cloud Storage URI of executable
- // file.
+ // ExecutableFile: Required. Cloud Storage URI of executable file.
ExecutableFile string `json:"executableFile,omitempty"`
// ExecutionTimeout: Optional. Amount of time executable has to
diff --git a/dataproc/v1beta2/dataproc-api.json b/dataproc/v1beta2/dataproc-api.json
index 35e670f..dd72b5b 100644
--- a/dataproc/v1beta2/dataproc-api.json
+++ b/dataproc/v1beta2/dataproc-api.json
@@ -9,7 +9,7 @@
}
},
"basePath": "",
- "baseUrl": "https://dataproc.googleapis.com/",
+ "baseUrl": "https://content-dataproc.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Dataproc",
"description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.",
@@ -1630,8 +1630,8 @@
}
}
},
- "revision": "20180227",
- "rootUrl": "https://dataproc.googleapis.com/",
+ "revision": "20180306",
+ "rootUrl": "https://content-dataproc.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
"description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).",
@@ -1643,7 +1643,7 @@
"type": "integer"
},
"acceleratorTypeUri": {
- "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80",
+ "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80",
"type": "string"
}
},
@@ -1674,7 +1674,7 @@
"type": "object"
},
"Cluster": {
- "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.",
+ "description": "Describes the identifying information, config, and status of a cluster of Compute Engine instances.",
"id": "Cluster",
"properties": {
"clusterName": {
@@ -1723,12 +1723,12 @@
"id": "ClusterConfig",
"properties": {
"configBucket": {
- "description": "Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.",
+ "description": "Optional. A Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.",
"type": "string"
},
"gceClusterConfig": {
"$ref": "GceClusterConfig",
- "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster."
+ "description": "Required. The shared Compute Engine config settings for all instances in a cluster."
},
"initializationActions": {
"description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n",
@@ -1743,11 +1743,11 @@
},
"masterConfig": {
"$ref": "InstanceGroupConfig",
- "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster."
+ "description": "Optional. The Compute Engine config settings for the master instance in a cluster."
},
"secondaryWorkerConfig": {
"$ref": "InstanceGroupConfig",
- "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster."
+ "description": "Optional. The Compute Engine config settings for additional worker instances in a cluster."
},
"softwareConfig": {
"$ref": "SoftwareConfig",
@@ -1755,7 +1755,7 @@
},
"workerConfig": {
"$ref": "InstanceGroupConfig",
- "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster."
+ "description": "Optional. The Compute Engine config settings for worker instances in a cluster."
}
},
"type": "object"
@@ -1965,7 +1965,7 @@
"id": "DiagnoseClusterResults",
"properties": {
"outputUri": {
- "description": "Output only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.",
+ "description": "Output only. The Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.",
"type": "string"
}
},
@@ -1999,7 +1999,7 @@
"type": "object"
},
"GceClusterConfig": {
- "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.",
+ "description": "Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster.",
"id": "GceClusterConfig",
"properties": {
"internalIpOnly": {
@@ -2010,15 +2010,15 @@
"additionalProperties": {
"type": "string"
},
- "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).",
+ "description": "The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).",
"type": "object"
},
"networkUri": {
- "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault",
+ "description": "Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault",
"type": "string"
},
"serviceAccount": {
- "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com",
+ "description": "Optional. The service account of the instances. Defaults to the default Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com",
"type": "string"
},
"serviceAccountScopes": {
@@ -2029,18 +2029,18 @@
"type": "array"
},
"subnetworkUri": {
- "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0",
+ "description": "Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0",
"type": "string"
},
"tags": {
- "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).",
+ "description": "The Compute Engine tags to add to all instances (see Tagging instances).",
"items": {
"type": "string"
},
"type": "array"
},
"zoneUri": {
- "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f",
+ "description": "Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f",
"type": "string"
}
},
@@ -2141,11 +2141,11 @@
"type": "object"
},
"InstanceGroupConfig": {
- "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.",
+ "description": "Optional. The config settings for Compute Engine resources in an instance group, such as a master or worker group.",
"id": "InstanceGroupConfig",
"properties": {
"accelerators": {
- "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.",
+ "description": "Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.",
"items": {
"$ref": "AcceleratorConfig"
},
@@ -2156,7 +2156,7 @@
"description": "Optional. Disk option config settings."
},
"imageUri": {
- "description": "Output only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.",
+ "description": "Output only. The Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.",
"type": "string"
},
"instanceNames": {
@@ -2171,12 +2171,12 @@
"type": "boolean"
},
"machineTypeUri": {
- "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2",
+ "description": "Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2",
"type": "string"
},
"managedGroupConfig": {
"$ref": "ManagedGroupConfig",
- "description": "Output only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups."
+ "description": "Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups."
},
"minCpuPlatform": {
"description": "Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc\u0026rarr;Minimum CPU Platform.",
@@ -2545,7 +2545,7 @@
"id": "NodeInitializationAction",
"properties": {
"executableFile": {
- "description": "Required. Google Cloud Storage URI of executable file.",
+ "description": "Required. Cloud Storage URI of executable file.",
"type": "string"
},
"executionTimeout": {
diff --git a/dataproc/v1beta2/dataproc-gen.go b/dataproc/v1beta2/dataproc-gen.go
index 66dd897..41acaa9 100644
--- a/dataproc/v1beta2/dataproc-gen.go
+++ b/dataproc/v1beta2/dataproc-gen.go
@@ -43,7 +43,7 @@
const apiId = "dataproc:v1beta2"
const apiName = "dataproc"
const apiVersion = "v1beta2"
-const basePath = "https://dataproc.googleapis.com/"
+const basePath = "https://content-dataproc.googleapis.com/"
// OAuth2 scopes used by this API.
const (
@@ -177,8 +177,8 @@
AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
// AcceleratorTypeUri: Full URL, partial URI, or short name of the
- // accelerator type resource to expose to this instance. See Google
- // Compute Engine AcceleratorTypes(
+ // accelerator type resource to expose to this instance. See Compute
+ // Engine AcceleratorTypes(
// /compute/docs/reference/beta/acceleratorTypes)Examples *
// https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 *
// nvidia-tesla-k80
@@ -261,7 +261,7 @@
}
// Cluster: Describes the identifying information, config, and status of
-// a cluster of Google Compute Engine instances.
+// a cluster of Compute Engine instances.
type Cluster struct {
// ClusterName: Required. The cluster name. Cluster names within a
// project must be unique. Names of deleted clusters can be reused.
@@ -328,8 +328,8 @@
// ClusterConfig: The cluster config.
type ClusterConfig struct {
- // ConfigBucket: Optional. A Google Cloud Storage staging bucket used
- // for sharing generated SSH keys and config. If you do not specify a
+ // ConfigBucket: Optional. A Cloud Storage staging bucket used for
+ // sharing generated SSH keys and config. If you do not specify a
// staging bucket, Cloud Dataproc will determine an appropriate Cloud
// Storage location (US, ASIA, or EU) for your cluster's staging bucket
// according to the Google Compute Engine zone where your cluster is
@@ -337,8 +337,8 @@
// per-location bucket for you.
ConfigBucket string `json:"configBucket,omitempty"`
- // GceClusterConfig: Required. The shared Google Compute Engine config
- // settings for all instances in a cluster.
+ // GceClusterConfig: Required. The shared Compute Engine config settings
+ // for all instances in a cluster.
GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"`
// InitializationActions: Optional. Commands to execute on each node
@@ -360,20 +360,20 @@
// schedule.
LifecycleConfig *LifecycleConfig `json:"lifecycleConfig,omitempty"`
- // MasterConfig: Optional. The Google Compute Engine config settings for
- // the master instance in a cluster.
+ // MasterConfig: Optional. The Compute Engine config settings for the
+ // master instance in a cluster.
MasterConfig *InstanceGroupConfig `json:"masterConfig,omitempty"`
- // SecondaryWorkerConfig: Optional. The Google Compute Engine config
- // settings for additional worker instances in a cluster.
+ // SecondaryWorkerConfig: Optional. The Compute Engine config settings
+ // for additional worker instances in a cluster.
SecondaryWorkerConfig *InstanceGroupConfig `json:"secondaryWorkerConfig,omitempty"`
// SoftwareConfig: Optional. The config settings for software inside the
// cluster.
SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
- // WorkerConfig: Optional. The Google Compute Engine config settings for
- // worker instances in a cluster.
+ // WorkerConfig: Optional. The Compute Engine config settings for worker
+ // instances in a cluster.
WorkerConfig *InstanceGroupConfig `json:"workerConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "ConfigBucket") to
@@ -662,9 +662,9 @@
// DiagnoseClusterResults: The location of diagnostic output.
type DiagnoseClusterResults struct {
- // OutputUri: Output only. The Google Cloud Storage URI of the
- // diagnostic output. The output report is a plain text file with a
- // summary of collected diagnostics.
+ // OutputUri: Output only. The Cloud Storage URI of the diagnostic
+ // output. The output report is a plain text file with a summary of
+ // collected diagnostics.
OutputUri string `json:"outputUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "OutputUri") to
@@ -750,9 +750,8 @@
googleapi.ServerResponse `json:"-"`
}
-// GceClusterConfig: Common config settings for resources of Google
-// Compute Engine cluster instances, applicable to all instances in the
-// cluster.
+// GceClusterConfig: Common config settings for resources of Compute
+// Engine cluster instances, applicable to all instances in the cluster.
type GceClusterConfig struct {
// InternalIpOnly: Optional. If true, all instances in the cluster will
// only have internal IP addresses. By default, clusters are not
@@ -763,15 +762,15 @@
// without external IP addresses.
InternalIpOnly bool `json:"internalIpOnly,omitempty"`
- // Metadata: The Google Compute Engine metadata entries to add to all
- // instances (see Project and instance metadata
+ // Metadata: The Compute Engine metadata entries to add to all instances
+ // (see Project and instance metadata
// (https://cloud.google.com/compute/docs/storing-retrieving-metadata#pro
// ject_and_instance_metadata)).
Metadata map[string]string `json:"metadata,omitempty"`
- // NetworkUri: Optional. The Google Compute Engine network to be used
- // for machine communications. Cannot be specified with subnetwork_uri.
- // If neither network_uri nor subnetwork_uri is specified, the "default"
+ // NetworkUri: Optional. The Compute Engine network to be used for
+ // machine communications. Cannot be specified with subnetwork_uri. If
+ // neither network_uri nor subnetwork_uri is specified, the "default"
// network of the project is used, if it exists. Cannot be a "Custom
// Subnet Network" (see Using Subnetworks for more information).A full
// URL, partial URI, or short name are valid.
@@ -784,7 +783,7 @@
NetworkUri string `json:"networkUri,omitempty"`
// ServiceAccount: Optional. The service account of the instances.
- // Defaults to the default Google Compute Engine service account. Custom
+ // Defaults to the default Compute Engine service account. Custom
// service accounts need permissions equivalent to the folloing IAM
// roles:
// roles/logging.logWriter
@@ -812,9 +811,9 @@
// https://www.googleapis.com/auth/devstorage.full_control
ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
- // SubnetworkUri: Optional. The Google Compute Engine subnetwork to be
- // used for machine communications. Cannot be specified with
- // network_uri.A full URL, partial URI, or short name are valid.
+ // SubnetworkUri: Optional. The Compute Engine subnetwork to be used for
+ // machine communications. Cannot be specified with network_uri.A full
+ // URL, partial URI, or short name are valid.
// Examples:
// https://www.googleapis.com/compute/v1/projects/[project_id]/
// regions/us-east1/sub0
@@ -822,14 +821,14 @@
// sub0
SubnetworkUri string `json:"subnetworkUri,omitempty"`
- // Tags: The Google Compute Engine tags to add to all instances (see
- // Tagging instances).
+ // Tags: The Compute Engine tags to add to all instances (see Tagging
+ // instances).
Tags []string `json:"tags,omitempty"`
- // ZoneUri: Optional. The zone where the Google Compute Engine cluster
- // will be located. On a create request, it is required in the "global"
- // region. If omitted in a non-global Cloud Dataproc region, the service
- // will pick a zone in the corresponding Compute Engine region. On a get
+ // ZoneUri: Optional. The zone where the Compute Engine cluster will be
+ // located. On a create request, it is required in the "global" region.
+ // If omitted in a non-global Cloud Dataproc region, the service will
+ // pick a zone in the corresponding Compute Engine region. On a get
// request, zone will always be present.A full URL, partial URI, or
// short name are valid.
// Examples:
@@ -988,20 +987,19 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
-// InstanceGroupConfig: Optional. The config settings for Google Compute
-// Engine resources in an instance group, such as a master or worker
-// group.
+// InstanceGroupConfig: Optional. The config settings for Compute Engine
+// resources in an instance group, such as a master or worker group.
type InstanceGroupConfig struct {
- // Accelerators: Optional. The Google Compute Engine accelerator
- // configuration for these instances.Beta Feature: This feature is still
- // under development. It may be changed before final release.
+ // Accelerators: Optional. The Compute Engine accelerator configuration
+ // for these instances.Beta Feature: This feature is still under
+ // development. It may be changed before final release.
Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"`
// DiskConfig: Optional. Disk option config settings.
DiskConfig *DiskConfig `json:"diskConfig,omitempty"`
- // ImageUri: Output only. The Google Compute Engine image resource used
- // for cluster instances. Inferred from SoftwareConfig.image_version.
+ // ImageUri: Output only. The Compute Engine image resource used for
+ // cluster instances. Inferred from SoftwareConfig.image_version.
ImageUri string `json:"imageUri,omitempty"`
// InstanceNames: Optional. The list of instance names. Cloud Dataproc
@@ -1014,9 +1012,8 @@
// preemptible instances.
IsPreemptible bool `json:"isPreemptible,omitempty"`
- // MachineTypeUri: Optional. The Google Compute Engine machine type used
- // for cluster instances.A full URL, partial URI, or short name are
- // valid.
+ // MachineTypeUri: Optional. The Compute Engine machine type used for
+ // cluster instances.A full URL, partial URI, or short name are valid.
// Examples:
// https://www.googleapis.com/compute/v1/projects/[project_id]/
// zones/us-east1-a/machineTypes/n1-standard-2
@@ -1025,7 +1022,7 @@
// n1-standard-2
MachineTypeUri string `json:"machineTypeUri,omitempty"`
- // ManagedGroupConfig: Output only. The config for Google Compute Engine
+ // ManagedGroupConfig: Output only. The config for Compute Engine
// Instance Group Manager that manages this group. This is only used for
// preemptible instance groups.
ManagedGroupConfig *ManagedGroupConfig `json:"managedGroupConfig,omitempty"`
@@ -1670,8 +1667,7 @@
// NodeInitializationAction: Specifies an executable to run on a fully
// configured node and a timeout period for executable completion.
type NodeInitializationAction struct {
- // ExecutableFile: Required. Google Cloud Storage URI of executable
- // file.
+ // ExecutableFile: Required. Cloud Storage URI of executable file.
ExecutableFile string `json:"executableFile,omitempty"`
// ExecutionTimeout: Optional. Amount of time executable has to
diff --git a/dlp/v2beta2/dlp-api.json b/dlp/v2beta2/dlp-api.json
index 2d5be71..5357e29 100644
--- a/dlp/v2beta2/dlp-api.json
+++ b/dlp/v2beta2/dlp-api.json
@@ -1202,7 +1202,7 @@
}
}
},
- "revision": "20180227",
+ "revision": "20180308",
"rootUrl": "https://dlp.googleapis.com/",
"schemas": {
"GooglePrivacyDlpV2beta1AuxiliaryTable": {
@@ -2313,6 +2313,11 @@
"format": "int64",
"type": "string"
},
+ "bucketValueCount": {
+ "description": "Total number of distinct values in this bucket.",
+ "format": "int64",
+ "type": "string"
+ },
"bucketValues": {
"description": "Sample of value frequencies in this bucket. The total number of\nvalues returned per bucket is capped at 20.",
"items": {
@@ -3647,6 +3652,11 @@
"format": "int64",
"type": "string"
},
+ "bucketValueCount": {
+ "description": "Total number of distinct equivalence classes in this bucket.",
+ "format": "int64",
+ "type": "string"
+ },
"bucketValues": {
"description": "Sample of equivalence classes in this bucket. The total number of\nclasses returned per bucket is capped at 20.",
"items": {
@@ -3715,6 +3725,11 @@
"format": "int64",
"type": "string"
},
+ "bucketValueCount": {
+ "description": "Total number of distinct quasi-identifier tuple values in this bucket.",
+ "format": "int64",
+ "type": "string"
+ },
"bucketValues": {
"description": "Sample of quasi-identifier tuple values in this bucket. The total\nnumber of classes returned per bucket is capped at 20.",
"items": {
@@ -3870,6 +3885,11 @@
"format": "int64",
"type": "string"
},
+ "bucketValueCount": {
+ "description": "Total number of distinct equivalence classes in this bucket.",
+ "format": "int64",
+ "type": "string"
+ },
"bucketValues": {
"description": "Sample of equivalence classes in this bucket. The total number of\nclasses returned per bucket is capped at 20.",
"items": {
diff --git a/dlp/v2beta2/dlp-gen.go b/dlp/v2beta2/dlp-gen.go
index 30f76bf..d4b6da8 100644
--- a/dlp/v2beta2/dlp-gen.go
+++ b/dlp/v2beta2/dlp-gen.go
@@ -2554,6 +2554,9 @@
// BucketSize: Total number of values in this bucket.
BucketSize int64 `json:"bucketSize,omitempty,string"`
+ // BucketValueCount: Total number of distinct values in this bucket.
+ BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
+
// BucketValues: Sample of value frequencies in this bucket. The total
// number of
// values returned per bucket is capped at 20.
@@ -5198,6 +5201,10 @@
// BucketSize: Total number of equivalence classes in this bucket.
BucketSize int64 `json:"bucketSize,omitempty,string"`
+ // BucketValueCount: Total number of distinct equivalence classes in
+ // this bucket.
+ BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
+
// BucketValues: Sample of equivalence classes in this bucket. The total
// number of
// classes returned per bucket is capped at 20.
@@ -5337,6 +5344,10 @@
// BucketSize: Number of records within these anonymity bounds.
BucketSize int64 `json:"bucketSize,omitempty,string"`
+ // BucketValueCount: Total number of distinct quasi-identifier tuple
+ // values in this bucket.
+ BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
+
// BucketValues: Sample of quasi-identifier tuple values in this bucket.
// The total
// number of classes returned per bucket is capped at 20.
@@ -5649,6 +5660,10 @@
// BucketSize: Total number of equivalence classes in this bucket.
BucketSize int64 `json:"bucketSize,omitempty,string"`
+ // BucketValueCount: Total number of distinct equivalence classes in
+ // this bucket.
+ BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
+
// BucketValues: Sample of equivalence classes in this bucket. The total
// number of
// classes returned per bucket is capped at 20.
diff --git a/genomics/v2alpha1/genomics-api.json b/genomics/v2alpha1/genomics-api.json
index e6a914b..fa0f956 100644
--- a/genomics/v2alpha1/genomics-api.json
+++ b/genomics/v2alpha1/genomics-api.json
@@ -278,7 +278,7 @@
}
}
},
- "revision": "20180303",
+ "revision": "20180307",
"rootUrl": "https://genomics.googleapis.com/",
"schemas": {
"Action": {
@@ -311,7 +311,8 @@
"This flag allows an action to continue running in the background while\nexecuting subsequent actions. This is useful to provide services to\nother actions (or to provide debugging support tools like ssh servers).",
"Normally, once an action fails no further actions are run. This flag\nindicates that this action must be run even if the pipeline has already\nfailed. This is useful for actions that copy output files off of the VM\nor for debugging.",
"Enable access to the FUSE device for this action. Filesystems can then\nbe mounted into disks shared with other actions. The other actions do\nnot need the ENABLE_FUSE flag to access the mounted filesystem.\n\nThis has the effect of causing the container to be executed with\nCAP_SYS_ADMIN and exposes /dev/fuse to the container, so it should only\nbe used for containers you trust.",
- "Expose all ports specified by EXPOSE statements in the container. To\ndiscover the host side port numbers, consult the ACTION_STARTED event in\nthe operation metadata."
+ "Expose all ports specified by EXPOSE statements in the container. To\ndiscover the host side port numbers, consult the ACTION_STARTED event in\nthe operation metadata.",
+ "Normally, all container images are downloaded before any actions are\nexecuted. This helps prevent typos in URIs or issues like lack of disk\nspace from wasting large amounts of compute resources.\n\nIf set, this flag prevents the worker from downloading the image until\njust before the action is executed.\n\nThis is useful for two reasons: first, if the image is large and a step\nearlier in the pipeline can fail, it can save time to avoid fetching the\nimage until it is needed.\n\nSecond, if the image is private (that is, it requires running `docker\nlogin` to access) this flag **must** be set so that a preceding action\ncan establish the credentials required to fetch it."
],
"items": {
"enum": [
@@ -320,7 +321,8 @@
"RUN_IN_BACKGROUND",
"ALWAYS_RUN",
"ENABLE_FUSE",
- "PUBLISH_EXPOSED_PORTS"
+ "PUBLISH_EXPOSED_PORTS",
+ "DISABLE_IMAGE_PREFETCH"
],
"type": "string"
},
diff --git a/genomics/v2alpha1/genomics-gen.go b/genomics/v2alpha1/genomics-gen.go
index 4a340db..d98a06b 100644
--- a/genomics/v2alpha1/genomics-gen.go
+++ b/genomics/v2alpha1/genomics-gen.go
@@ -203,6 +203,27 @@
// discover the host side port numbers, consult the ACTION_STARTED event
// in
// the operation metadata.
+ // "DISABLE_IMAGE_PREFETCH" - Normally, all container images are
+ // downloaded before any actions are
+ // executed. This helps prevent typos in URIs or issues like lack of
+ // disk
+ // space from wasting large amounts of compute resources.
+ //
+ // If set, this flag prevents the worker from downloading the image
+ // until
+ // just before the action is executed.
+ //
+ // This is useful for two reasons: first, if the image is large and a
+ // step
+ // earlier in the pipeline can fail, it can save time to avoid fetching
+ // the
+ // image until it is needed.
+ //
+ // Second, if the image is private (that is, it requires running
+ // `docker
+ // login` to access) this flag **must** be set so that a preceding
+ // action
+ // can establish the credentials required to fetch it.
Flags []string `json:"flags,omitempty"`
// ImageUri: The URI to pull the container image from. Note that all
diff --git a/ml/v1/ml-api.json b/ml/v1/ml-api.json
index 32f37f8..2512abf 100644
--- a/ml/v1/ml-api.json
+++ b/ml/v1/ml-api.json
@@ -992,7 +992,7 @@
}
}
},
- "revision": "20180228",
+ "revision": "20180306",
"rootUrl": "https://ml.googleapis.com/",
"schemas": {
"GoogleApi__HttpBody": {
@@ -1666,7 +1666,7 @@
"description": "Optional. The set of Hyperparameters to tune."
},
"jobDir": {
- "description": "Optional. A Google Cloud Storage path in which to store training outputs\nand other data needed for training. This path is passed to your TensorFlow\nprogram as the 'job_dir' command-line argument. The benefit of specifying\nthis field is that Cloud ML validates the path for use in training.",
+ "description": "Optional. A Google Cloud Storage path in which to store training outputs\nand other data needed for training. This path is passed to your TensorFlow\nprogram as the '--job-dir' command-line argument. The benefit of specifying\nthis field is that Cloud ML validates the path for use in training.",
"type": "string"
},
"masterType": {
@@ -1766,7 +1766,7 @@
"type": "object"
},
"GoogleCloudMlV1__Version": {
- "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).\n\nLINT.IfChange",
+ "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).",
"id": "GoogleCloudMlV1__Version",
"properties": {
"autoScaling": {
@@ -1790,6 +1790,22 @@
"description": "Output only. The details of a failure or a cancellation.",
"type": "string"
},
+ "framework": {
+ "description": "The ML framework used to train this version of the model. If not specified,\ndefaults to `TENSORFLOW`",
+ "enum": [
+ "FRAMEWORK_UNSPECIFIED",
+ "TENSORFLOW",
+ "SCIKIT_LEARN",
+ "XGBOOST"
+ ],
+ "enumDescriptions": [
+ "",
+ "",
+ "",
+ ""
+ ],
+ "type": "string"
+ },
"isDefault": {
"description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault).",
"type": "boolean"
@@ -2063,7 +2079,7 @@
}
},
"servicePath": "",
- "title": "Google Cloud Machine Learning Engine",
+ "title": "Cloud Machine Learning Engine",
"version": "v1",
"version_module": true
}
\ No newline at end of file
diff --git a/ml/v1/ml-gen.go b/ml/v1/ml-gen.go
index 0ab5e2d..f02f423 100644
--- a/ml/v1/ml-gen.go
+++ b/ml/v1/ml-gen.go
@@ -1,4 +1,4 @@
-// Package ml provides access to the Google Cloud Machine Learning Engine.
+// Package ml provides access to the Cloud Machine Learning Engine.
//
// See https://cloud.google.com/ml/
//
@@ -1358,7 +1358,7 @@
// training outputs
// and other data needed for training. This path is passed to your
// TensorFlow
- // program as the 'job_dir' command-line argument. The benefit of
+ // program as the '--job-dir' command-line argument. The benefit of
// specifying
// this field is that Cloud ML validates the path for use in training.
JobDir string `json:"jobDir,omitempty"`
@@ -1665,8 +1665,6 @@
// calling
// [projects.models.versions.list](/ml-engine/reference/rest/v1/p
// rojects.models.versions/list).
-//
-// LINT.IfChange
type GoogleCloudMlV1__Version struct {
// AutoScaling: Automatically scale the number of nodes used to serve
// the model in
@@ -1707,6 +1705,17 @@
// cancellation.
ErrorMessage string `json:"errorMessage,omitempty"`
+ // Framework: The ML framework used to train this version of the model.
+ // If not specified,
+ // defaults to `TENSORFLOW`
+ //
+ // Possible values:
+ // "FRAMEWORK_UNSPECIFIED"
+ // "TENSORFLOW"
+ // "SCIKIT_LEARN"
+ // "XGBOOST"
+ Framework string `json:"framework,omitempty"`
+
// IsDefault: Output only. If true, this version will be used to handle
// prediction
// requests that do not specify a version.
diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json
index 49ddaf8..76b7bdf 100644
--- a/monitoring/v3/monitoring-api.json
+++ b/monitoring/v3/monitoring-api.json
@@ -126,6 +126,175 @@
"resources": {
"projects": {
"resources": {
+ "alertPolicies": {
+ "methods": {
+ "create": {
+ "description": "Creates a new alerting policy.",
+ "flatPath": "v3/projects/{projectsId}/alertPolicies",
+ "httpMethod": "POST",
+ "id": "monitoring.projects.alertPolicies.create",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The project in which to create the alerting policy. The format is projects/[PROJECT_ID].Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form /alertPolicies/[POLICY_ID], identifying the policy in the container.",
+ "location": "path",
+ "pattern": "^projects/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}/alertPolicies",
+ "request": {
+ "$ref": "AlertPolicy"
+ },
+ "response": {
+ "$ref": "AlertPolicy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ },
+ "delete": {
+ "description": "Deletes an alerting policy.",
+ "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}",
+ "httpMethod": "DELETE",
+ "id": "monitoring.projects.alertPolicies.delete",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The alerting policy to delete. The format is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\nFor more information, see AlertPolicy.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/alertPolicies/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}",
+ "response": {
+ "$ref": "Empty"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ },
+ "get": {
+ "description": "Gets a single alerting policy.",
+ "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}",
+ "httpMethod": "GET",
+ "id": "monitoring.projects.alertPolicies.get",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The alerting policy to retrieve. The format is\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n",
+ "location": "path",
+ "pattern": "^projects/[^/]+/alertPolicies/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}",
+ "response": {
+ "$ref": "AlertPolicy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring",
+ "https://www.googleapis.com/auth/monitoring.read"
+ ]
+ },
+ "list": {
+ "description": "Lists the existing alerting policies for the project.",
+ "flatPath": "v3/projects/{projectsId}/alertPolicies",
+ "httpMethod": "GET",
+ "id": "monitoring.projects.alertPolicies.list",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "filter": {
+ "description": "If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering.",
+ "location": "query",
+ "type": "string"
+ },
+ "name": {
+ "description": "The project whose alert policies are to be listed. The format is\nprojects/[PROJECT_ID]\nNote that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead.",
+ "location": "path",
+ "pattern": "^projects/[^/]+$",
+ "required": true,
+ "type": "string"
+ },
+ "orderBy": {
+ "description": "A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering.",
+ "location": "query",
+ "type": "string"
+ },
+ "pageSize": {
+ "description": "The maximum number of results to return in a single response.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "pageToken": {
+ "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}/alertPolicies",
+ "response": {
+ "$ref": "ListAlertPoliciesResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring",
+ "https://www.googleapis.com/auth/monitoring.read"
+ ]
+ },
+ "patch": {
+ "description": "Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.",
+ "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}",
+ "httpMethod": "PATCH",
+ "id": "monitoring.projects.alertPolicies.patch",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "Required if the policy exists. The resource name for this policy. The syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n[ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/alertPolicies/[^/]+$",
+ "required": true,
+ "type": "string"
+ },
+ "updateMask": {
+ "description": "Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value.Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc.If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:\nThe new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.\nConditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.",
+ "format": "google-fieldmask",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}",
+ "request": {
+ "$ref": "AlertPolicy"
+ },
+ "response": {
+ "$ref": "AlertPolicy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ }
+ }
+ },
"collectdTimeSeries": {
"methods": {
"create": {
@@ -607,6 +776,336 @@
}
}
},
+ "notificationChannelDescriptors": {
+ "methods": {
+ "get": {
+ "description": "Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors/{notificationChannelDescriptorsId}",
+ "httpMethod": "GET",
+ "id": "monitoring.projects.notificationChannelDescriptors.get",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The channel type for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/notificationChannelDescriptors/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}",
+ "response": {
+ "$ref": "NotificationChannelDescriptor"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring",
+ "https://www.googleapis.com/auth/monitoring.read"
+ ]
+ },
+ "list": {
+ "description": "Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors",
+ "httpMethod": "GET",
+ "id": "monitoring.projects.notificationChannelDescriptors.list",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:\nprojects/[PROJECT_ID]\nNote that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead.",
+ "location": "path",
+ "pattern": "^projects/[^/]+$",
+ "required": true,
+ "type": "string"
+ },
+ "pageSize": {
+ "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "pageToken": {
+ "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}/notificationChannelDescriptors",
+ "response": {
+ "$ref": "ListNotificationChannelDescriptorsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring",
+ "https://www.googleapis.com/auth/monitoring.read"
+ ]
+ }
+ }
+ },
+ "notificationChannels": {
+ "methods": {
+ "create": {
+ "description": "Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or pagerduty service.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels",
+ "httpMethod": "POST",
+ "id": "monitoring.projects.notificationChannels.create",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The project on which to execute the request. The format is:\nprojects/[PROJECT_ID]\nNote that this names the container into which the channel will be written. This does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/[CHANNEL_ID] to identify the channel.",
+ "location": "path",
+ "pattern": "^projects/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}/notificationChannels",
+ "request": {
+ "$ref": "NotificationChannel"
+ },
+ "response": {
+ "$ref": "NotificationChannel"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ },
+ "delete": {
+ "description": "Deletes a notification channel.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}",
+ "httpMethod": "DELETE",
+ "id": "monitoring.projects.notificationChannels.delete",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "force": {
+ "description": "If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "name": {
+ "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].",
+ "location": "path",
+ "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}",
+ "response": {
+ "$ref": "Empty"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ },
+ "get": {
+ "description": "Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}",
+ "httpMethod": "GET",
+ "id": "monitoring.projects.notificationChannels.get",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].",
+ "location": "path",
+ "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}",
+ "response": {
+ "$ref": "NotificationChannel"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring",
+ "https://www.googleapis.com/auth/monitoring.read"
+ ]
+ },
+ "getVerificationCode": {
+ "description": "Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as \"G-123456\") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:getVerificationCode",
+ "httpMethod": "POST",
+ "id": "monitoring.projects.notificationChannels.getVerificationCode",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}:getVerificationCode",
+ "request": {
+ "$ref": "GetNotificationChannelVerificationCodeRequest"
+ },
+ "response": {
+ "$ref": "GetNotificationChannelVerificationCodeResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ },
+ "list": {
+ "description": "Lists the notification channels that have been created for the project.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels",
+ "httpMethod": "GET",
+ "id": "monitoring.projects.notificationChannels.list",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "filter": {
+ "description": "If provided, this field specifies the criteria that must be met by notification channels to be included in the response.For more details, see sorting and filtering.",
+ "location": "query",
+ "type": "string"
+ },
+ "name": {
+ "description": "The project on which to execute the request. The format is projects/[PROJECT_ID]. That is, this names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation.",
+ "location": "path",
+ "pattern": "^projects/[^/]+$",
+ "required": true,
+ "type": "string"
+ },
+ "orderBy": {
+ "description": "A comma-separated list of fields by which to sort the result. Supports the same set of fields as in filter. Entries can be prefixed with a minus sign to sort in descending rather than ascending order.For more details, see sorting and filtering.",
+ "location": "query",
+ "type": "string"
+ },
+ "pageSize": {
+ "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "pageToken": {
+ "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}/notificationChannels",
+ "response": {
+ "$ref": "ListNotificationChannelsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring",
+ "https://www.googleapis.com/auth/monitoring.read"
+ ]
+ },
+ "patch": {
+ "description": "Updates a notification channel. Fields not specified in the field mask remain unchanged.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}",
+ "httpMethod": "PATCH",
+ "id": "monitoring.projects.notificationChannels.patch",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The full REST resource name for this channel. The syntax is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\nThe [CHANNEL_ID] is automatically assigned by the server on creation.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ "required": true,
+ "type": "string"
+ },
+ "updateMask": {
+ "description": "The fields to update.",
+ "format": "google-fieldmask",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}",
+ "request": {
+ "$ref": "NotificationChannel"
+ },
+ "response": {
+ "$ref": "NotificationChannel"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ },
+ "sendVerificationCode": {
+ "description": "Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:sendVerificationCode",
+ "httpMethod": "POST",
+ "id": "monitoring.projects.notificationChannels.sendVerificationCode",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The notification channel to which to send a verification code.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}:sendVerificationCode",
+ "request": {
+ "$ref": "SendNotificationChannelVerificationCodeRequest"
+ },
+ "response": {
+ "$ref": "Empty"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ },
+ "verify": {
+ "description": "Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.",
+ "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:verify",
+ "httpMethod": "POST",
+ "id": "monitoring.projects.notificationChannels.verify",
+ "parameterOrder": [
+ "name"
+ ],
+ "parameters": {
+ "name": {
+ "description": "The notification channel to verify.",
+ "location": "path",
+ "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "path": "v3/{+name}:verify",
+ "request": {
+ "$ref": "VerifyNotificationChannelRequest"
+ },
+ "response": {
+ "$ref": "NotificationChannel"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/monitoring"
+ ]
+ }
+ }
+ },
"timeSeries": {
"methods": {
"create": {
@@ -964,9 +1463,178 @@
}
}
},
- "revision": "20180225",
+ "revision": "20180303",
"rootUrl": "https://monitoring.googleapis.com/",
"schemas": {
+ "Aggregation": {
+ "description": "Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation.",
+ "id": "Aggregation",
+ "properties": {
+ "alignmentPeriod": {
+ "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.",
+ "format": "google-duration",
+ "type": "string"
+ },
+ "crossSeriesReducer": {
+ "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.",
+ "enum": [
+ "REDUCE_NONE",
+ "REDUCE_MEAN",
+ "REDUCE_MIN",
+ "REDUCE_MAX",
+ "REDUCE_SUM",
+ "REDUCE_STDDEV",
+ "REDUCE_COUNT",
+ "REDUCE_COUNT_TRUE",
+ "REDUCE_COUNT_FALSE",
+ "REDUCE_FRACTION_TRUE",
+ "REDUCE_PERCENTILE_99",
+ "REDUCE_PERCENTILE_95",
+ "REDUCE_PERCENTILE_50",
+ "REDUCE_PERCENTILE_05"
+ ],
+ "enumDescriptions": [
+ "No cross-time series reduction. The output of the aligner is returned.",
+ "Reduce by computing the mean across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric or distribution values. The value type of the output is DOUBLE.",
+ "Reduce by computing the minimum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric values. The value type of the output is the same as the value type of the input.",
+ "Reduce by computing the maximum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric values. The value type of the output is the same as the value type of the input.",
+ "Reduce by computing the sum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric and distribution values. The value type of the output is the same as the value type of the input.",
+ "Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric or distribution values. The value type of the output is DOUBLE.",
+ "Reduce by computing the count of data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of numeric, Boolean, distribution, and string value type. The value type of the output is INT64.",
+ "Reduce by computing the count of True-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The value type of the output is INT64.",
+ "Reduce by computing the count of False-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The value type of the output is INT64.",
+ "Reduce by computing the fraction of True-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The output value is in the range 0, 1 and has value type DOUBLE.",
+ "Reduce by computing 99th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE",
+ "Reduce by computing 95th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE",
+ "Reduce by computing 50th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE",
+ "Reduce by computing 5th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE"
+ ],
+ "type": "string"
+ },
+ "groupByFields": {
+ "description": "The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "perSeriesAligner": {
+ "description": "The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.",
+ "enum": [
+ "ALIGN_NONE",
+ "ALIGN_DELTA",
+ "ALIGN_RATE",
+ "ALIGN_INTERPOLATE",
+ "ALIGN_NEXT_OLDER",
+ "ALIGN_MIN",
+ "ALIGN_MAX",
+ "ALIGN_MEAN",
+ "ALIGN_COUNT",
+ "ALIGN_SUM",
+ "ALIGN_STDDEV",
+ "ALIGN_COUNT_TRUE",
+ "ALIGN_COUNT_FALSE",
+ "ALIGN_FRACTION_TRUE",
+ "ALIGN_PERCENTILE_99",
+ "ALIGN_PERCENTILE_95",
+ "ALIGN_PERCENTILE_50",
+ "ALIGN_PERCENTILE_05",
+ "ALIGN_PERCENT_CHANGE"
+ ],
+ "enumDescriptions": [
+ "No alignment. Raw data is returned. Not valid if cross-time series reduction is requested. The value type of the result is the same as the value type of the input.",
+ "Align and convert to delta metric type. This alignment is valid for cumulative metrics and delta metrics. Aligning an existing delta metric to a delta metric requires that the alignment period be increased. The value type of the result is the same as the value type of the input.One can think of this aligner as a rate but without time units; that is, the output is conceptually (second_point - first_point).",
+ "Align and convert to a rate. This alignment is valid for cumulative metrics and delta metrics with numeric values. The output is a gauge metric with value type DOUBLE.One can think of this aligner as conceptually providing the slope of the line that passes through the value at the start and end of the window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), and the output unit is one that has a \"/time\" dimension.If, by rate, you are looking for percentage change, see the ALIGN_PERCENT_CHANGE aligner option.",
+ "Align by interpolating between adjacent points around the period boundary. This alignment is valid for gauge metrics with numeric values. The value type of the result is the same as the value type of the input.",
+ "Align by shifting the oldest data point before the period boundary to the boundary. This alignment is valid for gauge metrics. The value type of the result is the same as the value type of the input.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the minimum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the result is the same as the value type of the input.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the maximum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the result is the same as the value type of the input.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the average or arithmetic mean of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the output is DOUBLE.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the count of all data points in the period. This alignment is valid for gauge and delta metrics with numeric or Boolean values. The value type of the output is INT64.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the sum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric and distribution values. The value type of the output is the same as the value type of the input.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the standard deviation of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the output is DOUBLE.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the count of True-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The value type of the output is INT64.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the count of False-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The value type of the output is INT64.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the fraction of True-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The output value is in the range 0, 1 and has value type DOUBLE.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the 99th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the 95th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the 50th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.",
+ "Align time series via aggregation. The resulting data point in the alignment period is the 5th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.",
+ "Align and convert to a percentage change. This alignment is valid for gauge and delta metrics with numeric values. This alignment conceptually computes the equivalent of \"((current - previous)/previous)*100\" where previous value is determined based on the alignmentPeriod. In the event that previous is 0 the calculated value is infinity with the exception that if both (current - previous) and previous are 0 the calculated value is 0. A 10 minute moving mean is computed at each point of the time window prior to the above calculation to smooth the metric and prevent false positives from very short lived spikes. Only applicable for data that is \u003e= 0. Any values \u003c 0 are treated as no data. While delta metrics are accepted by this alignment special care should be taken that the values for the metric will always be positive. The output is a gauge metric with value type DOUBLE."
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "AlertPolicy": {
+ "description": "A description of the conditions under which some aspect of your system is considered to be \"unhealthy\" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting.",
+ "id": "AlertPolicy",
+ "properties": {
+ "combiner": {
+ "description": "How to combine the results of multiple conditions to determine if an incident should be opened.",
+ "enum": [
+ "COMBINE_UNSPECIFIED",
+ "AND",
+ "OR",
+ "AND_WITH_MATCHING_RESOURCE"
+ ],
+ "enumDescriptions": [
+ "An unspecified combiner.",
+ "Combine conditions using the logical AND operator. An incident is created only if all conditions are met simultaneously. This combiner is satisfied if all conditions are met, even if they are met on completely different resources.",
+ "Combine conditions using the logical OR operator. An incident is created if any of the listed conditions is met.",
+ "Combine conditions using logical AND operator, but unlike the regular AND option, an incident is created only if all conditions are met simultaneously on at least one resource."
+ ],
+ "type": "string"
+ },
+ "conditions": {
+ "description": "A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions.",
+ "items": {
+ "$ref": "Condition"
+ },
+ "type": "array"
+ },
+ "creationRecord": {
+ "$ref": "MutationRecord",
+ "description": "A read-only record of the creation of the alerting policy. If provided in a call to create or update, this field will be ignored."
+ },
+ "displayName": {
+ "description": "A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.",
+ "type": "string"
+ },
+ "documentation": {
+ "$ref": "Documentation",
+ "description": "Documentation that is included with notifications and incidents related to this policy. Best practice is for the documentation to include information to help responders understand, mitigate, escalate, and correct the underlying problems detected by the alerting policy. Notification channels that have limited capacity might not show this documentation."
+ },
+ "enabled": {
+ "description": "Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out.",
+ "type": "boolean"
+ },
+ "mutationRecord": {
+ "$ref": "MutationRecord",
+ "description": "A read-only record of the most recent change to the alerting policy. If provided in a call to create or update, this field will be ignored."
+ },
+ "name": {
+ "description": "Required if the policy exists. The resource name for this policy. The syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n[ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.",
+ "type": "string"
+ },
+ "notificationChannels": {
+ "description": "Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The syntax of the entries in this field is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\n",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "userLabels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
"BasicAuthentication": {
"description": "A type of authentication to perform against the specified resource or URL that uses username and password. Currently, only Basic authentication is supported in Uptime Monitoring.",
"id": "BasicAuthentication",
@@ -1120,6 +1788,29 @@
},
"type": "object"
},
+ "Condition": {
+ "description": "A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong.",
+ "id": "Condition",
+ "properties": {
+ "conditionAbsent": {
+ "$ref": "MetricAbsence",
+ "description": "A condition that checks that a time series continues to receive new data points."
+ },
+ "conditionThreshold": {
+ "$ref": "MetricThreshold",
+ "description": "A condition that compares a time series against a threshold."
+ },
+ "displayName": {
+ "description": "A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Required if the condition exists. The unique resource name for this condition. Its syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]\n[CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy.When calling the alertPolicies.create method, do not include the name field in the conditions of the requested alerting policy. Stackdriver Monitoring creates the condition identifiers and includes them in the new policy.When calling the alertPolicies.update method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated.Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"ContentMatcher": {
"description": "Used to perform string matching. Currently, this matches on the exact content. In the future, it can be expanded to allow for regular expressions and more complex matching.",
"id": "ContentMatcher",
@@ -1219,6 +1910,21 @@
},
"type": "object"
},
+ "Documentation": {
+ "description": "A content string and a MIME type that describes the content string's format.",
+ "id": "Documentation",
+ "properties": {
+ "content": {
+ "description": "The text of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller.",
+ "type": "string"
+ },
+ "mimeType": {
+ "description": "The format of the content field. Presently, only the value \"text/markdown\" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Empty": {
"description": "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.",
"id": "Empty",
@@ -1368,6 +2074,34 @@
},
"type": "object"
},
+ "GetNotificationChannelVerificationCodeRequest": {
+ "description": "The GetNotificationChannelVerificationCode request.",
+ "id": "GetNotificationChannelVerificationCodeRequest",
+ "properties": {
+ "expireTime": {
+ "description": "The desired expiration time. If specified, the API will guarantee that the returned code will not be valid after the specified timestamp; however, the API cannot guarantee that the returned code will be valid for at least as long as the requested time (the API puts an upper bound on the amount of time for which a code may be valid). If omitted, a default expiration will be used, which may be less than the max permissible expiration (so specifying an expiration may extend the code's lifetime over omitting an expiration, even though the API does impose an upper limit on the maximum expiration that is permitted).",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "GetNotificationChannelVerificationCodeResponse": {
+ "description": "The GetNotificationChannelVerificationCode request.",
+ "id": "GetNotificationChannelVerificationCodeResponse",
+ "properties": {
+ "code": {
+ "description": "The verification code, which may be used to verify other channels that have an equivalent identity (i.e. other channels of the same type with the same fingerprint such as other email channels with the same email address or other sms channels with the same number).",
+ "type": "string"
+ },
+ "expireTime": {
+ "description": "The expiration time associated with the code that was returned. If an expiration was provided in the request, this is the minimum of the requested expiration in the request and the max permitted expiration.",
+ "format": "google-datetime",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Group": {
"description": "The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups.Groups can be nested in parent-child hierarchies. The parentName field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource.For example, consider an infrastructure running a set of instances with two user-defined tags: \"environment\" and \"role\". A parent group has a filter, environment=\"production\". A child of that parent group has a filter, role=\"transcoder\". The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role and are in the production environment.The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors.",
"id": "Group",
@@ -1508,6 +2242,24 @@
},
"type": "object"
},
+ "ListAlertPoliciesResponse": {
+ "description": "The protocol for the ListAlertPolicies response.",
+ "id": "ListAlertPoliciesResponse",
+ "properties": {
+ "alertPolicies": {
+ "description": "The returned alert policies.",
+ "items": {
+ "$ref": "AlertPolicy"
+ },
+ "type": "array"
+ },
+ "nextPageToken": {
+ "description": "If there might be more results than were returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"ListGroupMembersResponse": {
"description": "The ListGroupMembers response.",
"id": "ListGroupMembersResponse",
@@ -1585,6 +2337,42 @@
},
"type": "object"
},
+ "ListNotificationChannelDescriptorsResponse": {
+ "description": "The ListNotificationChannelDescriptors response.",
+ "id": "ListNotificationChannelDescriptorsResponse",
+ "properties": {
+ "channelDescriptors": {
+ "description": "The monitored resource descriptors supported for the specified project, optionally filtered.",
+ "items": {
+ "$ref": "NotificationChannelDescriptor"
+ },
+ "type": "array"
+ },
+ "nextPageToken": {
+ "description": "If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ListNotificationChannelsResponse": {
+ "description": "The ListNotificationChannels response.",
+ "id": "ListNotificationChannelsResponse",
+ "properties": {
+ "nextPageToken": {
+ "description": "If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned.",
+ "type": "string"
+ },
+ "notificationChannels": {
+ "description": "The notification channels defined for the specified project.",
+ "items": {
+ "$ref": "NotificationChannel"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
"ListTimeSeriesResponse": {
"description": "The ListTimeSeries response.",
"id": "ListTimeSeriesResponse",
@@ -1662,6 +2450,33 @@
},
"type": "object"
},
+ "MetricAbsence": {
+ "description": "A condition type that checks that monitored resources are reporting data. The configuration defines a metric and a set of monitored resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified duration.",
+ "id": "MetricAbsence",
+ "properties": {
+ "aggregations": {
+ "description": "Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resrouces). Multiple aggregations are applied in the order specified.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field.",
+ "items": {
+ "$ref": "Aggregation"
+ },
+ "type": "array"
+ },
+ "duration": {
+ "description": "The amount of time that a time series must fail to report new data to be considered failing. Currently, only values that are a multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. The Duration.nanos field is ignored.",
+ "format": "google-duration",
+ "type": "string"
+ },
+ "filter": {
+ "description": "A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length.",
+ "type": "string"
+ },
+ "trigger": {
+ "$ref": "Trigger",
+ "description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations."
+ }
+ },
+ "type": "object"
+ },
"MetricDescriptor": {
"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.",
"id": "MetricDescriptor",
@@ -1734,6 +2549,71 @@
},
"type": "object"
},
+ "MetricThreshold": {
+ "description": "A condition type that compares a collection of time series against a threshold.",
+ "id": "MetricThreshold",
+ "properties": {
+ "aggregations": {
+ "description": "Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resrouces). Multiple aggregations are applied in the order specified.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field.",
+ "items": {
+ "$ref": "Aggregation"
+ },
+ "type": "array"
+ },
+ "comparison": {
+ "description": "The comparison to apply between the time series (indicated by filter and aggregation) and the threshold (indicated by threshold_value). The comparison is applied on each time series, with the time series on the left-hand side and the threshold on the right-hand side.Only COMPARISON_LT and COMPARISON_GT are supported currently.",
+ "enum": [
+ "COMPARISON_UNSPECIFIED",
+ "COMPARISON_GT",
+ "COMPARISON_GE",
+ "COMPARISON_LT",
+ "COMPARISON_LE",
+ "COMPARISON_EQ",
+ "COMPARISON_NE"
+ ],
+ "enumDescriptions": [
+ "No ordering relationship is specified.",
+ "The left argument is greater than the right argument.",
+ "The left argument is greater than or equal to the right argument.",
+ "The left argument is less than the right argument.",
+ "The left argument is less than or equal to the right argument.",
+ "The left argument is equal to the right argument.",
+ "The left argument is not equal to the right argument."
+ ],
+ "type": "string"
+ },
+ "denominatorAggregations": {
+ "description": "Specifies the alignment of data points in individual time series selected by denominatorFilter as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources).When computing ratios, the aggregations and denominator_aggregations fields must use the same alignment period and produce time series that have the same periodicity and labels.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field.",
+ "items": {
+ "$ref": "Aggregation"
+ },
+ "type": "array"
+ },
+ "denominatorFilter": {
+ "description": "A filter that identifies a time series that should be used as the denominator of a ratio that will be compared with the threshold. If a denominator_filter is specified, the time series specified by the filter field will be used as the numerator.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length.",
+ "type": "string"
+ },
+ "duration": {
+ "description": "The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. The Duration.nanos field is ignored. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregation field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly.",
+ "format": "google-duration",
+ "type": "string"
+ },
+ "filter": {
+ "description": "A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length.",
+ "type": "string"
+ },
+ "thresholdValue": {
+ "description": "A value against which to compare the time series.",
+ "format": "double",
+ "type": "number"
+ },
+ "trigger": {
+ "$ref": "Trigger",
+ "description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified."
+ }
+ },
+ "type": "object"
+ },
"MonitoredResource": {
"description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n",
"id": "MonitoredResource",
@@ -1804,6 +2684,124 @@
},
"type": "object"
},
+ "MutationRecord": {
+ "description": "Describes a change made to a configuration.",
+ "id": "MutationRecord",
+ "properties": {
+ "mutateTime": {
+ "description": "When the change occurred.",
+ "format": "google-datetime",
+ "type": "string"
+ },
+ "mutatedBy": {
+ "description": "The email address of the user making the change.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "NotificationChannel": {
+ "description": "A NotificationChannel is a medium through which an alert is delivered when a policy violation is detected. Examples of channels include email, SMS, and third-party messaging applications. Fields containing sensitive information like authentication tokens or contact info are only partially populated on retrieval.",
+ "id": "NotificationChannel",
+ "properties": {
+ "description": {
+ "description": "An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceeed 1024 Unicode characters.",
+ "type": "string"
+ },
+ "displayName": {
+ "description": "An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.",
+ "type": "string"
+ },
+ "enabled": {
+ "description": "Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.",
+ "type": "boolean"
+ },
+ "labels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.",
+ "type": "object"
+ },
+ "name": {
+ "description": "The full REST resource name for this channel. The syntax is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\nThe [CHANNEL_ID] is automatically assigned by the server on creation.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.",
+ "type": "string"
+ },
+ "userLabels": {
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.",
+ "type": "object"
+ },
+ "verificationStatus": {
+ "description": "Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.",
+ "enum": [
+ "VERIFICATION_STATUS_UNSPECIFIED",
+ "UNVERIFIED",
+ "VERIFIED"
+ ],
+ "enumDescriptions": [
+ "Sentinel value used to indicate that the state is unknown, omitted, or is not applicable (as in the case of channels that neither support nor require verification in order to function).",
+ "The channel has yet to be verified and requires verification to function. Note that this state also applies to the case where the verification process has been initiated by sending a verification code but where the verification code has not been submitted to complete the process.",
+ "It has been proven that notifications can be received on this notification channel and that someone on the project has access to messages that are delivered to that channel."
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "NotificationChannelDescriptor": {
+ "description": "A description of a notification channel. The descriptor includes the properties of the channel and the set of labels or fields that must be specified to configure channels of a given type.",
+ "id": "NotificationChannelDescriptor",
+ "properties": {
+ "description": {
+ "description": "A human-readable description of the notification channel type. The description may include a description of the properties of the channel and pointers to external documentation.",
+ "type": "string"
+ },
+ "displayName": {
+ "description": "A human-readable name for the notification channel type. This form of the name is suitable for a user interface.",
+ "type": "string"
+ },
+ "labels": {
+ "description": "The set of labels that must be defined to identify a particular channel of the corresponding type. Each label includes a description for how that field should be populated.",
+ "items": {
+ "$ref": "LabelDescriptor"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "The full REST resource name for this descriptor. The syntax is:\nprojects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE]\nIn the above, [TYPE] is the value of the type field.",
+ "type": "string"
+ },
+ "supportedTiers": {
+ "description": "The tiers that support this notification channel; the project service tier must be one of the supported_tiers.",
+ "enumDescriptions": [
+ "An invalid sentinel value, used to indicate that a tier has not been provided explicitly.",
+ "The Stackdriver Basic tier, a free tier of service that provides basic features, a moderate allotment of logs, and access to built-in metrics. A number of features are not available in this tier. For more details, see the service tiers documentation (https://cloud.google.com/monitoring/accounts/tiers).",
+ "The Stackdriver Premium tier, a higher, more expensive tier of service that provides access to all Stackdriver features, lets you use Stackdriver with AWS accounts, and has a larger allotments for logs and metrics. For more details, see the service tiers documentation (https://cloud.google.com/monitoring/accounts/tiers)."
+ ],
+ "items": {
+ "enum": [
+ "SERVICE_TIER_UNSPECIFIED",
+ "SERVICE_TIER_BASIC",
+ "SERVICE_TIER_PREMIUM"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "type": {
+ "description": "The type of notification channel, such as \"email\", \"sms\", etc. Notification channel types are globally unique.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"Option": {
"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.",
"id": "Option",
@@ -1880,6 +2878,12 @@
},
"type": "object"
},
+ "SendNotificationChannelVerificationCodeRequest": {
+ "description": "The SendNotificationChannelVerificationCode request.",
+ "id": "SendNotificationChannelVerificationCodeRequest",
+ "properties": {},
+ "type": "object"
+ },
"SourceContext": {
"description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.",
"id": "SourceContext",
@@ -2011,6 +3015,23 @@
},
"type": "object"
},
+ "Trigger": {
+ "description": "Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a {count: 1} trigger is used.",
+ "id": "Trigger",
+ "properties": {
+ "count": {
+ "description": "The absolute number of time series that must fail the predicate for the condition to be triggered.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "percent": {
+ "description": "The percentage of time series that must fail the predicate for the condition to be triggered.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
"Type": {
"description": "A protocol buffer message type.",
"id": "Type",
@@ -2127,7 +3148,7 @@
"type": "string"
},
"period": {
- "description": "How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Required.",
+ "description": "How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 300s.",
"format": "google-duration",
"type": "string"
},
@@ -2200,6 +3221,17 @@
}
},
"type": "object"
+ },
+ "VerifyNotificationChannelRequest": {
+ "description": "The VerifyNotificationChannel request.",
+ "id": "VerifyNotificationChannelRequest",
+ "properties": {
+ "code": {
+ "description": "The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have \"G-123456\" or \"TKNZGhhd2EyN3I1MnRnMjRv\" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).",
+ "type": "string"
+ }
+ },
+ "type": "object"
}
},
"servicePath": "",
diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go
index e943e8f..89ed0d0 100644
--- a/monitoring/v3/monitoring-gen.go
+++ b/monitoring/v3/monitoring-gen.go
@@ -91,10 +91,13 @@
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
+ rs.AlertPolicies = NewProjectsAlertPoliciesService(s)
rs.CollectdTimeSeries = NewProjectsCollectdTimeSeriesService(s)
rs.Groups = NewProjectsGroupsService(s)
rs.MetricDescriptors = NewProjectsMetricDescriptorsService(s)
rs.MonitoredResourceDescriptors = NewProjectsMonitoredResourceDescriptorsService(s)
+ rs.NotificationChannelDescriptors = NewProjectsNotificationChannelDescriptorsService(s)
+ rs.NotificationChannels = NewProjectsNotificationChannelsService(s)
rs.TimeSeries = NewProjectsTimeSeriesService(s)
rs.UptimeCheckConfigs = NewProjectsUptimeCheckConfigsService(s)
return rs
@@ -103,6 +106,8 @@
type ProjectsService struct {
s *Service
+ AlertPolicies *ProjectsAlertPoliciesService
+
CollectdTimeSeries *ProjectsCollectdTimeSeriesService
Groups *ProjectsGroupsService
@@ -111,11 +116,24 @@
MonitoredResourceDescriptors *ProjectsMonitoredResourceDescriptorsService
+ NotificationChannelDescriptors *ProjectsNotificationChannelDescriptorsService
+
+ NotificationChannels *ProjectsNotificationChannelsService
+
TimeSeries *ProjectsTimeSeriesService
UptimeCheckConfigs *ProjectsUptimeCheckConfigsService
}
+func NewProjectsAlertPoliciesService(s *Service) *ProjectsAlertPoliciesService {
+ rs := &ProjectsAlertPoliciesService{s: s}
+ return rs
+}
+
+type ProjectsAlertPoliciesService struct {
+ s *Service
+}
+
func NewProjectsCollectdTimeSeriesService(s *Service) *ProjectsCollectdTimeSeriesService {
rs := &ProjectsCollectdTimeSeriesService{s: s}
return rs
@@ -164,6 +182,24 @@
s *Service
}
+func NewProjectsNotificationChannelDescriptorsService(s *Service) *ProjectsNotificationChannelDescriptorsService {
+ rs := &ProjectsNotificationChannelDescriptorsService{s: s}
+ return rs
+}
+
+type ProjectsNotificationChannelDescriptorsService struct {
+ s *Service
+}
+
+func NewProjectsNotificationChannelsService(s *Service) *ProjectsNotificationChannelsService {
+ rs := &ProjectsNotificationChannelsService{s: s}
+ return rs
+}
+
+type ProjectsNotificationChannelsService struct {
+ s *Service
+}
+
func NewProjectsTimeSeriesService(s *Service) *ProjectsTimeSeriesService {
rs := &ProjectsTimeSeriesService{s: s}
return rs
@@ -191,6 +227,361 @@
s *Service
}
+// Aggregation: Describes how to combine multiple time series to provide
+// different views of the data. Aggregation consists of an alignment
+// step on individual time series (alignment_period and
+// per_series_aligner) followed by an optional reduction step of the
+// data across the aligned time series (cross_series_reducer and
+// group_by_fields). For more details, see Aggregation.
+type Aggregation struct {
+ // AlignmentPeriod: The alignment period for per-time series alignment.
+ // If present, alignmentPeriod must be at least 60 seconds. After
+ // per-time series alignment, each time series will contain data points
+ // only on the period boundaries. If perSeriesAligner is not specified
+ // or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner
+ // is specified and does not equal ALIGN_NONE, then this field must be
+ // defined; otherwise an error is returned.
+ AlignmentPeriod string `json:"alignmentPeriod,omitempty"`
+
+ // CrossSeriesReducer: The approach to be used to combine time series.
+ // Not all reducer functions may be applied to all time series,
+ // depending on the metric type and the value type of the original time
+ // series. Reduction may change the metric type of value type of the
+ // time series.Time series data must be aligned in order to perform
+ // cross-time series reduction. If crossSeriesReducer is specified, then
+ // perSeriesAligner must be specified and not equal ALIGN_NONE and
+ // alignmentPeriod must be specified; otherwise, an error is returned.
+ //
+ // Possible values:
+ // "REDUCE_NONE" - No cross-time series reduction. The output of the
+ // aligner is returned.
+ // "REDUCE_MEAN" - Reduce by computing the mean across time series for
+ // each alignment period. This reducer is valid for delta and gauge
+ // metrics with numeric or distribution values. The value type of the
+ // output is DOUBLE.
+ // "REDUCE_MIN" - Reduce by computing the minimum across time series
+ // for each alignment period. This reducer is valid for delta and gauge
+ // metrics with numeric values. The value type of the output is the same
+ // as the value type of the input.
+ // "REDUCE_MAX" - Reduce by computing the maximum across time series
+ // for each alignment period. This reducer is valid for delta and gauge
+ // metrics with numeric values. The value type of the output is the same
+ // as the value type of the input.
+ // "REDUCE_SUM" - Reduce by computing the sum across time series for
+ // each alignment period. This reducer is valid for delta and gauge
+ // metrics with numeric and distribution values. The value type of the
+ // output is the same as the value type of the input.
+ // "REDUCE_STDDEV" - Reduce by computing the standard deviation across
+ // time series for each alignment period. This reducer is valid for
+ // delta and gauge metrics with numeric or distribution values. The
+ // value type of the output is DOUBLE.
+ // "REDUCE_COUNT" - Reduce by computing the count of data points
+ // across time series for each alignment period. This reducer is valid
+ // for delta and gauge metrics of numeric, Boolean, distribution, and
+ // string value type. The value type of the output is INT64.
+ // "REDUCE_COUNT_TRUE" - Reduce by computing the count of True-valued
+ // data points across time series for each alignment period. This
+ // reducer is valid for delta and gauge metrics of Boolean value type.
+ // The value type of the output is INT64.
+ // "REDUCE_COUNT_FALSE" - Reduce by computing the count of
+ // False-valued data points across time series for each alignment
+ // period. This reducer is valid for delta and gauge metrics of Boolean
+ // value type. The value type of the output is INT64.
+ // "REDUCE_FRACTION_TRUE" - Reduce by computing the fraction of
+ // True-valued data points across time series for each alignment period.
+ // This reducer is valid for delta and gauge metrics of Boolean value
+ // type. The output value is in the range 0, 1 and has value type
+ // DOUBLE.
+ // "REDUCE_PERCENTILE_99" - Reduce by computing 99th percentile of
+ // data points across time series for each alignment period. This
+ // reducer is valid for gauge and delta metrics of numeric and
+ // distribution type. The value of the output is DOUBLE
+ // "REDUCE_PERCENTILE_95" - Reduce by computing 95th percentile of
+ // data points across time series for each alignment period. This
+ // reducer is valid for gauge and delta metrics of numeric and
+ // distribution type. The value of the output is DOUBLE
+ // "REDUCE_PERCENTILE_50" - Reduce by computing 50th percentile of
+ // data points across time series for each alignment period. This
+ // reducer is valid for gauge and delta metrics of numeric and
+ // distribution type. The value of the output is DOUBLE
+ // "REDUCE_PERCENTILE_05" - Reduce by computing 5th percentile of data
+ // points across time series for each alignment period. This reducer is
+ // valid for gauge and delta metrics of numeric and distribution type.
+ // The value of the output is DOUBLE
+ CrossSeriesReducer string `json:"crossSeriesReducer,omitempty"`
+
+ // GroupByFields: The set of fields to preserve when crossSeriesReducer
+ // is specified. The groupByFields determine how the time series are
+ // partitioned into subsets prior to applying the aggregation function.
+ // Each subset contains time series that have the same value for each of
+ // the grouping fields. Each individual time series is a member of
+ // exactly one subset. The crossSeriesReducer is applied to each subset
+ // of time series. It is not possible to reduce across different
+ // resource types, so this field implicitly contains resource.type.
+ // Fields not specified in groupByFields are aggregated away. If
+ // groupByFields is not specified and all the time series have the same
+ // resource type, then the time series are aggregated into a single
+ // output time series. If crossSeriesReducer is not defined, this field
+ // is ignored.
+ GroupByFields []string `json:"groupByFields,omitempty"`
+
+ // PerSeriesAligner: The approach to be used to align individual time
+ // series. Not all alignment functions may be applied to all time
+ // series, depending on the metric type and value type of the original
+ // time series. Alignment may change the metric type or the value type
+ // of the time series.Time series data must be aligned in order to
+ // perform cross-time series reduction. If crossSeriesReducer is
+ // specified, then perSeriesAligner must be specified and not equal
+ // ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error
+ // is returned.
+ //
+ // Possible values:
+ // "ALIGN_NONE" - No alignment. Raw data is returned. Not valid if
+ // cross-time series reduction is requested. The value type of the
+ // result is the same as the value type of the input.
+ // "ALIGN_DELTA" - Align and convert to delta metric type. This
+ // alignment is valid for cumulative metrics and delta metrics. Aligning
+ // an existing delta metric to a delta metric requires that the
+ // alignment period be increased. The value type of the result is the
+ // same as the value type of the input.One can think of this aligner as
+ // a rate but without time units; that is, the output is conceptually
+ // (second_point - first_point).
+ // "ALIGN_RATE" - Align and convert to a rate. This alignment is valid
+ // for cumulative metrics and delta metrics with numeric values. The
+ // output is a gauge metric with value type DOUBLE.One can think of this
+ // aligner as conceptually providing the slope of the line that passes
+ // through the value at the start and end of the window. In other words,
+ // this is conceptually ((y1 - y0)/(t1 - t0)), and the output unit is
+ // one that has a "/time" dimension.If, by rate, you are looking for
+ // percentage change, see the ALIGN_PERCENT_CHANGE aligner option.
+ // "ALIGN_INTERPOLATE" - Align by interpolating between adjacent
+ // points around the period boundary. This alignment is valid for gauge
+ // metrics with numeric values. The value type of the result is the same
+ // as the value type of the input.
+ // "ALIGN_NEXT_OLDER" - Align by shifting the oldest data point before
+ // the period boundary to the boundary. This alignment is valid for
+ // gauge metrics. The value type of the result is the same as the value
+ // type of the input.
+ // "ALIGN_MIN" - Align time series via aggregation. The resulting data
+ // point in the alignment period is the minimum of all data points in
+ // the period. This alignment is valid for gauge and delta metrics with
+ // numeric values. The value type of the result is the same as the value
+ // type of the input.
+ // "ALIGN_MAX" - Align time series via aggregation. The resulting data
+ // point in the alignment period is the maximum of all data points in
+ // the period. This alignment is valid for gauge and delta metrics with
+ // numeric values. The value type of the result is the same as the value
+ // type of the input.
+ // "ALIGN_MEAN" - Align time series via aggregation. The resulting
+ // data point in the alignment period is the average or arithmetic mean
+ // of all data points in the period. This alignment is valid for gauge
+ // and delta metrics with numeric values. The value type of the output
+ // is DOUBLE.
+ // "ALIGN_COUNT" - Align time series via aggregation. The resulting
+ // data point in the alignment period is the count of all data points in
+ // the period. This alignment is valid for gauge and delta metrics with
+ // numeric or Boolean values. The value type of the output is INT64.
+ // "ALIGN_SUM" - Align time series via aggregation. The resulting data
+ // point in the alignment period is the sum of all data points in the
+ // period. This alignment is valid for gauge and delta metrics with
+ // numeric and distribution values. The value type of the output is the
+ // same as the value type of the input.
+ // "ALIGN_STDDEV" - Align time series via aggregation. The resulting
+ // data point in the alignment period is the standard deviation of all
+ // data points in the period. This alignment is valid for gauge and
+ // delta metrics with numeric values. The value type of the output is
+ // DOUBLE.
+ // "ALIGN_COUNT_TRUE" - Align time series via aggregation. The
+ // resulting data point in the alignment period is the count of
+ // True-valued data points in the period. This alignment is valid for
+ // gauge metrics with Boolean values. The value type of the output is
+ // INT64.
+ // "ALIGN_COUNT_FALSE" - Align time series via aggregation. The
+ // resulting data point in the alignment period is the count of
+ // False-valued data points in the period. This alignment is valid for
+ // gauge metrics with Boolean values. The value type of the output is
+ // INT64.
+ // "ALIGN_FRACTION_TRUE" - Align time series via aggregation. The
+ // resulting data point in the alignment period is the fraction of
+ // True-valued data points in the period. This alignment is valid for
+ // gauge metrics with Boolean values. The output value is in the range
+ // 0, 1 and has value type DOUBLE.
+ // "ALIGN_PERCENTILE_99" - Align time series via aggregation. The
+ // resulting data point in the alignment period is the 99th percentile
+ // of all data points in the period. This alignment is valid for gauge
+ // and delta metrics with distribution values. The output is a gauge
+ // metric with value type DOUBLE.
+ // "ALIGN_PERCENTILE_95" - Align time series via aggregation. The
+ // resulting data point in the alignment period is the 95th percentile
+ // of all data points in the period. This alignment is valid for gauge
+ // and delta metrics with distribution values. The output is a gauge
+ // metric with value type DOUBLE.
+ // "ALIGN_PERCENTILE_50" - Align time series via aggregation. The
+ // resulting data point in the alignment period is the 50th percentile
+ // of all data points in the period. This alignment is valid for gauge
+ // and delta metrics with distribution values. The output is a gauge
+ // metric with value type DOUBLE.
+ // "ALIGN_PERCENTILE_05" - Align time series via aggregation. The
+ // resulting data point in the alignment period is the 5th percentile of
+ // all data points in the period. This alignment is valid for gauge and
+ // delta metrics with distribution values. The output is a gauge metric
+ // with value type DOUBLE.
+ // "ALIGN_PERCENT_CHANGE" - Align and convert to a percentage change.
+ // This alignment is valid for gauge and delta metrics with numeric
+ // values. This alignment conceptually computes the equivalent of
+ // "((current - previous)/previous)*100" where previous value is
+ // determined based on the alignmentPeriod. In the event that previous
+ // is 0 the calculated value is infinity with the exception that if both
+ // (current - previous) and previous are 0 the calculated value is 0. A
+ // 10 minute moving mean is computed at each point of the time window
+ // prior to the above calculation to smooth the metric and prevent false
+ // positives from very short lived spikes. Only applicable for data that
+ // is >= 0. Any values < 0 are treated as no data. While delta metrics
+ // are accepted by this alignment special care should be taken that the
+ // values for the metric will always be positive. The output is a gauge
+ // metric with value type DOUBLE.
+ PerSeriesAligner string `json:"perSeriesAligner,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "AlignmentPeriod") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AlignmentPeriod") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Aggregation) MarshalJSON() ([]byte, error) {
+ type NoMethod Aggregation
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// AlertPolicy: A description of the conditions under which some aspect
+// of your system is considered to be "unhealthy" and the ways to notify
+// people or services about this state. For an overview of alert
+// policies, see Introduction to Alerting.
+type AlertPolicy struct {
+ // Combiner: How to combine the results of multiple conditions to
+ // determine if an incident should be opened.
+ //
+ // Possible values:
+ // "COMBINE_UNSPECIFIED" - An unspecified combiner.
+ // "AND" - Combine conditions using the logical AND operator. An
+ // incident is created only if all conditions are met simultaneously.
+ // This combiner is satisfied if all conditions are met, even if they
+ // are met on completely different resources.
+ // "OR" - Combine conditions using the logical OR operator. An
+ // incident is created if any of the listed conditions is met.
+ // "AND_WITH_MATCHING_RESOURCE" - Combine conditions using logical AND
+ // operator, but unlike the regular AND option, an incident is created
+ // only if all conditions are met simultaneously on at least one
+ // resource.
+ Combiner string `json:"combiner,omitempty"`
+
+ // Conditions: A list of conditions for the policy. The conditions are
+ // combined by AND or OR according to the combiner field. If the
+ // combined conditions evaluate to true, then an incident is created. A
+ // policy can have from one to six conditions.
+ Conditions []*Condition `json:"conditions,omitempty"`
+
+ // CreationRecord: A read-only record of the creation of the alerting
+ // policy. If provided in a call to create or update, this field will be
+ // ignored.
+ CreationRecord *MutationRecord `json:"creationRecord,omitempty"`
+
+ // DisplayName: A short name or phrase used to identify the policy in
+ // dashboards, notifications, and incidents. To avoid confusion, don't
+ // use the same display name for multiple policies in the same project.
+ // The name is limited to 512 Unicode characters.
+ DisplayName string `json:"displayName,omitempty"`
+
+ // Documentation: Documentation that is included with notifications and
+ // incidents related to this policy. Best practice is for the
+ // documentation to include information to help responders understand,
+ // mitigate, escalate, and correct the underlying problems detected by
+ // the alerting policy. Notification channels that have limited capacity
+ // might not show this documentation.
+ Documentation *Documentation `json:"documentation,omitempty"`
+
+ // Enabled: Whether or not the policy is enabled. On write, the default
+ // interpretation if unset is that the policy is enabled. On read,
+ // clients should not make any assumption about the state if it has not
+ // been populated. The field should always be populated on List and Get
+ // operations, unless a field projection has been specified that strips
+ // it out.
+ Enabled bool `json:"enabled,omitempty"`
+
+ // MutationRecord: A read-only record of the most recent change to the
+ // alerting policy. If provided in a call to create or update, this
+ // field will be ignored.
+ MutationRecord *MutationRecord `json:"mutationRecord,omitempty"`
+
+ // Name: Required if the policy exists. The resource name for this
+ // policy. The syntax
+ // is:
+ // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
+ // [ALERT_POLIC
+ // Y_ID] is assigned by Stackdriver Monitoring when the policy is
+ // created. When calling the alertPolicies.create method, do not include
+ // the name field in the alerting policy passed as part of the request.
+ Name string `json:"name,omitempty"`
+
+ // NotificationChannels: Identifies the notification channels to which
+ // notifications should be sent when incidents are opened or closed or
+ // when new violations occur on an already opened incident. Each element
+ // of this array corresponds to the name field in each of the
+ // NotificationChannel objects that are returned from the
+ // ListNotificationChannels method. The syntax of the entries in this
+ // field is:
+ // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
+ //
+ NotificationChannels []string `json:"notificationChannels,omitempty"`
+
+ // UserLabels: User-supplied key/value data to be used for organizing
+ // and identifying the AlertPolicy objects.The field can contain up to
+ // 64 entries. Each key and value is limited to 63 Unicode characters or
+ // 128 bytes, whichever is smaller. Labels and values can contain only
+ // lowercase letters, numerals, underscores, and dashes. Keys must begin
+ // with a letter.
+ UserLabels map[string]string `json:"userLabels,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // ForceSendFields is a list of field names (e.g. "Combiner") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Combiner") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *AlertPolicy) MarshalJSON() ([]byte, error) {
+ type NoMethod AlertPolicy
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// BasicAuthentication: A type of authentication to perform against the
// specified resource or URL that uses username and password. Currently,
// only Basic authentication is supported in Uptime Monitoring.
@@ -446,6 +837,67 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Condition: A condition is a true/false test that determines when an
+// alerting policy should open an incident. If a condition evaluates to
+// true, it signifies that something is wrong.
+type Condition struct {
+ // ConditionAbsent: A condition that checks that a time series continues
+ // to receive new data points.
+ ConditionAbsent *MetricAbsence `json:"conditionAbsent,omitempty"`
+
+ // ConditionThreshold: A condition that compares a time series against a
+ // threshold.
+ ConditionThreshold *MetricThreshold `json:"conditionThreshold,omitempty"`
+
+ // DisplayName: A short name or phrase used to identify the condition in
+ // dashboards, notifications, and incidents. To avoid confusion, don't
+ // use the same display name for multiple conditions in the same policy.
+ DisplayName string `json:"displayName,omitempty"`
+
+ // Name: Required if the condition exists. The unique resource name for
+ // this condition. Its syntax
+ // is:
+ // projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDIT
+ // ION_ID]
+ // [CONDITION_ID] is assigned by Stackdriver Monitoring when the
+ // condition is created as part of a new or updated alerting policy.When
+ // calling the alertPolicies.create method, do not include the name
+ // field in the conditions of the requested alerting policy. Stackdriver
+ // Monitoring creates the condition identifiers and includes them in the
+ // new policy.When calling the alertPolicies.update method to update a
+ // policy, including a condition name causes the existing condition to
+ // be updated. Conditions without names are added to the updated policy.
+ // Existing conditions are deleted if they are not updated.Best practice
+ // is to preserve [CONDITION_ID] if you make only small changes, such as
+ // those to condition thresholds, durations, or trigger values.
+ // Otherwise, treat the change as a new condition and let the existing
+ // condition be deleted.
+ Name string `json:"name,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ConditionAbsent") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ConditionAbsent") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field 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)
+}
+
// ContentMatcher: Used to perform string matching. Currently, this
// matches on the exact content. In the future, it can be expanded to
// allow for regular expressions and more complex matching.
@@ -673,6 +1125,43 @@
return nil
}
+// Documentation: A content string and a MIME type that describes the
+// content string's format.
+type Documentation struct {
+ // Content: The text of the documentation, interpreted according to
+ // mime_type. The content may not exceed 8,192 Unicode characters and
+ // may not exceed more than 10,240 bytes when encoded in UTF-8 format,
+ // whichever is smaller.
+ Content string `json:"content,omitempty"`
+
+ // MimeType: The format of the content field. Presently, only the value
+ // "text/markdown" is supported. See Markdown
+ // (https://en.wikipedia.org/wiki/Markdown) for more information.
+ MimeType string `json:"mimeType,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Content") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Content") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *Documentation) MarshalJSON() ([]byte, error) {
+ type NoMethod Documentation
+ 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
@@ -866,6 +1355,86 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// GetNotificationChannelVerificationCodeRequest: The
+// GetNotificationChannelVerificationCode request.
+type GetNotificationChannelVerificationCodeRequest struct {
+ // ExpireTime: The desired expiration time. If specified, the API will
+ // guarantee that the returned code will not be valid after the
+ // specified timestamp; however, the API cannot guarantee that the
+ // returned code will be valid for at least as long as the requested
+ // time (the API puts an upper bound on the amount of time for which a
+ // code may be valid). If omitted, a default expiration will be used,
+ // which may be less than the max permissible expiration (so specifying
+ // an expiration may extend the code's lifetime over omitting an
+ // expiration, even though the API does impose an upper limit on the
+ // maximum expiration that is permitted).
+ ExpireTime string `json:"expireTime,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "ExpireTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ExpireTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *GetNotificationChannelVerificationCodeRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod GetNotificationChannelVerificationCodeRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// GetNotificationChannelVerificationCodeResponse: The
+// GetNotificationChannelVerificationCode request.
+type GetNotificationChannelVerificationCodeResponse struct {
+ // Code: The verification code, which may be used to verify other
+ // channels that have an equivalent identity (i.e. other channels of the
+ // same type with the same fingerprint such as other email channels with
+ // the same email address or other sms channels with the same number).
+ Code string `json:"code,omitempty"`
+
+ // ExpireTime: The expiration time associated with the code that was
+ // returned. If an expiration was provided in the request, this is the
+ // minimum of the requested expiration in the request and the max
+ // permitted expiration.
+ ExpireTime string `json:"expireTime,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // 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 *GetNotificationChannelVerificationCodeResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod GetNotificationChannelVerificationCodeResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Group: The description of a dynamic collection of monitored
// resources. Each group has a filter that is matched against monitored
// resources and their associated metadata. If a group's filter matches
@@ -1142,6 +1711,44 @@
return nil
}
+// ListAlertPoliciesResponse: The protocol for the ListAlertPolicies
+// response.
+type ListAlertPoliciesResponse struct {
+ // AlertPolicies: The returned alert policies.
+ AlertPolicies []*AlertPolicy `json:"alertPolicies,omitempty"`
+
+ // NextPageToken: If there might be more results than were returned,
+ // then this field is set to a non-empty value. To see the additional
+ // results, use that value as pageToken in the next call to this method.
+ 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. "AlertPolicies") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "AlertPolicies") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListAlertPoliciesResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListAlertPoliciesResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ListGroupMembersResponse: The ListGroupMembers response.
type ListGroupMembersResponse struct {
// Members: A set of monitored resources in the group.
@@ -1297,6 +1904,87 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// ListNotificationChannelDescriptorsResponse: The
+// ListNotificationChannelDescriptors response.
+type ListNotificationChannelDescriptorsResponse struct {
+ // ChannelDescriptors: The monitored resource descriptors supported for
+ // the specified project, optionally filtered.
+ ChannelDescriptors []*NotificationChannelDescriptor `json:"channelDescriptors,omitempty"`
+
+ // NextPageToken: If not empty, indicates that there may be more results
+ // that match the request. Use the value in the page_token field in a
+ // subsequent request to fetch the next set of results. If empty, all
+ // results have been returned.
+ 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. "ChannelDescriptors")
+ // to unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "ChannelDescriptors") to
+ // include in API requests with the JSON null value. By default, fields
+ // with empty values are omitted from API requests. However, any field
+ // with an empty value appearing in NullFields will be sent to the
+ // server as null. It is an error if a field in this list has a
+ // non-empty value. This may be used to include null fields in Patch
+ // requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *ListNotificationChannelDescriptorsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListNotificationChannelDescriptorsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// ListNotificationChannelsResponse: The ListNotificationChannels
+// response.
+type ListNotificationChannelsResponse struct {
+ // NextPageToken: If not empty, indicates that there may be more results
+ // that match the request. Use the value in the page_token field in a
+ // subsequent request to fetch the next set of results. If empty, all
+ // results have been returned.
+ NextPageToken string `json:"nextPageToken,omitempty"`
+
+ // NotificationChannels: The notification channels defined for the
+ // specified project.
+ NotificationChannels []*NotificationChannel `json:"notificationChannels,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // 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. "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 *ListNotificationChannelsResponse) MarshalJSON() ([]byte, error) {
+ type NoMethod ListNotificationChannelsResponse
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ListTimeSeriesResponse: The ListTimeSeries response.
type ListTimeSeriesResponse struct {
// NextPageToken: If there are more results than have been returned,
@@ -1455,6 +2143,67 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// MetricAbsence: A condition type that checks that monitored resources
+// are reporting data. The configuration defines a metric and a set of
+// monitored resources. The predicate is considered in violation when a
+// time series for the specified metric of a monitored resource does not
+// include any data in the specified duration.
+type MetricAbsence struct {
+ // Aggregations: Specifies the alignment of data points in individual
+ // time series as well as how to combine the retrieved time series
+ // together (such as when aggregating multiple streams on each resource
+ // to a single stream for each resource or when aggregating streams
+ // across all members of a group of resrouces). Multiple aggregations
+ // are applied in the order specified.This field is similar to the one
+ // in the MetricService.ListTimeSeries request. It is advisable to use
+ // the ListTimeSeries method when debugging this field.
+ Aggregations []*Aggregation `json:"aggregations,omitempty"`
+
+ // Duration: The amount of time that a time series must fail to report
+ // new data to be considered failing. Currently, only values that are a
+ // multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If
+ // an invalid value is given, an error will be returned. The
+ // Duration.nanos field is ignored.
+ Duration string `json:"duration,omitempty"`
+
+ // Filter: A filter that identifies which time series should be compared
+ // with the threshold.The filter is similar to the one that is specified
+ // in the MetricService.ListTimeSeries request (that call is useful to
+ // verify the time series that will be retrieved / processed) and must
+ // specify the metric type and optionally may contain restrictions on
+ // resource type, resource labels, and metric labels. This field may not
+ // exceed 2048 Unicode characters in length.
+ Filter string `json:"filter,omitempty"`
+
+ // Trigger: The number/percent of time series for which the comparison
+ // must hold in order for the condition to trigger. If unspecified, then
+ // the condition will trigger if the comparison is true for any of the
+ // time series that have been identified by filter and aggregations.
+ Trigger *Trigger `json:"trigger,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Aggregations") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Aggregations") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *MetricAbsence) MarshalJSON() ([]byte, error) {
+ type NoMethod MetricAbsence
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// MetricDescriptor: Defines a metric type and its schema. Once a metric
// descriptor is created, deleting or altering it stops data collection
// and makes the metric type's existing data unusable.
@@ -1557,6 +2306,135 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// MetricThreshold: A condition type that compares a collection of time
+// series against a threshold.
+type MetricThreshold struct {
+ // Aggregations: Specifies the alignment of data points in individual
+ // time series as well as how to combine the retrieved time series
+ // together (such as when aggregating multiple streams on each resource
+ // to a single stream for each resource or when aggregating streams
+ // across all members of a group of resrouces). Multiple aggregations
+ // are applied in the order specified.This field is similar to the one
+ // in the MetricService.ListTimeSeries request. It is advisable to use
+ // the ListTimeSeries method when debugging this field.
+ Aggregations []*Aggregation `json:"aggregations,omitempty"`
+
+ // Comparison: The comparison to apply between the time series
+ // (indicated by filter and aggregation) and the threshold (indicated by
+ // threshold_value). The comparison is applied on each time series, with
+ // the time series on the left-hand side and the threshold on the
+ // right-hand side.Only COMPARISON_LT and COMPARISON_GT are supported
+ // currently.
+ //
+ // Possible values:
+ // "COMPARISON_UNSPECIFIED" - No ordering relationship is specified.
+ // "COMPARISON_GT" - The left argument is greater than the right
+ // argument.
+ // "COMPARISON_GE" - The left argument is greater than or equal to the
+ // right argument.
+ // "COMPARISON_LT" - The left argument is less than the right
+ // argument.
+ // "COMPARISON_LE" - The left argument is less than or equal to the
+ // right argument.
+ // "COMPARISON_EQ" - The left argument is equal to the right argument.
+ // "COMPARISON_NE" - The left argument is not equal to the right
+ // argument.
+ Comparison string `json:"comparison,omitempty"`
+
+ // DenominatorAggregations: Specifies the alignment of data points in
+ // individual time series selected by denominatorFilter as well as how
+ // to combine the retrieved time series together (such as when
+ // aggregating multiple streams on each resource to a single stream for
+ // each resource or when aggregating streams across all members of a
+ // group of resources).When computing ratios, the aggregations and
+ // denominator_aggregations fields must use the same alignment period
+ // and produce time series that have the same periodicity and
+ // labels.This field is similar to the one in the
+ // MetricService.ListTimeSeries request. It is advisable to use the
+ // ListTimeSeries method when debugging this field.
+ DenominatorAggregations []*Aggregation `json:"denominatorAggregations,omitempty"`
+
+ // DenominatorFilter: A filter that identifies a time series that should
+ // be used as the denominator of a ratio that will be compared with the
+ // threshold. If a denominator_filter is specified, the time series
+ // specified by the filter field will be used as the numerator.The
+ // filter is similar to the one that is specified in the
+ // MetricService.ListTimeSeries request (that call is useful to verify
+ // the time series that will be retrieved / processed) and must specify
+ // the metric type and optionally may contain restrictions on resource
+ // type, resource labels, and metric labels. This field may not exceed
+ // 2048 Unicode characters in length.
+ DenominatorFilter string `json:"denominatorFilter,omitempty"`
+
+ // Duration: The amount of time that a time series must violate the
+ // threshold to be considered failing. Currently, only values that are a
+ // multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If
+ // an invalid value is given, an error will be returned. The
+ // Duration.nanos field is ignored. When choosing a duration, it is
+ // useful to keep in mind the frequency of the underlying time series
+ // data (which may also be affected by any alignments specified in the
+ // aggregation field); a good duration is long enough so that a single
+ // outlier does not generate spurious alerts, but short enough that
+ // unhealthy states are detected and alerted on quickly.
+ Duration string `json:"duration,omitempty"`
+
+ // Filter: A filter that identifies which time series should be compared
+ // with the threshold.The filter is similar to the one that is specified
+ // in the MetricService.ListTimeSeries request (that call is useful to
+ // verify the time series that will be retrieved / processed) and must
+ // specify the metric type and optionally may contain restrictions on
+ // resource type, resource labels, and metric labels. This field may not
+ // exceed 2048 Unicode characters in length.
+ Filter string `json:"filter,omitempty"`
+
+ // ThresholdValue: A value against which to compare the time series.
+ ThresholdValue float64 `json:"thresholdValue,omitempty"`
+
+ // Trigger: The number/percent of time series for which the comparison
+ // must hold in order for the condition to trigger. If unspecified, then
+ // the condition will trigger if the comparison is true for any of the
+ // time series that have been identified by filter and aggregations, or
+ // by the ratio, if denominator_filter and denominator_aggregations are
+ // specified.
+ Trigger *Trigger `json:"trigger,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Aggregations") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Aggregations") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *MetricThreshold) MarshalJSON() ([]byte, error) {
+ type NoMethod MetricThreshold
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *MetricThreshold) UnmarshalJSON(data []byte) error {
+ type NoMethod MetricThreshold
+ var s1 struct {
+ ThresholdValue gensupport.JSONFloat64 `json:"thresholdValue"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.ThresholdValue = float64(s1.ThresholdValue)
+ return nil
+}
+
// MonitoredResource: An object representing a resource that can be used
// for monitoring, logging, billing, or other purposes. Examples include
// virtual machine instances, databases, and storage devices such as
@@ -1717,6 +2595,222 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// MutationRecord: Describes a change made to a configuration.
+type MutationRecord struct {
+ // MutateTime: When the change occurred.
+ MutateTime string `json:"mutateTime,omitempty"`
+
+ // MutatedBy: The email address of the user making the change.
+ MutatedBy string `json:"mutatedBy,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "MutateTime") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "MutateTime") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *MutationRecord) MarshalJSON() ([]byte, error) {
+ type NoMethod MutationRecord
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// NotificationChannel: A NotificationChannel is a medium through which
+// an alert is delivered when a policy violation is detected. Examples
+// of channels include email, SMS, and third-party messaging
+// applications. Fields containing sensitive information like
+// authentication tokens or contact info are only partially populated on
+// retrieval.
+type NotificationChannel struct {
+ // Description: An optional human-readable description of this
+ // notification channel. This description may provide additional
+ // details, beyond the display name, for the channel. This may not
+ // exceeed 1024 Unicode characters.
+ Description string `json:"description,omitempty"`
+
+ // DisplayName: An optional human-readable name for this notification
+ // channel. It is recommended that you specify a non-empty and unique
+ // name in order to make it easier to identify the channels in your
+ // project, though this is not enforced. The display name is limited to
+ // 512 Unicode characters.
+ DisplayName string `json:"displayName,omitempty"`
+
+ // Enabled: Whether notifications are forwarded to the described
+ // channel. This makes it possible to disable delivery of notifications
+ // to a particular channel without removing the channel from all
+ // alerting policies that reference the channel. This is a more
+ // convenient approach when the change is temporary and you want to
+ // receive notifications from the same set of alerting policies on the
+ // channel at some point in the future.
+ Enabled bool `json:"enabled,omitempty"`
+
+ // Labels: Configuration fields that define the channel and its
+ // behavior. The permissible and required labels are specified in the
+ // NotificationChannelDescriptor.labels of the
+ // NotificationChannelDescriptor corresponding to the type field.
+ Labels map[string]string `json:"labels,omitempty"`
+
+ // Name: The full REST resource name for this channel. The syntax
+ // is:
+ // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
+ // The [CHANNEL_ID] is automatically assigned by the server on creation.
+ Name string `json:"name,omitempty"`
+
+ // Type: The type of the notification channel. This field matches the
+ // value of the NotificationChannelDescriptor.type field.
+ Type string `json:"type,omitempty"`
+
+ // UserLabels: User-supplied key/value data that does not need to
+ // conform to the corresponding NotificationChannelDescriptor's schema,
+ // unlike the labels field. This field is intended to be used for
+ // organizing and identifying the NotificationChannel objects.The field
+ // can contain up to 64 entries. Each key and value is limited to 63
+ // Unicode characters or 128 bytes, whichever is smaller. Labels and
+ // values can contain only lowercase letters, numerals, underscores, and
+ // dashes. Keys must begin with a letter.
+ UserLabels map[string]string `json:"userLabels,omitempty"`
+
+ // VerificationStatus: Indicates whether this channel has been verified
+ // or not. On a ListNotificationChannels or GetNotificationChannel
+ // operation, this field is expected to be populated.If the value is
+ // UNVERIFIED, then it indicates that the channel is non-functioning (it
+ // both requires verification and lacks verification); otherwise, it is
+ // assumed that the channel works.If the channel is neither VERIFIED nor
+ // UNVERIFIED, it implies that the channel is of a type that does not
+ // require verification or that this specific channel has been exempted
+ // from verification because it was created prior to verification being
+ // required for channels of this type.This field cannot be modified
+ // using a standard UpdateNotificationChannel operation. To change the
+ // value of this field, you must call VerifyNotificationChannel.
+ //
+ // Possible values:
+ // "VERIFICATION_STATUS_UNSPECIFIED" - Sentinel value used to indicate
+ // that the state is unknown, omitted, or is not applicable (as in the
+ // case of channels that neither support nor require verification in
+ // order to function).
+ // "UNVERIFIED" - The channel has yet to be verified and requires
+ // verification to function. Note that this state also applies to the
+ // case where the verification process has been initiated by sending a
+ // verification code but where the verification code has not been
+ // submitted to complete the process.
+ // "VERIFIED" - It has been proven that notifications can be received
+ // on this notification channel and that someone on the project has
+ // access to messages that are delivered to that channel.
+ VerificationStatus string `json:"verificationStatus,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // 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 *NotificationChannel) MarshalJSON() ([]byte, error) {
+ type NoMethod NotificationChannel
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// NotificationChannelDescriptor: A description of a notification
+// channel. The descriptor includes the properties of the channel and
+// the set of labels or fields that must be specified to configure
+// channels of a given type.
+type NotificationChannelDescriptor struct {
+ // Description: A human-readable description of the notification channel
+ // type. The description may include a description of the properties of
+ // the channel and pointers to external documentation.
+ Description string `json:"description,omitempty"`
+
+ // DisplayName: A human-readable name for the notification channel type.
+ // This form of the name is suitable for a user interface.
+ DisplayName string `json:"displayName,omitempty"`
+
+ // Labels: The set of labels that must be defined to identify a
+ // particular channel of the corresponding type. Each label includes a
+ // description for how that field should be populated.
+ Labels []*LabelDescriptor `json:"labels,omitempty"`
+
+ // Name: The full REST resource name for this descriptor. The syntax
+ // is:
+ // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE]
+ // In the above, [TYPE] is the value of the type field.
+ Name string `json:"name,omitempty"`
+
+ // SupportedTiers: The tiers that support this notification channel; the
+ // project service tier must be one of the supported_tiers.
+ //
+ // Possible values:
+ // "SERVICE_TIER_UNSPECIFIED" - An invalid sentinel value, used to
+ // indicate that a tier has not been provided explicitly.
+ // "SERVICE_TIER_BASIC" - The Stackdriver Basic tier, a free tier of
+ // service that provides basic features, a moderate allotment of logs,
+ // and access to built-in metrics. A number of features are not
+ // available in this tier. For more details, see the service tiers
+ // documentation (https://cloud.google.com/monitoring/accounts/tiers).
+ // "SERVICE_TIER_PREMIUM" - The Stackdriver Premium tier, a higher,
+ // more expensive tier of service that provides access to all
+ // Stackdriver features, lets you use Stackdriver with AWS accounts, and
+ // has a larger allotments for logs and metrics. For more details, see
+ // the service tiers documentation
+ // (https://cloud.google.com/monitoring/accounts/tiers).
+ SupportedTiers []string `json:"supportedTiers,omitempty"`
+
+ // Type: The type of notification channel, such as "email", "sms", etc.
+ // Notification channel types are globally unique.
+ Type string `json:"type,omitempty"`
+
+ // ServerResponse contains the HTTP response code and headers from the
+ // server.
+ googleapi.ServerResponse `json:"-"`
+
+ // 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 *NotificationChannelDescriptor) MarshalJSON() ([]byte, error) {
+ type NoMethod NotificationChannelDescriptor
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// Option: A protocol buffer option, which can be attached to a message,
// field, enumeration, etc.
type Option struct {
@@ -1882,6 +2976,11 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// SendNotificationChannelVerificationCodeRequest: The
+// SendNotificationChannelVerificationCode request.
+type SendNotificationChannelVerificationCodeRequest struct {
+}
+
// SourceContext: SourceContext represents information about the source
// of a protobuf element, like the file in which it is defined.
type SourceContext struct {
@@ -2144,6 +3243,55 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Trigger: Specifies how many time series must fail a predicate to
+// trigger a condition. If not specified, then a {count: 1} trigger is
+// used.
+type Trigger struct {
+ // Count: The absolute number of time series that must fail the
+ // predicate for the condition to be triggered.
+ Count int64 `json:"count,omitempty"`
+
+ // Percent: The percentage of time series that must fail the predicate
+ // for the condition to be triggered.
+ Percent float64 `json:"percent,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 *Trigger) MarshalJSON() ([]byte, error) {
+ type NoMethod Trigger
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *Trigger) UnmarshalJSON(data []byte) error {
+ type NoMethod Trigger
+ var s1 struct {
+ Percent gensupport.JSONFloat64 `json:"percent"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Percent = float64(s1.Percent)
+ return nil
+}
+
// Type: A protocol buffer message type.
type Type struct {
// Fields: The list of fields.
@@ -2297,7 +3445,8 @@
// Period: How often, in seconds, the uptime check is performed.
// Currently, the only supported values are 60s (1 minute), 300s (5
- // minutes), 600s (10 minutes), and 900s (15 minutes). Required.
+ // minutes), 600s (10 minutes), and 900s (15 minutes). Optional,
+ // defaults to 300s.
Period string `json:"period,omitempty"`
// ResourceGroup: The group resource associated with the configuration.
@@ -2412,6 +3561,830 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// VerifyNotificationChannelRequest: The VerifyNotificationChannel
+// request.
+type VerifyNotificationChannelRequest struct {
+ // Code: The verification code that was delivered to the channel as a
+ // result of invoking the SendNotificationChannelVerificationCode API
+ // method or that was retrieved from a verified channel via
+ // GetNotificationChannelVerificationCode. For example, one might have
+ // "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
+ // guaranteed that the code is valid UTF-8; one should not make any
+ // assumptions regarding the structure or format of the code).
+ Code string `json:"code,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 *VerifyNotificationChannelRequest) MarshalJSON() ([]byte, error) {
+ type NoMethod VerifyNotificationChannelRequest
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// method id "monitoring.projects.alertPolicies.create":
+
+type ProjectsAlertPoliciesCreateCall struct {
+ s *Service
+ name string
+ alertpolicy *AlertPolicy
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Create: Creates a new alerting policy.
+func (r *ProjectsAlertPoliciesService) Create(name string, alertpolicy *AlertPolicy) *ProjectsAlertPoliciesCreateCall {
+ c := &ProjectsAlertPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.alertpolicy = alertpolicy
+ 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 *ProjectsAlertPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesCreateCall {
+ 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 *ProjectsAlertPoliciesCreateCall) Context(ctx context.Context) *ProjectsAlertPoliciesCreateCall {
+ 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 *ProjectsAlertPoliciesCreateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsAlertPoliciesCreateCall) 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.alertpolicy)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/alertPolicies")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.alertPolicies.create" call.
+// Exactly one of *AlertPolicy or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *AlertPolicy.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 *ProjectsAlertPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AlertPolicy, 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 := &AlertPolicy{
+ 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 alerting policy.",
+ // "flatPath": "v3/projects/{projectsId}/alertPolicies",
+ // "httpMethod": "POST",
+ // "id": "monitoring.projects.alertPolicies.create",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The project in which to create the alerting policy. The format is projects/[PROJECT_ID].Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form /alertPolicies/[POLICY_ID], identifying the policy in the container.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}/alertPolicies",
+ // "request": {
+ // "$ref": "AlertPolicy"
+ // },
+ // "response": {
+ // "$ref": "AlertPolicy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.alertPolicies.delete":
+
+type ProjectsAlertPoliciesDeleteCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes an alerting policy.
+func (r *ProjectsAlertPoliciesService) Delete(name string) *ProjectsAlertPoliciesDeleteCall {
+ c := &ProjectsAlertPoliciesDeleteCall{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 *ProjectsAlertPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesDeleteCall {
+ 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 *ProjectsAlertPoliciesDeleteCall) Context(ctx context.Context) *ProjectsAlertPoliciesDeleteCall {
+ 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 *ProjectsAlertPoliciesDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsAlertPoliciesDeleteCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.alertPolicies.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 *ProjectsAlertPoliciesDeleteCall) 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 an alerting policy.",
+ // "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}",
+ // "httpMethod": "DELETE",
+ // "id": "monitoring.projects.alertPolicies.delete",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The alerting policy to delete. The format is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\nFor more information, see AlertPolicy.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/alertPolicies/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}",
+ // "response": {
+ // "$ref": "Empty"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.alertPolicies.get":
+
+type ProjectsAlertPoliciesGetCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Gets a single alerting policy.
+func (r *ProjectsAlertPoliciesService) Get(name string) *ProjectsAlertPoliciesGetCall {
+ c := &ProjectsAlertPoliciesGetCall{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 *ProjectsAlertPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesGetCall {
+ 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 *ProjectsAlertPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsAlertPoliciesGetCall {
+ 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 *ProjectsAlertPoliciesGetCall) Context(ctx context.Context) *ProjectsAlertPoliciesGetCall {
+ 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 *ProjectsAlertPoliciesGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsAlertPoliciesGetCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.alertPolicies.get" call.
+// Exactly one of *AlertPolicy or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *AlertPolicy.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 *ProjectsAlertPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AlertPolicy, 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 := &AlertPolicy{
+ 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 alerting policy.",
+ // "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}",
+ // "httpMethod": "GET",
+ // "id": "monitoring.projects.alertPolicies.get",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The alerting policy to retrieve. The format is\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/alertPolicies/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}",
+ // "response": {
+ // "$ref": "AlertPolicy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring",
+ // "https://www.googleapis.com/auth/monitoring.read"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.alertPolicies.list":
+
+type ProjectsAlertPoliciesListCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the existing alerting policies for the project.
+func (r *ProjectsAlertPoliciesService) List(name string) *ProjectsAlertPoliciesListCall {
+ c := &ProjectsAlertPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// Filter sets the optional parameter "filter": If provided, this field
+// specifies the criteria that must be met by alert policies to be
+// included in the response.For more details, see sorting and filtering.
+func (c *ProjectsAlertPoliciesListCall) Filter(filter string) *ProjectsAlertPoliciesListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": A comma-separated list
+// of fields by which to sort the result. Supports the same set of field
+// references as the filter field. Entries can be prefixed with a minus
+// sign to sort by the field in descending order.For more details, see
+// sorting and filtering.
+func (c *ProjectsAlertPoliciesListCall) OrderBy(orderBy string) *ProjectsAlertPoliciesListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageSize sets the optional parameter "pageSize": The maximum number
+// of results to return in a single response.
+func (c *ProjectsAlertPoliciesListCall) PageSize(pageSize int64) *ProjectsAlertPoliciesListCall {
+ c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": If this field is
+// not empty then it must contain the nextPageToken value returned by a
+// previous call to this method. Using this field causes the method to
+// return more results from the previous method call.
+func (c *ProjectsAlertPoliciesListCall) PageToken(pageToken string) *ProjectsAlertPoliciesListCall {
+ 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 *ProjectsAlertPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesListCall {
+ 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 *ProjectsAlertPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsAlertPoliciesListCall {
+ 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 *ProjectsAlertPoliciesListCall) Context(ctx context.Context) *ProjectsAlertPoliciesListCall {
+ 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 *ProjectsAlertPoliciesListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsAlertPoliciesListCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/alertPolicies")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.alertPolicies.list" call.
+// Exactly one of *ListAlertPoliciesResponse or error will be non-nil.
+// Any non-2xx status code is an error. Response headers are in either
+// *ListAlertPoliciesResponse.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 *ProjectsAlertPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAlertPoliciesResponse, 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 := &ListAlertPoliciesResponse{
+ 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 existing alerting policies for the project.",
+ // "flatPath": "v3/projects/{projectsId}/alertPolicies",
+ // "httpMethod": "GET",
+ // "id": "monitoring.projects.alertPolicies.list",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "filter": {
+ // "description": "If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "name": {
+ // "description": "The project whose alert policies are to be listed. The format is\nprojects/[PROJECT_ID]\nNote that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderBy": {
+ // "description": "A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageSize": {
+ // "description": "The maximum number of results to return in a single response.",
+ // "format": "int32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "pageToken": {
+ // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}/alertPolicies",
+ // "response": {
+ // "$ref": "ListAlertPoliciesResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring",
+ // "https://www.googleapis.com/auth/monitoring.read"
+ // ]
+ // }
+
+}
+
+// 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 *ProjectsAlertPoliciesListCall) Pages(ctx context.Context, f func(*ListAlertPoliciesResponse) 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 "monitoring.projects.alertPolicies.patch":
+
+type ProjectsAlertPoliciesPatchCall struct {
+ s *Service
+ name string
+ alertpolicy *AlertPolicy
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Patch: Updates an alerting policy. You can either replace the entire
+// policy with a new one or replace only certain fields in the current
+// alerting policy by specifying the fields to be updated via
+// updateMask. Returns the updated alerting policy.
+func (r *ProjectsAlertPoliciesService) Patch(name string, alertpolicy *AlertPolicy) *ProjectsAlertPoliciesPatchCall {
+ c := &ProjectsAlertPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.alertpolicy = alertpolicy
+ return c
+}
+
+// UpdateMask sets the optional parameter "updateMask": A list of
+// alerting policy field names. If this field is not empty, each listed
+// field in the existing alerting policy is set to the value of the
+// corresponding field in the supplied policy (alert_policy), or to the
+// field's default value if the field is not in the supplied alerting
+// policy. Fields not listed retain their previous value.Examples of
+// valid field masks include display_name, documentation,
+// documentation.content, documentation.mime_type, user_labels,
+// user_label.nameofkey, enabled, conditions, combiner, etc.If this
+// field is empty, then the supplied alerting policy replaces the
+// existing policy. It is the same as deleting the existing policy and
+// adding the supplied policy, except for the following:
+// The new policy will have the same [ALERT_POLICY_ID] as the former
+// policy. This gives you continuity with the former policy in your
+// notifications and incidents.
+// Conditions in the new policy will keep their former [CONDITION_ID] if
+// the supplied condition includes the name field with that
+// [CONDITION_ID]. If the supplied condition omits the name field, then
+// a new [CONDITION_ID] is created.
+func (c *ProjectsAlertPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsAlertPoliciesPatchCall {
+ c.urlParams_.Set("updateMask", updateMask)
+ 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 *ProjectsAlertPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesPatchCall {
+ 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 *ProjectsAlertPoliciesPatchCall) Context(ctx context.Context) *ProjectsAlertPoliciesPatchCall {
+ 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 *ProjectsAlertPoliciesPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsAlertPoliciesPatchCall) 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.alertpolicy)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("PATCH", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.alertPolicies.patch" call.
+// Exactly one of *AlertPolicy or error will be non-nil. Any non-2xx
+// status code is an error. Response headers are in either
+// *AlertPolicy.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 *ProjectsAlertPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*AlertPolicy, 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 := &AlertPolicy{
+ 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 an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.",
+ // "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}",
+ // "httpMethod": "PATCH",
+ // "id": "monitoring.projects.alertPolicies.patch",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "Required if the policy exists. The resource name for this policy. The syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n[ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/alertPolicies/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "updateMask": {
+ // "description": "Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value.Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc.If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:\nThe new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.\nConditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.",
+ // "format": "google-fieldmask",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}",
+ // "request": {
+ // "$ref": "AlertPolicy"
+ // },
+ // "response": {
+ // "$ref": "AlertPolicy"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
// method id "monitoring.projects.collectdTimeSeries.create":
type ProjectsCollectdTimeSeriesCreateCall struct {
@@ -4550,6 +6523,1570 @@
}
}
+// method id "monitoring.projects.notificationChannelDescriptors.get":
+
+type ProjectsNotificationChannelDescriptorsGetCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Gets a single channel descriptor. The descriptor indicates which
+// fields are expected / permitted for a notification channel of the
+// given type.
+func (r *ProjectsNotificationChannelDescriptorsService) Get(name string) *ProjectsNotificationChannelDescriptorsGetCall {
+ c := &ProjectsNotificationChannelDescriptorsGetCall{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 *ProjectsNotificationChannelDescriptorsGetCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelDescriptorsGetCall {
+ 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 *ProjectsNotificationChannelDescriptorsGetCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelDescriptorsGetCall {
+ 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 *ProjectsNotificationChannelDescriptorsGetCall) Context(ctx context.Context) *ProjectsNotificationChannelDescriptorsGetCall {
+ 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 *ProjectsNotificationChannelDescriptorsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelDescriptorsGetCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannelDescriptors.get" call.
+// Exactly one of *NotificationChannelDescriptor or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *NotificationChannelDescriptor.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 *ProjectsNotificationChannelDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*NotificationChannelDescriptor, 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 := &NotificationChannelDescriptor{
+ 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 channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors/{notificationChannelDescriptorsId}",
+ // "httpMethod": "GET",
+ // "id": "monitoring.projects.notificationChannelDescriptors.get",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The channel type for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/notificationChannelDescriptors/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}",
+ // "response": {
+ // "$ref": "NotificationChannelDescriptor"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring",
+ // "https://www.googleapis.com/auth/monitoring.read"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.notificationChannelDescriptors.list":
+
+type ProjectsNotificationChannelDescriptorsListCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the descriptors for supported channel types. The use of
+// descriptors makes it possible for new channel types to be dynamically
+// added.
+func (r *ProjectsNotificationChannelDescriptorsService) List(name string) *ProjectsNotificationChannelDescriptorsListCall {
+ c := &ProjectsNotificationChannelDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// PageSize sets the optional parameter "pageSize": The maximum number
+// of results to return in a single response. If not set to a positive
+// number, a reasonable value will be chosen by the service.
+func (c *ProjectsNotificationChannelDescriptorsListCall) PageSize(pageSize int64) *ProjectsNotificationChannelDescriptorsListCall {
+ c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": If non-empty,
+// page_token must contain a value returned as the next_page_token in a
+// previous response to request the next set of results.
+func (c *ProjectsNotificationChannelDescriptorsListCall) PageToken(pageToken string) *ProjectsNotificationChannelDescriptorsListCall {
+ 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 *ProjectsNotificationChannelDescriptorsListCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelDescriptorsListCall {
+ 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 *ProjectsNotificationChannelDescriptorsListCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelDescriptorsListCall {
+ 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 *ProjectsNotificationChannelDescriptorsListCall) Context(ctx context.Context) *ProjectsNotificationChannelDescriptorsListCall {
+ 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 *ProjectsNotificationChannelDescriptorsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelDescriptorsListCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/notificationChannelDescriptors")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannelDescriptors.list" call.
+// Exactly one of *ListNotificationChannelDescriptorsResponse or error
+// will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *ListNotificationChannelDescriptorsResponse.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 *ProjectsNotificationChannelDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationChannelDescriptorsResponse, 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 := &ListNotificationChannelDescriptorsResponse{
+ 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 descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors",
+ // "httpMethod": "GET",
+ // "id": "monitoring.projects.notificationChannelDescriptors.list",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:\nprojects/[PROJECT_ID]\nNote that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "pageSize": {
+ // "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.",
+ // "format": "int32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "pageToken": {
+ // "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}/notificationChannelDescriptors",
+ // "response": {
+ // "$ref": "ListNotificationChannelDescriptorsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring",
+ // "https://www.googleapis.com/auth/monitoring.read"
+ // ]
+ // }
+
+}
+
+// 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 *ProjectsNotificationChannelDescriptorsListCall) Pages(ctx context.Context, f func(*ListNotificationChannelDescriptorsResponse) 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 "monitoring.projects.notificationChannels.create":
+
+type ProjectsNotificationChannelsCreateCall struct {
+ s *Service
+ name string
+ notificationchannel *NotificationChannel
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Create: Creates a new notification channel, representing a single
+// notification endpoint such as an email address, SMS number, or
+// pagerduty service.
+func (r *ProjectsNotificationChannelsService) Create(name string, notificationchannel *NotificationChannel) *ProjectsNotificationChannelsCreateCall {
+ c := &ProjectsNotificationChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.notificationchannel = notificationchannel
+ 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 *ProjectsNotificationChannelsCreateCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsCreateCall {
+ 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 *ProjectsNotificationChannelsCreateCall) Context(ctx context.Context) *ProjectsNotificationChannelsCreateCall {
+ 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 *ProjectsNotificationChannelsCreateCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsCreateCall) 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.notificationchannel)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/notificationChannels")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.create" call.
+// Exactly one of *NotificationChannel or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *NotificationChannel.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 *ProjectsNotificationChannelsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, 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 := &NotificationChannel{
+ 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 notification channel, representing a single notification endpoint such as an email address, SMS number, or pagerduty service.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels",
+ // "httpMethod": "POST",
+ // "id": "monitoring.projects.notificationChannels.create",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The project on which to execute the request. The format is:\nprojects/[PROJECT_ID]\nNote that this names the container into which the channel will be written. This does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/[CHANNEL_ID] to identify the channel.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}/notificationChannels",
+ // "request": {
+ // "$ref": "NotificationChannel"
+ // },
+ // "response": {
+ // "$ref": "NotificationChannel"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.notificationChannels.delete":
+
+type ProjectsNotificationChannelsDeleteCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Delete: Deletes a notification channel.
+func (r *ProjectsNotificationChannelsService) Delete(name string) *ProjectsNotificationChannelsDeleteCall {
+ c := &ProjectsNotificationChannelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// Force sets the optional parameter "force": If true, the notification
+// channel will be deleted regardless of its use in alert policies (the
+// policies will be updated to remove the channel). If false, channels
+// that are still referenced by an existing alerting policy will fail to
+// be deleted in a delete operation.
+func (c *ProjectsNotificationChannelsDeleteCall) Force(force bool) *ProjectsNotificationChannelsDeleteCall {
+ 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 *ProjectsNotificationChannelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsDeleteCall {
+ 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 *ProjectsNotificationChannelsDeleteCall) Context(ctx context.Context) *ProjectsNotificationChannelsDeleteCall {
+ 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 *ProjectsNotificationChannelsDeleteCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsDeleteCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("DELETE", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.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 *ProjectsNotificationChannelsDeleteCall) 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 notification channel.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}",
+ // "httpMethod": "DELETE",
+ // "id": "monitoring.projects.notificationChannels.delete",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "force": {
+ // "description": "If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "name": {
+ // "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}",
+ // "response": {
+ // "$ref": "Empty"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.notificationChannels.get":
+
+type ProjectsNotificationChannelsGetCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Get: Gets a single notification channel. The channel includes the
+// relevant configuration details with which the channel was created.
+// However, the response may truncate or omit passwords, API keys, or
+// other private key matter and thus the response may not be 100%
+// identical to the information that was supplied in the call to the
+// create method.
+func (r *ProjectsNotificationChannelsService) Get(name string) *ProjectsNotificationChannelsGetCall {
+ c := &ProjectsNotificationChannelsGetCall{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 *ProjectsNotificationChannelsGetCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsGetCall {
+ 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 *ProjectsNotificationChannelsGetCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelsGetCall {
+ 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 *ProjectsNotificationChannelsGetCall) Context(ctx context.Context) *ProjectsNotificationChannelsGetCall {
+ 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 *ProjectsNotificationChannelsGetCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsGetCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.get" call.
+// Exactly one of *NotificationChannel or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *NotificationChannel.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 *ProjectsNotificationChannelsGetCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, 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 := &NotificationChannel{
+ 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 notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}",
+ // "httpMethod": "GET",
+ // "id": "monitoring.projects.notificationChannels.get",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}",
+ // "response": {
+ // "$ref": "NotificationChannel"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring",
+ // "https://www.googleapis.com/auth/monitoring.read"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.notificationChannels.getVerificationCode":
+
+type ProjectsNotificationChannelsGetVerificationCodeCall struct {
+ s *Service
+ name string
+ getnotificationchannelverificationcoderequest *GetNotificationChannelVerificationCodeRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// GetVerificationCode: Requests a verification code for an already
+// verified channel that can then be used in a call to
+// VerifyNotificationChannel() on a different channel with an equivalent
+// identity in the same or in a different project. This makes it
+// possible to copy a channel between projects without requiring manual
+// reverification of the channel. If the channel is not in the verified
+// state, this method will fail (in other words, this may only be used
+// if the SendNotificationChannelVerificationCode and
+// VerifyNotificationChannel paths have already been used to put the
+// given channel into the verified state).There is no guarantee that the
+// verification codes returned by this method will be of a similar
+// structure or form as the ones that are delivered to the channel via
+// SendNotificationChannelVerificationCode; while
+// VerifyNotificationChannel() will recognize both the codes delivered
+// via SendNotificationChannelVerificationCode() and returned from
+// GetNotificationChannelVerificationCode(), it is typically the case
+// that the verification codes delivered via
+// SendNotificationChannelVerificationCode() will be shorter and also
+// have a shorter expiration (e.g. codes such as "G-123456") whereas
+// GetVerificationCode() will typically return a much longer, websafe
+// base 64 encoded string that has a longer expiration time.
+func (r *ProjectsNotificationChannelsService) GetVerificationCode(name string, getnotificationchannelverificationcoderequest *GetNotificationChannelVerificationCodeRequest) *ProjectsNotificationChannelsGetVerificationCodeCall {
+ c := &ProjectsNotificationChannelsGetVerificationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.getnotificationchannelverificationcoderequest = getnotificationchannelverificationcoderequest
+ 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 *ProjectsNotificationChannelsGetVerificationCodeCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsGetVerificationCodeCall {
+ 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 *ProjectsNotificationChannelsGetVerificationCodeCall) Context(ctx context.Context) *ProjectsNotificationChannelsGetVerificationCodeCall {
+ 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 *ProjectsNotificationChannelsGetVerificationCodeCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsGetVerificationCodeCall) 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.getnotificationchannelverificationcoderequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}:getVerificationCode")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.getVerificationCode" call.
+// Exactly one of *GetNotificationChannelVerificationCodeResponse or
+// error will be non-nil. Any non-2xx status code is an error. Response
+// headers are in either
+// *GetNotificationChannelVerificationCodeResponse.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 *ProjectsNotificationChannelsGetVerificationCodeCall) Do(opts ...googleapi.CallOption) (*GetNotificationChannelVerificationCodeResponse, 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 := &GetNotificationChannelVerificationCodeResponse{
+ 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 a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as \"G-123456\") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:getVerificationCode",
+ // "httpMethod": "POST",
+ // "id": "monitoring.projects.notificationChannels.getVerificationCode",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}:getVerificationCode",
+ // "request": {
+ // "$ref": "GetNotificationChannelVerificationCodeRequest"
+ // },
+ // "response": {
+ // "$ref": "GetNotificationChannelVerificationCodeResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.notificationChannels.list":
+
+type ProjectsNotificationChannelsListCall struct {
+ s *Service
+ name string
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// List: Lists the notification channels that have been created for the
+// project.
+func (r *ProjectsNotificationChannelsService) List(name string) *ProjectsNotificationChannelsListCall {
+ c := &ProjectsNotificationChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ return c
+}
+
+// Filter sets the optional parameter "filter": If provided, this field
+// specifies the criteria that must be met by notification channels to
+// be included in the response.For more details, see sorting and
+// filtering.
+func (c *ProjectsNotificationChannelsListCall) Filter(filter string) *ProjectsNotificationChannelsListCall {
+ c.urlParams_.Set("filter", filter)
+ return c
+}
+
+// OrderBy sets the optional parameter "orderBy": A comma-separated list
+// of fields by which to sort the result. Supports the same set of
+// fields as in filter. Entries can be prefixed with a minus sign to
+// sort in descending rather than ascending order.For more details, see
+// sorting and filtering.
+func (c *ProjectsNotificationChannelsListCall) OrderBy(orderBy string) *ProjectsNotificationChannelsListCall {
+ c.urlParams_.Set("orderBy", orderBy)
+ return c
+}
+
+// PageSize sets the optional parameter "pageSize": The maximum number
+// of results to return in a single response. If not set to a positive
+// number, a reasonable value will be chosen by the service.
+func (c *ProjectsNotificationChannelsListCall) PageSize(pageSize int64) *ProjectsNotificationChannelsListCall {
+ c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
+ return c
+}
+
+// PageToken sets the optional parameter "pageToken": If non-empty,
+// page_token must contain a value returned as the next_page_token in a
+// previous response to request the next set of results.
+func (c *ProjectsNotificationChannelsListCall) PageToken(pageToken string) *ProjectsNotificationChannelsListCall {
+ 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 *ProjectsNotificationChannelsListCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsListCall {
+ 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 *ProjectsNotificationChannelsListCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelsListCall {
+ 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 *ProjectsNotificationChannelsListCall) Context(ctx context.Context) *ProjectsNotificationChannelsListCall {
+ 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 *ProjectsNotificationChannelsListCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsListCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/notificationChannels")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.list" call.
+// Exactly one of *ListNotificationChannelsResponse or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *ListNotificationChannelsResponse.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 *ProjectsNotificationChannelsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationChannelsResponse, 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 := &ListNotificationChannelsResponse{
+ 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 notification channels that have been created for the project.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels",
+ // "httpMethod": "GET",
+ // "id": "monitoring.projects.notificationChannels.list",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "filter": {
+ // "description": "If provided, this field specifies the criteria that must be met by notification channels to be included in the response.For more details, see sorting and filtering.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "name": {
+ // "description": "The project on which to execute the request. The format is projects/[PROJECT_ID]. That is, this names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "orderBy": {
+ // "description": "A comma-separated list of fields by which to sort the result. Supports the same set of fields as in filter. Entries can be prefixed with a minus sign to sort in descending rather than ascending order.For more details, see sorting and filtering.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "pageSize": {
+ // "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.",
+ // "format": "int32",
+ // "location": "query",
+ // "type": "integer"
+ // },
+ // "pageToken": {
+ // "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}/notificationChannels",
+ // "response": {
+ // "$ref": "ListNotificationChannelsResponse"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring",
+ // "https://www.googleapis.com/auth/monitoring.read"
+ // ]
+ // }
+
+}
+
+// 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 *ProjectsNotificationChannelsListCall) Pages(ctx context.Context, f func(*ListNotificationChannelsResponse) 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 "monitoring.projects.notificationChannels.patch":
+
+type ProjectsNotificationChannelsPatchCall struct {
+ s *Service
+ name string
+ notificationchannel *NotificationChannel
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Patch: Updates a notification channel. Fields not specified in the
+// field mask remain unchanged.
+func (r *ProjectsNotificationChannelsService) Patch(name string, notificationchannel *NotificationChannel) *ProjectsNotificationChannelsPatchCall {
+ c := &ProjectsNotificationChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.notificationchannel = notificationchannel
+ return c
+}
+
+// UpdateMask sets the optional parameter "updateMask": The fields to
+// update.
+func (c *ProjectsNotificationChannelsPatchCall) UpdateMask(updateMask string) *ProjectsNotificationChannelsPatchCall {
+ c.urlParams_.Set("updateMask", updateMask)
+ 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 *ProjectsNotificationChannelsPatchCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsPatchCall {
+ 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 *ProjectsNotificationChannelsPatchCall) Context(ctx context.Context) *ProjectsNotificationChannelsPatchCall {
+ 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 *ProjectsNotificationChannelsPatchCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsPatchCall) 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.notificationchannel)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("PATCH", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.patch" call.
+// Exactly one of *NotificationChannel or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *NotificationChannel.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 *ProjectsNotificationChannelsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, 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 := &NotificationChannel{
+ 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 notification channel. Fields not specified in the field mask remain unchanged.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}",
+ // "httpMethod": "PATCH",
+ // "id": "monitoring.projects.notificationChannels.patch",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The full REST resource name for this channel. The syntax is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\nThe [CHANNEL_ID] is automatically assigned by the server on creation.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "updateMask": {
+ // "description": "The fields to update.",
+ // "format": "google-fieldmask",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}",
+ // "request": {
+ // "$ref": "NotificationChannel"
+ // },
+ // "response": {
+ // "$ref": "NotificationChannel"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.notificationChannels.sendVerificationCode":
+
+type ProjectsNotificationChannelsSendVerificationCodeCall struct {
+ s *Service
+ name string
+ sendnotificationchannelverificationcoderequest *SendNotificationChannelVerificationCodeRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// SendVerificationCode: Causes a verification code to be delivered to
+// the channel. The code can then be supplied in
+// VerifyNotificationChannel to verify the channel.
+func (r *ProjectsNotificationChannelsService) SendVerificationCode(name string, sendnotificationchannelverificationcoderequest *SendNotificationChannelVerificationCodeRequest) *ProjectsNotificationChannelsSendVerificationCodeCall {
+ c := &ProjectsNotificationChannelsSendVerificationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.sendnotificationchannelverificationcoderequest = sendnotificationchannelverificationcoderequest
+ 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 *ProjectsNotificationChannelsSendVerificationCodeCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsSendVerificationCodeCall {
+ 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 *ProjectsNotificationChannelsSendVerificationCodeCall) Context(ctx context.Context) *ProjectsNotificationChannelsSendVerificationCodeCall {
+ 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 *ProjectsNotificationChannelsSendVerificationCodeCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsSendVerificationCodeCall) 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.sendnotificationchannelverificationcoderequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}:sendVerificationCode")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.sendVerificationCode" 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 *ProjectsNotificationChannelsSendVerificationCodeCall) 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": "Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:sendVerificationCode",
+ // "httpMethod": "POST",
+ // "id": "monitoring.projects.notificationChannels.sendVerificationCode",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The notification channel to which to send a verification code.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}:sendVerificationCode",
+ // "request": {
+ // "$ref": "SendNotificationChannelVerificationCodeRequest"
+ // },
+ // "response": {
+ // "$ref": "Empty"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
+// method id "monitoring.projects.notificationChannels.verify":
+
+type ProjectsNotificationChannelsVerifyCall struct {
+ s *Service
+ name string
+ verifynotificationchannelrequest *VerifyNotificationChannelRequest
+ urlParams_ gensupport.URLParams
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Verify: Verifies a NotificationChannel by proving receipt of the code
+// delivered to the channel as a result of calling
+// SendNotificationChannelVerificationCode.
+func (r *ProjectsNotificationChannelsService) Verify(name string, verifynotificationchannelrequest *VerifyNotificationChannelRequest) *ProjectsNotificationChannelsVerifyCall {
+ c := &ProjectsNotificationChannelsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.name = name
+ c.verifynotificationchannelrequest = verifynotificationchannelrequest
+ 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 *ProjectsNotificationChannelsVerifyCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsVerifyCall {
+ 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 *ProjectsNotificationChannelsVerifyCall) Context(ctx context.Context) *ProjectsNotificationChannelsVerifyCall {
+ 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 *ProjectsNotificationChannelsVerifyCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *ProjectsNotificationChannelsVerifyCall) 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.verifynotificationchannelrequest)
+ if err != nil {
+ return nil, err
+ }
+ reqHeaders.Set("Content-Type", "application/json")
+ c.urlParams_.Set("alt", alt)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}:verify")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("POST", urls, body)
+ req.Header = reqHeaders
+ googleapi.Expand(req.URL, map[string]string{
+ "name": c.name,
+ })
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "monitoring.projects.notificationChannels.verify" call.
+// Exactly one of *NotificationChannel or error will be non-nil. Any
+// non-2xx status code is an error. Response headers are in either
+// *NotificationChannel.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 *ProjectsNotificationChannelsVerifyCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, 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 := &NotificationChannel{
+ 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": "Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.",
+ // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:verify",
+ // "httpMethod": "POST",
+ // "id": "monitoring.projects.notificationChannels.verify",
+ // "parameterOrder": [
+ // "name"
+ // ],
+ // "parameters": {
+ // "name": {
+ // "description": "The notification channel to verify.",
+ // "location": "path",
+ // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$",
+ // "required": true,
+ // "type": "string"
+ // }
+ // },
+ // "path": "v3/{+name}:verify",
+ // "request": {
+ // "$ref": "VerifyNotificationChannelRequest"
+ // },
+ // "response": {
+ // "$ref": "NotificationChannel"
+ // },
+ // "scopes": [
+ // "https://www.googleapis.com/auth/cloud-platform",
+ // "https://www.googleapis.com/auth/monitoring"
+ // ]
+ // }
+
+}
+
// method id "monitoring.projects.timeSeries.create":
type ProjectsTimeSeriesCreateCall struct {
diff --git a/oslogin/v1/oslogin-api.json b/oslogin/v1/oslogin-api.json
index d7da5b8..c19150c 100644
--- a/oslogin/v1/oslogin-api.json
+++ b/oslogin/v1/oslogin-api.json
@@ -306,7 +306,7 @@
}
}
},
- "revision": "20180202",
+ "revision": "20180306",
"rootUrl": "https://oslogin.googleapis.com/",
"schemas": {
"Empty": {
@@ -418,7 +418,7 @@
}
},
"servicePath": "",
- "title": "Google Cloud OS Login API",
+ "title": "Cloud OS Login API",
"version": "v1",
"version_module": true
}
\ No newline at end of file
diff --git a/oslogin/v1/oslogin-gen.go b/oslogin/v1/oslogin-gen.go
index 55149b6..9d5fa32 100644
--- a/oslogin/v1/oslogin-gen.go
+++ b/oslogin/v1/oslogin-gen.go
@@ -1,4 +1,4 @@
-// Package oslogin provides access to the Google Cloud OS Login API.
+// Package oslogin provides access to the Cloud OS Login API.
//
// See https://cloud.google.com/compute/docs/oslogin/rest/
//
diff --git a/oslogin/v1alpha/oslogin-api.json b/oslogin/v1alpha/oslogin-api.json
index e7d913c..5d2edde 100644
--- a/oslogin/v1alpha/oslogin-api.json
+++ b/oslogin/v1alpha/oslogin-api.json
@@ -314,7 +314,7 @@
}
}
},
- "revision": "20180202",
+ "revision": "20180306",
"rootUrl": "https://oslogin.googleapis.com/",
"schemas": {
"Empty": {
@@ -426,7 +426,7 @@
}
},
"servicePath": "",
- "title": "Google Cloud OS Login API",
+ "title": "Cloud OS Login API",
"version": "v1alpha",
"version_module": true
}
\ No newline at end of file
diff --git a/oslogin/v1alpha/oslogin-gen.go b/oslogin/v1alpha/oslogin-gen.go
index 8230e32..ceac683 100644
--- a/oslogin/v1alpha/oslogin-gen.go
+++ b/oslogin/v1alpha/oslogin-gen.go
@@ -1,4 +1,4 @@
-// Package oslogin provides access to the Google Cloud OS Login API.
+// Package oslogin provides access to the Cloud OS Login API.
//
// See https://cloud.google.com/compute/docs/oslogin/rest/
//
diff --git a/oslogin/v1beta/oslogin-api.json b/oslogin/v1beta/oslogin-api.json
index 26e1639..513a047 100644
--- a/oslogin/v1beta/oslogin-api.json
+++ b/oslogin/v1beta/oslogin-api.json
@@ -314,7 +314,7 @@
}
}
},
- "revision": "20180202",
+ "revision": "20180306",
"rootUrl": "https://oslogin.googleapis.com/",
"schemas": {
"Empty": {
@@ -426,7 +426,7 @@
}
},
"servicePath": "",
- "title": "Google Cloud OS Login API",
+ "title": "Cloud OS Login API",
"version": "v1beta",
"version_module": true
}
\ No newline at end of file
diff --git a/oslogin/v1beta/oslogin-gen.go b/oslogin/v1beta/oslogin-gen.go
index c501e1a..186922c 100644
--- a/oslogin/v1beta/oslogin-gen.go
+++ b/oslogin/v1beta/oslogin-gen.go
@@ -1,4 +1,4 @@
-// Package oslogin provides access to the Google Cloud OS Login API.
+// Package oslogin provides access to the Cloud OS Login API.
//
// See https://cloud.google.com/compute/docs/oslogin/rest/
//
diff --git a/pagespeedonline/v4/pagespeedonline-api.json b/pagespeedonline/v4/pagespeedonline-api.json
new file mode 100644
index 0000000..a8d652d
--- /dev/null
+++ b/pagespeedonline/v4/pagespeedonline-api.json
@@ -0,0 +1,605 @@
+{
+ "basePath": "/pagespeedonline/v4/",
+ "baseUrl": "https://www.googleapis.com/pagespeedonline/v4/",
+ "batchPath": "batch/pagespeedonline/v4",
+ "description": "Analyzes the performance of a web page and provides tailored suggestions to make that page faster.",
+ "discoveryVersion": "v1",
+ "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/pP7h1URmYSyYoOU6ofcFP2Efxhk\"",
+ "icons": {
+ "x16": "https://www.google.com/images/icons/product/pagespeed-16.png",
+ "x32": "https://www.google.com/images/icons/product/pagespeed-32.png"
+ },
+ "id": "pagespeedonline:v4",
+ "kind": "discovery#restDescription",
+ "name": "pagespeedonline",
+ "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": "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. Overrides userIp if both are provided.",
+ "location": "query",
+ "type": "string"
+ },
+ "userIp": {
+ "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "protocol": "rest",
+ "resources": {
+ "pagespeedapi": {
+ "methods": {
+ "runpagespeed": {
+ "description": "Runs PageSpeed analysis on the page at the specified URL, and returns PageSpeed scores, a list of suggestions to make that page faster, and other information.",
+ "httpMethod": "GET",
+ "id": "pagespeedonline.pagespeedapi.runpagespeed",
+ "parameterOrder": [
+ "url"
+ ],
+ "parameters": {
+ "filter_third_party_resources": {
+ "default": "false",
+ "description": "Indicates if third party resources should be filtered out before PageSpeed analysis.",
+ "location": "query",
+ "type": "boolean"
+ },
+ "locale": {
+ "description": "The locale used to localize formatted results",
+ "location": "query",
+ "pattern": "[a-zA-Z]+(_[a-zA-Z]+)?",
+ "type": "string"
+ },
+ "rule": {
+ "description": "A PageSpeed rule to run; if none are given, all rules are run",
+ "location": "query",
+ "pattern": "[a-zA-Z]+",
+ "repeated": true,
+ "type": "string"
+ },
+ "screenshot": {
+ "default": "false",
+ "description": "Indicates if binary data containing a screenshot should be included",
+ "location": "query",
+ "type": "boolean"
+ },
+ "snapshots": {
+ "default": "false",
+ "description": "Indicates if binary data containing snapshot images should be included",
+ "location": "query",
+ "type": "boolean"
+ },
+ "strategy": {
+ "description": "The analysis strategy (desktop or mobile) to use, and desktop is the default",
+ "enum": [
+ "desktop",
+ "mobile"
+ ],
+ "enumDescriptions": [
+ "Fetch and analyze the URL for desktop browsers",
+ "Fetch and analyze the URL for mobile devices"
+ ],
+ "location": "query",
+ "type": "string"
+ },
+ "url": {
+ "description": "The URL to fetch and analyze",
+ "location": "query",
+ "pattern": "(?i)http(s)?://.*",
+ "required": true,
+ "type": "string"
+ },
+ "utm_campaign": {
+ "description": "Campaign name for analytics.",
+ "location": "query",
+ "type": "string"
+ },
+ "utm_source": {
+ "description": "Campaign source for analytics.",
+ "location": "query",
+ "type": "string"
+ }
+ },
+ "path": "runPagespeed",
+ "response": {
+ "$ref": "PagespeedApiPagespeedResponseV4"
+ }
+ }
+ }
+ }
+ },
+ "revision": "20180308",
+ "rootUrl": "https://www.googleapis.com/",
+ "schemas": {
+ "PagespeedApiFormatStringV4": {
+ "id": "PagespeedApiFormatStringV4",
+ "properties": {
+ "args": {
+ "description": "List of arguments for the format string.",
+ "items": {
+ "properties": {
+ "key": {
+ "description": "The placeholder key for this arg, as a string.",
+ "type": "string"
+ },
+ "rects": {
+ "description": "The screen rectangles being referred to, with dimensions measured in CSS pixels. This is only ever used for SNAPSHOT_RECT arguments. If this is absent for a SNAPSHOT_RECT argument, it means that that argument refers to the entire snapshot.",
+ "items": {
+ "properties": {
+ "height": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "left": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "top": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "width": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "secondary_rects": {
+ "description": "Secondary screen rectangles being referred to, with dimensions measured in CSS pixels. This is only ever used for SNAPSHOT_RECT arguments.",
+ "items": {
+ "properties": {
+ "height": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "left": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "top": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "width": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "type": {
+ "description": "Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT.",
+ "type": "string"
+ },
+ "value": {
+ "description": "Argument value, as a localized string.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "format": {
+ "description": "A localized format string with {{FOO}} placeholders, where 'FOO' is the key of the argument whose value should be substituted. For HYPERLINK arguments, the format string will instead contain {{BEGIN_FOO}} and {{END_FOO}} for the argument with key 'FOO'.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "PagespeedApiImageV4": {
+ "id": "PagespeedApiImageV4",
+ "properties": {
+ "data": {
+ "description": "Image data base64 encoded.",
+ "format": "byte",
+ "type": "string"
+ },
+ "height": {
+ "description": "Height of screenshot in pixels.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "key": {
+ "description": "Unique string key, if any, identifying this image.",
+ "type": "string"
+ },
+ "mime_type": {
+ "description": "Mime type of image data (e.g. \"image/jpeg\").",
+ "type": "string"
+ },
+ "page_rect": {
+ "properties": {
+ "height": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "left": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "top": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "width": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "width": {
+ "description": "Width of screenshot in pixels.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "PagespeedApiPagespeedResponseV4": {
+ "id": "PagespeedApiPagespeedResponseV4",
+ "properties": {
+ "captchaResult": {
+ "description": "The captcha verify result",
+ "type": "string"
+ },
+ "formattedResults": {
+ "description": "Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed rule instantiated and run by the server.",
+ "properties": {
+ "locale": {
+ "description": "The locale of the formattedResults, e.g. \"en_US\".",
+ "type": "string"
+ },
+ "ruleResults": {
+ "additionalProperties": {
+ "description": "The enum-like identifier for this rule. For instance \"EnableKeepAlive\" or \"AvoidCssImport\". Not localized.",
+ "properties": {
+ "beta": {
+ "description": "Whether this rule is in 'beta'. Rules in beta are new rules that are being tested, which do not impact the overall score.",
+ "type": "boolean"
+ },
+ "groups": {
+ "description": "List of rule groups that this rule belongs to. Each entry in the list is one of \"SPEED\", \"USABILITY\", or \"SECURITY\".",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "localizedRuleName": {
+ "description": "Localized name of the rule, intended for presentation to a user.",
+ "type": "string"
+ },
+ "ruleImpact": {
+ "description": "The impact (unbounded floating point value) that implementing the suggestions for this rule would have on making the page faster. Impact is comparable between rules to determine which rule's suggestions would have a higher or lower impact on making a page faster. For instance, if enabling compression would save 1MB, while optimizing images would save 500kB, the enable compression rule would have 2x the impact of the image optimization rule, all other things being equal.",
+ "format": "double",
+ "type": "number"
+ },
+ "summary": {
+ "$ref": "PagespeedApiFormatStringV4",
+ "description": "A brief summary description for the rule, indicating at a high level what should be done to follow the rule and what benefit can be gained by doing so."
+ },
+ "urlBlocks": {
+ "description": "List of blocks of URLs. Each block may contain a heading and a list of URLs. Each URL may optionally include additional details.",
+ "items": {
+ "properties": {
+ "header": {
+ "$ref": "PagespeedApiFormatStringV4",
+ "description": "Heading to be displayed with the list of URLs."
+ },
+ "urls": {
+ "description": "List of entries that provide information about URLs in the url block. Optional.",
+ "items": {
+ "properties": {
+ "details": {
+ "description": "List of entries that provide additional details about a single URL. Optional.",
+ "items": {
+ "$ref": "PagespeedApiFormatStringV4"
+ },
+ "type": "array"
+ },
+ "result": {
+ "$ref": "PagespeedApiFormatStringV4",
+ "description": "A format string that gives information about the URL, and a list of arguments for that format string."
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "description": "Dictionary of formatted rule results, with one entry for each PageSpeed rule instantiated and run by the server.",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "id": {
+ "description": "Canonicalized and final URL for the document, after following page redirects (if any).",
+ "type": "string"
+ },
+ "invalidRules": {
+ "description": "List of rules that were specified in the request, but which the server did not know how to instantiate.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "default": "pagespeedonline#result",
+ "description": "Kind of result.",
+ "type": "string"
+ },
+ "loadingExperience": {
+ "description": "Metrics of end users' page loading experience.",
+ "properties": {
+ "id": {
+ "description": "The url, pattern or origin which the metrics are on.",
+ "type": "string"
+ },
+ "initial_url": {
+ "type": "string"
+ },
+ "metrics": {
+ "additionalProperties": {
+ "description": "The type of the metric.",
+ "properties": {
+ "category": {
+ "type": "string"
+ },
+ "distributions": {
+ "items": {
+ "properties": {
+ "max": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "min": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "proportion": {
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "median": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "object"
+ },
+ "overall_category": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "pageStats": {
+ "description": "Summary statistics for the page, such as number of JavaScript bytes, number of HTML bytes, etc.",
+ "properties": {
+ "cms": {
+ "description": "Content management system (CMS) used for the page.",
+ "type": "string"
+ },
+ "cssResponseBytes": {
+ "description": "Number of uncompressed response bytes for CSS resources on the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "flashResponseBytes": {
+ "description": "Number of response bytes for flash resources on the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "htmlResponseBytes": {
+ "description": "Number of uncompressed response bytes for the main HTML document and all iframes on the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "imageResponseBytes": {
+ "description": "Number of response bytes for image resources on the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "javascriptResponseBytes": {
+ "description": "Number of uncompressed response bytes for JS resources on the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "numRenderBlockingRoundTrips": {
+ "description": "The needed round trips to load render blocking resources",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numTotalRoundTrips": {
+ "description": "The needed round trips to load the full page",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numberCssResources": {
+ "description": "Number of CSS resources referenced by the page.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numberHosts": {
+ "description": "Number of unique hosts referenced by the page.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numberJsResources": {
+ "description": "Number of JavaScript resources referenced by the page.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numberResources": {
+ "description": "Number of HTTP resources loaded by the page.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numberRobotedResources": {
+ "description": "Number of roboted resources.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numberStaticResources": {
+ "description": "Number of static (i.e. cacheable) resources on the page.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "numberTransientFetchFailureResources": {
+ "description": "Number of transient-failed resources.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "otherResponseBytes": {
+ "description": "Number of response bytes for other resources on the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "overTheWireResponseBytes": {
+ "description": "Number of over-the-wire bytes, uses the default gzip compression strategy as an estimation.",
+ "format": "int64",
+ "type": "string"
+ },
+ "robotedUrls": {
+ "description": "List of roboted urls.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "textResponseBytes": {
+ "description": "Number of uncompressed response bytes for text resources not covered by other statistics (i.e non-HTML, non-script, non-CSS resources) on the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "totalRequestBytes": {
+ "description": "Total size of all request bytes sent by the page.",
+ "format": "int64",
+ "type": "string"
+ },
+ "transientFetchFailureUrls": {
+ "description": "List of transient fetch failure urls.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "responseCode": {
+ "description": "Response code for the document. 200 indicates a normal page load. 4xx/5xx indicates an error.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "ruleGroups": {
+ "additionalProperties": {
+ "description": "The name of this rule group: one of \"SPEED\", \"USABILITY\", or \"SECURITY\".",
+ "properties": {
+ "pass": {
+ "type": "boolean"
+ },
+ "score": {
+ "description": "The score (0-100) for this rule group, which indicates how much better a page could be in that category (e.g. how much faster, or how much more usable, or how much more secure). A high score indicates little room for improvement, while a lower score indicates more room for improvement.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "description": "A map with one entry for each rule group in these results.",
+ "type": "object"
+ },
+ "screenshot": {
+ "$ref": "PagespeedApiImageV4",
+ "description": "Base64-encoded screenshot of the page that was analyzed."
+ },
+ "snapshots": {
+ "description": "Additional base64-encoded screenshots of the page, in various partial render states.",
+ "items": {
+ "$ref": "PagespeedApiImageV4"
+ },
+ "type": "array"
+ },
+ "title": {
+ "description": "Title of the page, as displayed in the browser's title bar.",
+ "type": "string"
+ },
+ "version": {
+ "description": "The version of PageSpeed used to generate these results.",
+ "properties": {
+ "major": {
+ "description": "The major version number of PageSpeed used to generate these results.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "minor": {
+ "description": "The minor version number of PageSpeed used to generate these results.",
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "servicePath": "pagespeedonline/v4/",
+ "title": "PageSpeed Insights API",
+ "version": "v4"
+}
\ No newline at end of file
diff --git a/pagespeedonline/v4/pagespeedonline-gen.go b/pagespeedonline/v4/pagespeedonline-gen.go
new file mode 100644
index 0000000..2ad3ea6
--- /dev/null
+++ b/pagespeedonline/v4/pagespeedonline-gen.go
@@ -0,0 +1,1067 @@
+// Package pagespeedonline provides access to the PageSpeed Insights API.
+//
+// Usage example:
+//
+// import "google.golang.org/api/pagespeedonline/v4"
+// ...
+// pagespeedonlineService, err := pagespeedonline.New(oauthHttpClient)
+package pagespeedonline // import "google.golang.org/api/pagespeedonline/v4"
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ context "golang.org/x/net/context"
+ ctxhttp "golang.org/x/net/context/ctxhttp"
+ gensupport "google.golang.org/api/gensupport"
+ googleapi "google.golang.org/api/googleapi"
+ "io"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// 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
+var _ = ctxhttp.Do
+
+const apiId = "pagespeedonline:v4"
+const apiName = "pagespeedonline"
+const apiVersion = "v4"
+const basePath = "https://www.googleapis.com/pagespeedonline/v4/"
+
+func New(client *http.Client) (*Service, error) {
+ if client == nil {
+ return nil, errors.New("client is nil")
+ }
+ s := &Service{client: client, BasePath: basePath}
+ s.Pagespeedapi = NewPagespeedapiService(s)
+ return s, nil
+}
+
+type Service struct {
+ client *http.Client
+ BasePath string // API endpoint base URL
+ UserAgent string // optional additional User-Agent fragment
+
+ Pagespeedapi *PagespeedapiService
+}
+
+func (s *Service) userAgent() string {
+ if s.UserAgent == "" {
+ return googleapi.UserAgent
+ }
+ return googleapi.UserAgent + " " + s.UserAgent
+}
+
+func NewPagespeedapiService(s *Service) *PagespeedapiService {
+ rs := &PagespeedapiService{s: s}
+ return rs
+}
+
+type PagespeedapiService struct {
+ s *Service
+}
+
+type PagespeedApiFormatStringV4 struct {
+ // Args: List of arguments for the format string.
+ Args []*PagespeedApiFormatStringV4Args `json:"args,omitempty"`
+
+ // Format: A localized format string with {{FOO}} placeholders, where
+ // 'FOO' is the key of the argument whose value should be substituted.
+ // For HYPERLINK arguments, the format string will instead contain
+ // {{BEGIN_FOO}} and {{END_FOO}} for the argument with key 'FOO'.
+ Format string `json:"format,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 *PagespeedApiFormatStringV4) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiFormatStringV4
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiFormatStringV4Args struct {
+ // Key: The placeholder key for this arg, as a string.
+ Key string `json:"key,omitempty"`
+
+ // Rects: The screen rectangles being referred to, with dimensions
+ // measured in CSS pixels. This is only ever used for SNAPSHOT_RECT
+ // arguments. If this is absent for a SNAPSHOT_RECT argument, it means
+ // that that argument refers to the entire snapshot.
+ Rects []*PagespeedApiFormatStringV4ArgsRects `json:"rects,omitempty"`
+
+ // SecondaryRects: Secondary screen rectangles being referred to, with
+ // dimensions measured in CSS pixels. This is only ever used for
+ // SNAPSHOT_RECT arguments.
+ SecondaryRects []*PagespeedApiFormatStringV4ArgsSecondaryRects `json:"secondary_rects,omitempty"`
+
+ // Type: Type of argument. One of URL, STRING_LITERAL, INT_LITERAL,
+ // BYTES, DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLINK, or
+ // SNAPSHOT_RECT.
+ Type string `json:"type,omitempty"`
+
+ // Value: Argument value, as a localized string.
+ 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 *PagespeedApiFormatStringV4Args) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiFormatStringV4Args
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiFormatStringV4ArgsRects struct {
+ Height int64 `json:"height,omitempty"`
+
+ Left int64 `json:"left,omitempty"`
+
+ Top int64 `json:"top,omitempty"`
+
+ Width int64 `json:"width,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Height") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Height") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiFormatStringV4ArgsRects) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiFormatStringV4ArgsRects
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiFormatStringV4ArgsSecondaryRects struct {
+ Height int64 `json:"height,omitempty"`
+
+ Left int64 `json:"left,omitempty"`
+
+ Top int64 `json:"top,omitempty"`
+
+ Width int64 `json:"width,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Height") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Height") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiFormatStringV4ArgsSecondaryRects) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiFormatStringV4ArgsSecondaryRects
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiImageV4 struct {
+ // Data: Image data base64 encoded.
+ Data string `json:"data,omitempty"`
+
+ // Height: Height of screenshot in pixels.
+ Height int64 `json:"height,omitempty"`
+
+ // Key: Unique string key, if any, identifying this image.
+ Key string `json:"key,omitempty"`
+
+ // MimeType: Mime type of image data (e.g. "image/jpeg").
+ MimeType string `json:"mime_type,omitempty"`
+
+ PageRect *PagespeedApiImageV4PageRect `json:"page_rect,omitempty"`
+
+ // Width: Width of screenshot in pixels.
+ Width int64 `json:"width,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Data") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Data") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiImageV4) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiImageV4
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiImageV4PageRect struct {
+ Height int64 `json:"height,omitempty"`
+
+ Left int64 `json:"left,omitempty"`
+
+ Top int64 `json:"top,omitempty"`
+
+ Width int64 `json:"width,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Height") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Height") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiImageV4PageRect) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiImageV4PageRect
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiPagespeedResponseV4 struct {
+ // CaptchaResult: The captcha verify result
+ CaptchaResult string `json:"captchaResult,omitempty"`
+
+ // FormattedResults: Localized PageSpeed results. Contains a ruleResults
+ // entry for each PageSpeed rule instantiated and run by the server.
+ FormattedResults *PagespeedApiPagespeedResponseV4FormattedResults `json:"formattedResults,omitempty"`
+
+ // Id: Canonicalized and final URL for the document, after following
+ // page redirects (if any).
+ Id string `json:"id,omitempty"`
+
+ // InvalidRules: List of rules that were specified in the request, but
+ // which the server did not know how to instantiate.
+ InvalidRules []string `json:"invalidRules,omitempty"`
+
+ // Kind: Kind of result.
+ Kind string `json:"kind,omitempty"`
+
+ // LoadingExperience: Metrics of end users' page loading experience.
+ LoadingExperience *PagespeedApiPagespeedResponseV4LoadingExperience `json:"loadingExperience,omitempty"`
+
+ // PageStats: Summary statistics for the page, such as number of
+ // JavaScript bytes, number of HTML bytes, etc.
+ PageStats *PagespeedApiPagespeedResponseV4PageStats `json:"pageStats,omitempty"`
+
+ // ResponseCode: Response code for the document. 200 indicates a normal
+ // page load. 4xx/5xx indicates an error.
+ ResponseCode int64 `json:"responseCode,omitempty"`
+
+ // RuleGroups: A map with one entry for each rule group in these
+ // results.
+ RuleGroups map[string]PagespeedApiPagespeedResponseV4RuleGroups `json:"ruleGroups,omitempty"`
+
+ // Screenshot: Base64-encoded screenshot of the page that was analyzed.
+ Screenshot *PagespeedApiImageV4 `json:"screenshot,omitempty"`
+
+ // Snapshots: Additional base64-encoded screenshots of the page, in
+ // various partial render states.
+ Snapshots []*PagespeedApiImageV4 `json:"snapshots,omitempty"`
+
+ // Title: Title of the page, as displayed in the browser's title bar.
+ Title string `json:"title,omitempty"`
+
+ // Version: The version of PageSpeed used to generate these results.
+ Version *PagespeedApiPagespeedResponseV4Version `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. "CaptchaResult") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "CaptchaResult") to include
+ // in API requests with the JSON null value. By default, fields with
+ // empty values are omitted from API requests. However, any field with
+ // an empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PagespeedApiPagespeedResponseV4FormattedResults: Localized PageSpeed
+// results. Contains a ruleResults entry for each PageSpeed rule
+// instantiated and run by the server.
+type PagespeedApiPagespeedResponseV4FormattedResults struct {
+ // Locale: The locale of the formattedResults, e.g. "en_US".
+ Locale string `json:"locale,omitempty"`
+
+ // RuleResults: Dictionary of formatted rule results, with one entry for
+ // each PageSpeed rule instantiated and run by the server.
+ RuleResults map[string]PagespeedApiPagespeedResponseV4FormattedResultsRuleResults `json:"ruleResults,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Locale") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Locale") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4FormattedResults) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4FormattedResults
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PagespeedApiPagespeedResponseV4FormattedResultsRuleResults: The
+// enum-like identifier for this rule. For instance "EnableKeepAlive" or
+// "AvoidCssImport". Not localized.
+type PagespeedApiPagespeedResponseV4FormattedResultsRuleResults struct {
+ // Beta: Whether this rule is in 'beta'. Rules in beta are new rules
+ // that are being tested, which do not impact the overall score.
+ Beta bool `json:"beta,omitempty"`
+
+ // Groups: List of rule groups that this rule belongs to. Each entry in
+ // the list is one of "SPEED", "USABILITY", or "SECURITY".
+ Groups []string `json:"groups,omitempty"`
+
+ // LocalizedRuleName: Localized name of the rule, intended for
+ // presentation to a user.
+ LocalizedRuleName string `json:"localizedRuleName,omitempty"`
+
+ // RuleImpact: The impact (unbounded floating point value) that
+ // implementing the suggestions for this rule would have on making the
+ // page faster. Impact is comparable between rules to determine which
+ // rule's suggestions would have a higher or lower impact on making a
+ // page faster. For instance, if enabling compression would save 1MB,
+ // while optimizing images would save 500kB, the enable compression rule
+ // would have 2x the impact of the image optimization rule, all other
+ // things being equal.
+ RuleImpact float64 `json:"ruleImpact,omitempty"`
+
+ // Summary: A brief summary description for the rule, indicating at a
+ // high level what should be done to follow the rule and what benefit
+ // can be gained by doing so.
+ Summary *PagespeedApiFormatStringV4 `json:"summary,omitempty"`
+
+ // UrlBlocks: List of blocks of URLs. Each block may contain a heading
+ // and a list of URLs. Each URL may optionally include additional
+ // details.
+ UrlBlocks []*PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocks `json:"urlBlocks,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Beta") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Beta") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4FormattedResultsRuleResults) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4FormattedResultsRuleResults
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *PagespeedApiPagespeedResponseV4FormattedResultsRuleResults) UnmarshalJSON(data []byte) error {
+ type NoMethod PagespeedApiPagespeedResponseV4FormattedResultsRuleResults
+ var s1 struct {
+ RuleImpact gensupport.JSONFloat64 `json:"ruleImpact"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.RuleImpact = float64(s1.RuleImpact)
+ return nil
+}
+
+type PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocks struct {
+ // Header: Heading to be displayed with the list of URLs.
+ Header *PagespeedApiFormatStringV4 `json:"header,omitempty"`
+
+ // Urls: List of entries that provide information about URLs in the url
+ // block. Optional.
+ Urls []*PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocksUrls `json:"urls,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Header") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Header") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocks) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocks
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocksUrls struct {
+ // Details: List of entries that provide additional details about a
+ // single URL. Optional.
+ Details []*PagespeedApiFormatStringV4 `json:"details,omitempty"`
+
+ // Result: A format string that gives information about the URL, and a
+ // list of arguments for that format string.
+ Result *PagespeedApiFormatStringV4 `json:"result,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Details") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Details") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocksUrls) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4FormattedResultsRuleResultsUrlBlocksUrls
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PagespeedApiPagespeedResponseV4LoadingExperience: Metrics of end
+// users' page loading experience.
+type PagespeedApiPagespeedResponseV4LoadingExperience struct {
+ // Id: The url, pattern or origin which the metrics are on.
+ Id string `json:"id,omitempty"`
+
+ InitialUrl string `json:"initial_url,omitempty"`
+
+ Metrics map[string]PagespeedApiPagespeedResponseV4LoadingExperienceMetrics `json:"metrics,omitempty"`
+
+ OverallCategory string `json:"overall_category,omitempty"`
+
+ // 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 *PagespeedApiPagespeedResponseV4LoadingExperience) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4LoadingExperience
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PagespeedApiPagespeedResponseV4LoadingExperienceMetrics: The type of
+// the metric.
+type PagespeedApiPagespeedResponseV4LoadingExperienceMetrics struct {
+ Category string `json:"category,omitempty"`
+
+ Distributions []*PagespeedApiPagespeedResponseV4LoadingExperienceMetricsDistributions `json:"distributions,omitempty"`
+
+ Median int64 `json:"median,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Category") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Category") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4LoadingExperienceMetrics) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4LoadingExperienceMetrics
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+type PagespeedApiPagespeedResponseV4LoadingExperienceMetricsDistributions struct {
+ Max int64 `json:"max,omitempty"`
+
+ Min int64 `json:"min,omitempty"`
+
+ Proportion float64 `json:"proportion,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Max") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Max") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4LoadingExperienceMetricsDistributions) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4LoadingExperienceMetricsDistributions
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+func (s *PagespeedApiPagespeedResponseV4LoadingExperienceMetricsDistributions) UnmarshalJSON(data []byte) error {
+ type NoMethod PagespeedApiPagespeedResponseV4LoadingExperienceMetricsDistributions
+ var s1 struct {
+ Proportion gensupport.JSONFloat64 `json:"proportion"`
+ *NoMethod
+ }
+ s1.NoMethod = (*NoMethod)(s)
+ if err := json.Unmarshal(data, &s1); err != nil {
+ return err
+ }
+ s.Proportion = float64(s1.Proportion)
+ return nil
+}
+
+// PagespeedApiPagespeedResponseV4PageStats: Summary statistics for the
+// page, such as number of JavaScript bytes, number of HTML bytes, etc.
+type PagespeedApiPagespeedResponseV4PageStats struct {
+ // Cms: Content management system (CMS) used for the page.
+ Cms string `json:"cms,omitempty"`
+
+ // CssResponseBytes: Number of uncompressed response bytes for CSS
+ // resources on the page.
+ CssResponseBytes int64 `json:"cssResponseBytes,omitempty,string"`
+
+ // FlashResponseBytes: Number of response bytes for flash resources on
+ // the page.
+ FlashResponseBytes int64 `json:"flashResponseBytes,omitempty,string"`
+
+ // HtmlResponseBytes: Number of uncompressed response bytes for the main
+ // HTML document and all iframes on the page.
+ HtmlResponseBytes int64 `json:"htmlResponseBytes,omitempty,string"`
+
+ // ImageResponseBytes: Number of response bytes for image resources on
+ // the page.
+ ImageResponseBytes int64 `json:"imageResponseBytes,omitempty,string"`
+
+ // JavascriptResponseBytes: Number of uncompressed response bytes for JS
+ // resources on the page.
+ JavascriptResponseBytes int64 `json:"javascriptResponseBytes,omitempty,string"`
+
+ // NumRenderBlockingRoundTrips: The needed round trips to load render
+ // blocking resources
+ NumRenderBlockingRoundTrips int64 `json:"numRenderBlockingRoundTrips,omitempty"`
+
+ // NumTotalRoundTrips: The needed round trips to load the full page
+ NumTotalRoundTrips int64 `json:"numTotalRoundTrips,omitempty"`
+
+ // NumberCssResources: Number of CSS resources referenced by the page.
+ NumberCssResources int64 `json:"numberCssResources,omitempty"`
+
+ // NumberHosts: Number of unique hosts referenced by the page.
+ NumberHosts int64 `json:"numberHosts,omitempty"`
+
+ // NumberJsResources: Number of JavaScript resources referenced by the
+ // page.
+ NumberJsResources int64 `json:"numberJsResources,omitempty"`
+
+ // NumberResources: Number of HTTP resources loaded by the page.
+ NumberResources int64 `json:"numberResources,omitempty"`
+
+ // NumberRobotedResources: Number of roboted resources.
+ NumberRobotedResources int64 `json:"numberRobotedResources,omitempty"`
+
+ // NumberStaticResources: Number of static (i.e. cacheable) resources on
+ // the page.
+ NumberStaticResources int64 `json:"numberStaticResources,omitempty"`
+
+ // NumberTransientFetchFailureResources: Number of transient-failed
+ // resources.
+ NumberTransientFetchFailureResources int64 `json:"numberTransientFetchFailureResources,omitempty"`
+
+ // OtherResponseBytes: Number of response bytes for other resources on
+ // the page.
+ OtherResponseBytes int64 `json:"otherResponseBytes,omitempty,string"`
+
+ // OverTheWireResponseBytes: Number of over-the-wire bytes, uses the
+ // default gzip compression strategy as an estimation.
+ OverTheWireResponseBytes int64 `json:"overTheWireResponseBytes,omitempty,string"`
+
+ // RobotedUrls: List of roboted urls.
+ RobotedUrls []string `json:"robotedUrls,omitempty"`
+
+ // TextResponseBytes: Number of uncompressed response bytes for text
+ // resources not covered by other statistics (i.e non-HTML, non-script,
+ // non-CSS resources) on the page.
+ TextResponseBytes int64 `json:"textResponseBytes,omitempty,string"`
+
+ // TotalRequestBytes: Total size of all request bytes sent by the page.
+ TotalRequestBytes int64 `json:"totalRequestBytes,omitempty,string"`
+
+ // TransientFetchFailureUrls: List of transient fetch failure urls.
+ TransientFetchFailureUrls []string `json:"transientFetchFailureUrls,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Cms") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Cms") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4PageStats) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4PageStats
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PagespeedApiPagespeedResponseV4RuleGroups: The name of this rule
+// group: one of "SPEED", "USABILITY", or "SECURITY".
+type PagespeedApiPagespeedResponseV4RuleGroups struct {
+ Pass bool `json:"pass,omitempty"`
+
+ // Score: The score (0-100) for this rule group, which indicates how
+ // much better a page could be in that category (e.g. how much faster,
+ // or how much more usable, or how much more secure). A high score
+ // indicates little room for improvement, while a lower score indicates
+ // more room for improvement.
+ Score int64 `json:"score,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Pass") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Pass") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4RuleGroups) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4RuleGroups
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// PagespeedApiPagespeedResponseV4Version: The version of PageSpeed used
+// to generate these results.
+type PagespeedApiPagespeedResponseV4Version struct {
+ // Major: The major version number of PageSpeed used to generate these
+ // results.
+ Major int64 `json:"major,omitempty"`
+
+ // Minor: The minor version number of PageSpeed used to generate these
+ // results.
+ Minor int64 `json:"minor,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Major") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Major") to include in API
+ // requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *PagespeedApiPagespeedResponseV4Version) MarshalJSON() ([]byte, error) {
+ type NoMethod PagespeedApiPagespeedResponseV4Version
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
+// method id "pagespeedonline.pagespeedapi.runpagespeed":
+
+type PagespeedapiRunpagespeedCall struct {
+ s *Service
+ urlParams_ gensupport.URLParams
+ ifNoneMatch_ string
+ ctx_ context.Context
+ header_ http.Header
+}
+
+// Runpagespeed: Runs PageSpeed analysis on the page at the specified
+// URL, and returns PageSpeed scores, a list of suggestions to make that
+// page faster, and other information.
+func (r *PagespeedapiService) Runpagespeed(url string) *PagespeedapiRunpagespeedCall {
+ c := &PagespeedapiRunpagespeedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
+ c.urlParams_.Set("url", url)
+ return c
+}
+
+// FilterThirdPartyResources sets the optional parameter
+// "filter_third_party_resources": Indicates if third party resources
+// should be filtered out before PageSpeed analysis.
+func (c *PagespeedapiRunpagespeedCall) FilterThirdPartyResources(filterThirdPartyResources bool) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.Set("filter_third_party_resources", fmt.Sprint(filterThirdPartyResources))
+ return c
+}
+
+// Locale sets the optional parameter "locale": The locale used to
+// localize formatted results
+func (c *PagespeedapiRunpagespeedCall) Locale(locale string) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.Set("locale", locale)
+ return c
+}
+
+// Rule sets the optional parameter "rule": A PageSpeed rule to run; if
+// none are given, all rules are run
+func (c *PagespeedapiRunpagespeedCall) Rule(rule ...string) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.SetMulti("rule", append([]string{}, rule...))
+ return c
+}
+
+// Screenshot sets the optional parameter "screenshot": Indicates if
+// binary data containing a screenshot should be included
+func (c *PagespeedapiRunpagespeedCall) Screenshot(screenshot bool) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.Set("screenshot", fmt.Sprint(screenshot))
+ return c
+}
+
+// Snapshots sets the optional parameter "snapshots": Indicates if
+// binary data containing snapshot images should be included
+func (c *PagespeedapiRunpagespeedCall) Snapshots(snapshots bool) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.Set("snapshots", fmt.Sprint(snapshots))
+ return c
+}
+
+// Strategy sets the optional parameter "strategy": The analysis
+// strategy (desktop or mobile) to use, and desktop is the default
+//
+// Possible values:
+// "desktop" - Fetch and analyze the URL for desktop browsers
+// "mobile" - Fetch and analyze the URL for mobile devices
+func (c *PagespeedapiRunpagespeedCall) Strategy(strategy string) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.Set("strategy", strategy)
+ return c
+}
+
+// UtmCampaign sets the optional parameter "utm_campaign": Campaign name
+// for analytics.
+func (c *PagespeedapiRunpagespeedCall) UtmCampaign(utmCampaign string) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.Set("utm_campaign", utmCampaign)
+ return c
+}
+
+// UtmSource sets the optional parameter "utm_source": Campaign source
+// for analytics.
+func (c *PagespeedapiRunpagespeedCall) UtmSource(utmSource string) *PagespeedapiRunpagespeedCall {
+ c.urlParams_.Set("utm_source", utmSource)
+ 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 *PagespeedapiRunpagespeedCall) Fields(s ...googleapi.Field) *PagespeedapiRunpagespeedCall {
+ 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 *PagespeedapiRunpagespeedCall) IfNoneMatch(entityTag string) *PagespeedapiRunpagespeedCall {
+ 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 *PagespeedapiRunpagespeedCall) Context(ctx context.Context) *PagespeedapiRunpagespeedCall {
+ 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 *PagespeedapiRunpagespeedCall) Header() http.Header {
+ if c.header_ == nil {
+ c.header_ = make(http.Header)
+ }
+ return c.header_
+}
+
+func (c *PagespeedapiRunpagespeedCall) 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)
+ urls := googleapi.ResolveRelative(c.s.BasePath, "runPagespeed")
+ urls += "?" + c.urlParams_.Encode()
+ req, _ := http.NewRequest("GET", urls, body)
+ req.Header = reqHeaders
+ return gensupport.SendRequest(c.ctx_, c.s.client, req)
+}
+
+// Do executes the "pagespeedonline.pagespeedapi.runpagespeed" call.
+// Exactly one of *PagespeedApiPagespeedResponseV4 or error will be
+// non-nil. Any non-2xx status code is an error. Response headers are in
+// either *PagespeedApiPagespeedResponseV4.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 *PagespeedapiRunpagespeedCall) Do(opts ...googleapi.CallOption) (*PagespeedApiPagespeedResponseV4, 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 := &PagespeedApiPagespeedResponseV4{
+ 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 PageSpeed analysis on the page at the specified URL, and returns PageSpeed scores, a list of suggestions to make that page faster, and other information.",
+ // "httpMethod": "GET",
+ // "id": "pagespeedonline.pagespeedapi.runpagespeed",
+ // "parameterOrder": [
+ // "url"
+ // ],
+ // "parameters": {
+ // "filter_third_party_resources": {
+ // "default": "false",
+ // "description": "Indicates if third party resources should be filtered out before PageSpeed analysis.",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "locale": {
+ // "description": "The locale used to localize formatted results",
+ // "location": "query",
+ // "pattern": "[a-zA-Z]+(_[a-zA-Z]+)?",
+ // "type": "string"
+ // },
+ // "rule": {
+ // "description": "A PageSpeed rule to run; if none are given, all rules are run",
+ // "location": "query",
+ // "pattern": "[a-zA-Z]+",
+ // "repeated": true,
+ // "type": "string"
+ // },
+ // "screenshot": {
+ // "default": "false",
+ // "description": "Indicates if binary data containing a screenshot should be included",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "snapshots": {
+ // "default": "false",
+ // "description": "Indicates if binary data containing snapshot images should be included",
+ // "location": "query",
+ // "type": "boolean"
+ // },
+ // "strategy": {
+ // "description": "The analysis strategy (desktop or mobile) to use, and desktop is the default",
+ // "enum": [
+ // "desktop",
+ // "mobile"
+ // ],
+ // "enumDescriptions": [
+ // "Fetch and analyze the URL for desktop browsers",
+ // "Fetch and analyze the URL for mobile devices"
+ // ],
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "url": {
+ // "description": "The URL to fetch and analyze",
+ // "location": "query",
+ // "pattern": "(?i)http(s)?://.*",
+ // "required": true,
+ // "type": "string"
+ // },
+ // "utm_campaign": {
+ // "description": "Campaign name for analytics.",
+ // "location": "query",
+ // "type": "string"
+ // },
+ // "utm_source": {
+ // "description": "Campaign source for analytics.",
+ // "location": "query",
+ // "type": "string"
+ // }
+ // },
+ // "path": "runPagespeed",
+ // "response": {
+ // "$ref": "PagespeedApiPagespeedResponseV4"
+ // }
+ // }
+
+}
diff --git a/proximitybeacon/v1beta1/proximitybeacon-api.json b/proximitybeacon/v1beta1/proximitybeacon-api.json
index b52b3e9..5300e24 100644
--- a/proximitybeacon/v1beta1/proximitybeacon-api.json
+++ b/proximitybeacon/v1beta1/proximitybeacon-api.json
@@ -653,7 +653,7 @@
}
}
},
- "revision": "20180203",
+ "revision": "20180305",
"rootUrl": "https://proximitybeacon.googleapis.com/",
"schemas": {
"AdvertisedId": {
@@ -1153,7 +1153,7 @@
}
},
"servicePath": "",
- "title": "Google Proximity Beacon API",
+ "title": "Proximity Beacon API",
"version": "v1beta1",
"version_module": true
}
\ No newline at end of file
diff --git a/proximitybeacon/v1beta1/proximitybeacon-gen.go b/proximitybeacon/v1beta1/proximitybeacon-gen.go
index 668fea9..65a99da 100644
--- a/proximitybeacon/v1beta1/proximitybeacon-gen.go
+++ b/proximitybeacon/v1beta1/proximitybeacon-gen.go
@@ -1,4 +1,4 @@
-// Package proximitybeacon provides access to the Google Proximity Beacon API.
+// Package proximitybeacon provides access to the Proximity Beacon API.
//
// See https://developers.google.com/beacons/proximity/
//
diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json
index 5dd78ae..68a07b9 100644
--- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json
+++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json
@@ -447,7 +447,7 @@
}
}
},
- "revision": "20180301",
+ "revision": "20180308",
"rootUrl": "https://serviceconsumermanagement.googleapis.com/",
"schemas": {
"AddTenantProjectRequest": {
@@ -2150,7 +2150,7 @@
"type": "string"
},
"tenantResources": {
- "description": "Resources constituting the tenancy unit.\nThere can be at most 512 tenant resources in a tenancy units.",
+ "description": "Resources constituting the tenancy unit.\nThere can be at most 512 tenant resources in a tenancy unit.",
"items": {
"$ref": "TenantResource"
},
diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go
index b3b6e4e..31462b4 100644
--- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go
+++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go
@@ -4276,7 +4276,7 @@
Service string `json:"service,omitempty"`
// TenantResources: Resources constituting the tenancy unit.
- // There can be at most 512 tenant resources in a tenancy units.
+ // There can be at most 512 tenant resources in a tenancy unit.
TenantResources []*TenantResource `json:"tenantResources,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json
index b031f43..32fec51 100644
--- a/serviceusage/v1beta1/serviceusage-api.json
+++ b/serviceusage/v1beta1/serviceusage-api.json
@@ -319,7 +319,7 @@
"type": "string"
},
"pageSize": {
- "description": "Requested size of the next page of data.",
+ "description": "Requested size of the next page of data.\nRequested page size cannot exceed 200.\n If not set, the default page size is 50.",
"format": "int32",
"location": "query",
"type": "integer"
@@ -349,7 +349,7 @@
}
}
},
- "revision": "20180303",
+ "revision": "20180308",
"rootUrl": "https://serviceusage.googleapis.com/",
"schemas": {
"Api": {
diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go
index 4257828..f2e1716 100644
--- a/serviceusage/v1beta1/serviceusage-gen.go
+++ b/serviceusage/v1beta1/serviceusage-gen.go
@@ -5500,6 +5500,8 @@
// PageSize sets the optional parameter "pageSize": Requested size of
// the next page of data.
+// Requested page size cannot exceed 200.
+// If not set, the default page size is 50.
func (c *ServicesListCall) PageSize(pageSize int64) *ServicesListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
@@ -5621,7 +5623,7 @@
// "type": "string"
// },
// "pageSize": {
- // "description": "Requested size of the next page of data.",
+ // "description": "Requested size of the next page of data.\nRequested page size cannot exceed 200.\n If not set, the default page size is 50.",
// "format": "int32",
// "location": "query",
// "type": "integer"
diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json
index b4f20c2..6ded698 100644
--- a/spanner/v1/spanner-api.json
+++ b/spanner/v1/spanner-api.json
@@ -1340,7 +1340,7 @@
}
}
},
- "revision": "20180220",
+ "revision": "20180228",
"rootUrl": "https://spanner.googleapis.com/",
"schemas": {
"BeginTransactionRequest": {
@@ -1966,12 +1966,12 @@
"id": "PartitionOptions",
"properties": {
"maxPartitions": {
- "description": "The desired maximum number of partitions to return. For example, this may\nbe set to the number of workers available. The default for this option\nis currently 10,000. The maximum value is currently 200,000. This is only\na hint. The actual number of partitions returned may be smaller or larger\nthan this maximum count request.",
+ "description": "**Note:** This hint is currently ignored by PartitionQuery and\nPartitionRead requests.\n\nThe desired maximum number of partitions to return. For example, this may\nbe set to the number of workers available. The default for this option\nis currently 10,000. The maximum value is currently 200,000. This is only\na hint. The actual number of partitions returned may be smaller or larger\nthan this maximum count request.",
"format": "int64",
"type": "string"
},
"partitionSizeBytes": {
- "description": "The desired data size for each partition generated. The default for this\noption is currently 1 GiB. This is only a hint. The actual size of each\npartition may be smaller or larger than this size request.",
+ "description": "**Note:** This hint is currently ignored by PartitionQuery and\nPartitionRead requests.\n\nThe desired data size for each partition generated. The default for this\noption is currently 1 GiB. This is only a hint. The actual size of each\npartition may be smaller or larger than this size request.",
"format": "int64",
"type": "string"
}
@@ -2522,7 +2522,7 @@
"Encoded as JSON `true` or `false`.",
"Encoded as `string`, in decimal format.",
"Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or\n`\"-Infinity\"`.",
- "Encoded as `string` in RFC 3339 timestamp format. The time zone\nmust be present, and must be `\"Z\"`.\n\nIf the schema has the column option\n`allow_commit_timestamp=true`, the placeholder string\n`\"spanner.commit_timestamp()\"` can be used to instruct the system\nto insert the commit timestamp associated with the transaction\ncommit.",
+ "Encoded as `string` in RFC 3339 timestamp format. The time zone\nmust be present, and must be `\"Z\"`.",
"Encoded as `string` in RFC 3339 date format.",
"Encoded as `string`.",
"Encoded as a base64-encoded `string`, as described in RFC 4648,\nsection 4.",
diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go
index 6129540..806678e 100644
--- a/spanner/v1/spanner-gen.go
+++ b/spanner/v1/spanner-gen.go
@@ -1721,8 +1721,12 @@
// and
// PartitionReadRequest.
type PartitionOptions struct {
- // MaxPartitions: The desired maximum number of partitions to return.
- // For example, this may
+ // MaxPartitions: **Note:** This hint is currently ignored by
+ // PartitionQuery and
+ // PartitionRead requests.
+ //
+ // The desired maximum number of partitions to return. For example,
+ // this may
// be set to the number of workers available. The default for this
// option
// is currently 10,000. The maximum value is currently 200,000. This is
@@ -1732,8 +1736,12 @@
// than this maximum count request.
MaxPartitions int64 `json:"maxPartitions,omitempty,string"`
- // PartitionSizeBytes: The desired data size for each partition
- // generated. The default for this
+ // PartitionSizeBytes: **Note:** This hint is currently ignored by
+ // PartitionQuery and
+ // PartitionRead requests.
+ //
+ // The desired data size for each partition generated. The default for
+ // this
// option is currently 1 GiB. This is only a hint. The actual size of
// each
// partition may be smaller or larger than this size request.
@@ -3309,14 +3317,6 @@
// "TIMESTAMP" - Encoded as `string` in RFC 3339 timestamp format. The
// time zone
// must be present, and must be "Z".
- //
- // If the schema has the column option
- // `allow_commit_timestamp=true`, the placeholder
- // string
- // "spanner.commit_timestamp()" can be used to instruct the system
- // to insert the commit timestamp associated with the
- // transaction
- // commit.
// "DATE" - Encoded as `string` in RFC 3339 date format.
// "STRING" - Encoded as `string`.
// "BYTES" - Encoded as a base64-encoded `string`, as described in RFC
diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json
index 6f4f8fb..117a7ab 100644
--- a/testing/v1/testing-api.json
+++ b/testing/v1/testing-api.json
@@ -281,7 +281,7 @@
}
}
},
- "revision": "20180227",
+ "revision": "20180307",
"rootUrl": "https://testing.googleapis.com/",
"schemas": {
"Account": {
@@ -550,6 +550,10 @@
},
"type": "array"
},
+ "roboScript": {
+ "$ref": "FileReference",
+ "description": "A JSON file with a sequence of actions Robo should perform as a prologue\nfor the crawl.\nOptional"
+ },
"startingIntents": {
"description": "The intents used to launch the app for the crawl.\nIf none are provided, then the main launcher activity is launched.\nIf some are provided, then only those provided are launched (the main\nlauncher activity must be provided explicitly).",
"items": {
@@ -650,6 +654,21 @@
},
"type": "object"
},
+ "Apk": {
+ "description": "An Android package file to install.",
+ "id": "Apk",
+ "properties": {
+ "location": {
+ "$ref": "FileReference",
+ "description": "The path to an APK to be installed on the device before the test begins.\nOptional"
+ },
+ "packageName": {
+ "description": "The java package for the APK to be installed.\nOptional, value is determined by examining the application's manifest.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"ApkDetail": {
"description": "Android application details based on application manifest and apk archive\ncontents",
"id": "ApkDetail",
@@ -790,6 +809,10 @@
"obbFile": {
"$ref": "ObbFile",
"description": "A reference to an opaque binary blob file"
+ },
+ "regularFile": {
+ "$ref": "RegularFile",
+ "description": "A reference to a regular file"
}
},
"type": "object"
@@ -1015,6 +1038,21 @@
},
"type": "object"
},
+ "RegularFile": {
+ "description": "A file or directory to install on the device before the test starts",
+ "id": "RegularFile",
+ "properties": {
+ "content": {
+ "$ref": "FileReference",
+ "description": "Required"
+ },
+ "devicePath": {
+ "description": "Where to put the content on the device. Must be an absolute, whitelisted\npath. If the file exists, it will be replaced.\nThe following device-side directories and any of their subdirectories are\nwhitelisted:\n\u003cp\u003e${EXTERNAL_STORAGE}, or /sdcard\u003c/p\u003e\n\u003cp\u003e${ANDROID_DATA}/local/tmp, or /data/local/tmp\u003c/p\u003e\n\u003cp\u003eSpecifying a path outside of these directory trees is invalid.\n\n\u003cp\u003e The paths /sdcard and /data will be made available and treated as\nimplicit path substitutions. E.g. if /sdcard on a particular device does\nnot map to external storage, the system will replace it with the external\nstorage path prefix for that device and copy the file there.\n\n\u003cp\u003e It is strongly advised to use the \u003ca href=\n\"http://developer.android.com/reference/android/os/Environment.html\"\u003e\nEnvironment API\u003c/a\u003e in app and test code to access files on the device in a\nportable way.\nRequired",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"ResultStorage": {
"description": "Locations where the results of running the test are stored.",
"id": "ResultStorage",
@@ -1332,6 +1370,13 @@
"$ref": "Account",
"description": "The device will be logged in on this account for the duration of the test.\nOptional"
},
+ "additionalApks": {
+ "description": "APKs to install in addition to those being directly tested.\nCurrently capped at 100.\nOptional",
+ "items": {
+ "$ref": "Apk"
+ },
+ "type": "array"
+ },
"directoriesToPull": {
"description": "List of directories on the device to upload to GCS at the end of the test;\nthey must be absolute paths under /sdcard or /data/local/tmp.\nPath names are restricted to characters a-z A-Z 0-9 _ - . + and /\n\nNote: The paths /sdcard and /data will be made available and treated as\nimplicit path substitutions. E.g. if /sdcard on a particular device does\nnot map to external storage, the system will replace it with the external\nstorage path prefix for that device.\n\nOptional",
"items": {
diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go
index e42f23b..58694a8 100644
--- a/testing/v1/testing-gen.go
+++ b/testing/v1/testing-gen.go
@@ -574,6 +574,12 @@
// Optional
RoboDirectives []*RoboDirective `json:"roboDirectives,omitempty"`
+ // RoboScript: A JSON file with a sequence of actions Robo should
+ // perform as a prologue
+ // for the crawl.
+ // Optional
+ RoboScript *FileReference `json:"roboScript,omitempty"`
+
// StartingIntents: The intents used to launch the app for the crawl.
// If none are provided, then the main launcher activity is launched.
// If some are provided, then only those provided are launched (the
@@ -757,6 +763,41 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// Apk: An Android package file to install.
+type Apk struct {
+ // Location: The path to an APK to be installed on the device before the
+ // test begins.
+ // Optional
+ Location *FileReference `json:"location,omitempty"`
+
+ // PackageName: The java package for the APK to be installed.
+ // Optional, value is determined by examining the application's
+ // manifest.
+ PackageName string `json:"packageName,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 *Apk) MarshalJSON() ([]byte, error) {
+ type NoMethod Apk
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ApkDetail: Android application details based on application manifest
// and apk archive
// contents
@@ -1040,6 +1081,9 @@
// ObbFile: A reference to an opaque binary blob file
ObbFile *ObbFile `json:"obbFile,omitempty"`
+ // RegularFile: A reference to a regular file
+ RegularFile *RegularFile `json:"regularFile,omitempty"`
+
// ForceSendFields is a list of field names (e.g. "ObbFile") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
@@ -1549,6 +1593,64 @@
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
+// RegularFile: A file or directory to install on the device before the
+// test starts
+type RegularFile struct {
+ // Content: Required
+ Content *FileReference `json:"content,omitempty"`
+
+ // DevicePath: Where to put the content on the device. Must be an
+ // absolute, whitelisted
+ // path. If the file exists, it will be replaced.
+ // The following device-side directories and any of their subdirectories
+ // are
+ // whitelisted:
+ // <p>${EXTERNAL_STORAGE}, or /sdcard</p>
+ // <p>${ANDROID_DATA}/local/tmp, or /data/local/tmp</p>
+ // <p>Specifying a path outside of these directory trees is
+ // invalid.
+ //
+ // <p> The paths /sdcard and /data will be made available and treated
+ // as
+ // implicit path substitutions. E.g. if /sdcard on a particular device
+ // does
+ // not map to external storage, the system will replace it with the
+ // external
+ // storage path prefix for that device and copy the file there.
+ //
+ // <p> It is strongly advised to use the <a
+ // href=
+ // "http://developer.android.com/reference/android/os/Environment.h
+ // tml">
+ // Environment API</a> in app and test code to access files on the
+ // device in a
+ // portable way.
+ // Required
+ DevicePath string `json:"devicePath,omitempty"`
+
+ // ForceSendFields is a list of field names (e.g. "Content") to
+ // unconditionally include in API requests. By default, fields with
+ // empty values are omitted from API requests. However, any non-pointer,
+ // non-interface field appearing in ForceSendFields will be sent to the
+ // server regardless of whether the field is empty or not. This may be
+ // used to include empty fields in Patch requests.
+ ForceSendFields []string `json:"-"`
+
+ // NullFields is a list of field names (e.g. "Content") to include in
+ // API requests with the JSON null value. By default, fields with empty
+ // values are omitted from API requests. However, any field with an
+ // empty value appearing in NullFields will be sent to the server as
+ // null. It is an error if a field in this list has a non-empty value.
+ // This may be used to include null fields in Patch requests.
+ NullFields []string `json:"-"`
+}
+
+func (s *RegularFile) MarshalJSON() ([]byte, error) {
+ type NoMethod RegularFile
+ raw := NoMethod(*s)
+ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
+}
+
// ResultStorage: Locations where the results of running the test are
// stored.
type ResultStorage struct {
@@ -2108,6 +2210,12 @@
// Optional
Account *Account `json:"account,omitempty"`
+ // AdditionalApks: APKs to install in addition to those being directly
+ // tested.
+ // Currently capped at 100.
+ // Optional
+ AdditionalApks []*Apk `json:"additionalApks,omitempty"`
+
// DirectoriesToPull: List of directories on the device to upload to GCS
// at the end of the test;
// they must be absolute paths under /sdcard or /data/local/tmp.