From 314c94bf4746187588782d36be7c6b81c32d11d8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 10 Mar 2022 07:50:46 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1472) --- alertcenter/v1beta1/alertcenter-api.json | 17 +- alertcenter/v1beta1/alertcenter-gen.go | 33 + api-list.json | 45 + artifactregistry/v1/artifactregistry-api.json | 126 +- artifactregistry/v1/artifactregistry-gen.go | 502 +- .../v1beta1/artifactregistry-api.json | 4 +- .../v1beta1/artifactregistry-gen.go | 5 +- .../v1beta2/artifactregistry-api.json | 4 +- .../v1beta2/artifactregistry-gen.go | 5 +- bigquery/v2/bigquery-api.json | 520 +- bigquery/v2/bigquery-gen.go | 838 ++- .../v3/cloudresourcemanager-api.json | 6 +- .../v3/cloudresourcemanager-gen.go | 10 +- composer/v1/composer-api.json | 16 +- composer/v1/composer-gen.go | 65 +- composer/v1beta1/composer-api.json | 18 +- composer/v1beta1/composer-gen.go | 102 +- compute/v0.alpha/compute-api.json | 47 +- compute/v0.alpha/compute-gen.go | 58 +- dataflow/v1b3/dataflow-api.json | 29 +- dataflow/v1b3/dataflow-gen.go | 33 +- .../v0.alpha/deploymentmanager-api.json | 4 +- .../v2/deploymentmanager-api.json | 4 +- .../v2beta/deploymentmanager-api.json | 4 +- domains/v1/domains-api.json | 4 +- domains/v1/domains-gen.go | 4 +- file/v1beta1/file-api.json | 4 +- file/v1beta1/file-gen.go | 2 +- firestore/v1/firestore-api.json | 97 +- firestore/v1/firestore-gen.go | 326 +- firestore/v1beta1/firestore-api.json | 78 +- firestore/v1beta1/firestore-gen.go | 284 + forms/v1/forms-api.json | 1593 ++++++ forms/v1/forms-gen.go | 3726 +++++++++++++ gmail/v1/gmail-api.json | 16 +- gmail/v1/gmail-gen.go | 27 +- healthcare/v1/healthcare-api.json | 10 +- healthcare/v1/healthcare-gen.go | 27 +- healthcare/v1beta1/healthcare-api.json | 34 +- healthcare/v1beta1/healthcare-gen.go | 76 + jobs/v4/jobs-api.json | 8 +- jobs/v4/jobs-gen.go | 46 +- .../v1alpha1/playdeveloperreporting-api.json | 1453 +++++ .../v1alpha1/playdeveloperreporting-gen.go | 4691 +++++++++++++++++ .../v1beta1/playdeveloperreporting-api.json | 909 ++++ .../v1beta1/playdeveloperreporting-gen.go | 2930 ++++++++++ pubsub/v1/pubsub-api.json | 15 +- pubsub/v1/pubsub-gen.go | 13 +- run/v1/run-api.json | 12 +- run/v1/run-gen.go | 12 +- testing/v1/testing-api.json | 4 +- testing/v1/testing-gen.go | 11 +- 52 files changed, 18030 insertions(+), 877 deletions(-) create mode 100644 forms/v1/forms-api.json create mode 100644 forms/v1/forms-gen.go create mode 100644 playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json create mode 100644 playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go create mode 100644 playdeveloperreporting/v1beta1/playdeveloperreporting-api.json create mode 100644 playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json index 2f4690b08de..92a3be1bcc2 100644 --- a/alertcenter/v1beta1/alertcenter-api.json +++ b/alertcenter/v1beta1/alertcenter-api.json @@ -423,7 +423,7 @@ } } }, - "revision": "20220221", + "revision": "20220307", "rootUrl": "https://alertcenter.googleapis.com/", "schemas": { "AccountSuspensionDetails": { @@ -1275,6 +1275,21 @@ }, "type": "object" }, + "MandatoryServiceAnnouncement": { + "description": "Alert Created by the MSA team for communications necessary for continued use of Google Workspace Products.", + "id": "MandatoryServiceAnnouncement", + "properties": { + "description": { + "description": "Detailed, freeform text describing the announcement", + "type": "string" + }, + "title": { + "description": "One line summary of the announcement", + "type": "string" + } + }, + "type": "object" + }, "MatchInfo": { "description": "Proto that contains match information from the condition part of the rule.", "id": "MatchInfo", diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go index ed96bc774c7..56dbb33efdb 100644 --- a/alertcenter/v1beta1/alertcenter-gen.go +++ b/alertcenter/v1beta1/alertcenter-gen.go @@ -1513,6 +1513,39 @@ func (s *MaliciousEntity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MandatoryServiceAnnouncement: Alert Created by the MSA team for +// communications necessary for continued use of Google Workspace +// Products. +type MandatoryServiceAnnouncement struct { + // Description: Detailed, freeform text describing the announcement + Description string `json:"description,omitempty"` + + // Title: One line summary of the announcement + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *MandatoryServiceAnnouncement) MarshalJSON() ([]byte, error) { + type NoMethod MandatoryServiceAnnouncement + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MatchInfo: Proto that contains match information from the condition // part of the rule. type MatchInfo struct { diff --git a/api-list.json b/api-list.json index ae1e0dc2a0b..e0caed7b66f 100644 --- a/api-list.json +++ b/api-list.json @@ -2721,6 +2721,21 @@ "documentationLink": "https://developers.google.com/fit/rest/v1/get-started", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "forms:v1", + "name": "forms", + "version": "v1", + "title": "Google Forms API", + "description": "Reads and writes Google Forms and responses.", + "discoveryRestUrl": "https://forms.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/forms/api", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "games:v1", @@ -3982,6 +3997,36 @@ "documentationLink": "https://developers.google.com/android/work/play/custom-app-api/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "playdeveloperreporting:v1alpha1", + "name": "playdeveloperreporting", + "version": "v1alpha1", + "title": "Google Play Developer Reporting API", + "description": "", + "discoveryRestUrl": "https://playdeveloperreporting.googleapis.com/$discovery/rest?version=v1alpha1", + "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/play/developer/reporting", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "playdeveloperreporting:v1beta1", + "name": "playdeveloperreporting", + "version": "v1beta1", + "title": "Google Play Developer Reporting API", + "description": "", + "discoveryRestUrl": "https://playdeveloperreporting.googleapis.com/$discovery/rest?version=v1beta1", + "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/play/developer/reporting", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "playintegrity:v1", diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index d503aa10a65..ad737fcdada 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -650,7 +650,7 @@ "type": "string" }, "parent": { - "description": "The name of the parent resource whose files will be listed.", + "description": "The name of the repository whose files will be listed. For example: \"projects/p1/locations/us-central1/repositories/repo1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", "required": true, @@ -668,82 +668,6 @@ } } }, - "gooGetArtifacts": { - "methods": { - "import": { - "description": "Imports GooGet artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/gooGetArtifacts:import", - "httpMethod": "POST", - "id": "artifactregistry.projects.locations.repositories.gooGetArtifacts.import", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The name of the parent resource where the artifacts will be imported.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/gooGetArtifacts:import", - "request": { - "$ref": "ImportGooGetArtifactsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "googetArtifacts": { - "methods": { - "upload": { - "description": "Directly uploads a GooGet artifact. The returned Operation will complete once the resources are uploaded. Package, Version, and File resources are created based on the imported artifact. Imported artifacts that conflict with existing resources are ignored.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/googetArtifacts:create", - "httpMethod": "POST", - "id": "artifactregistry.projects.locations.repositories.googetArtifacts.upload", - "mediaUpload": { - "accept": [ - "*/*" - ], - "protocols": { - "simple": { - "multipart": true, - "path": "/upload/v1/{+parent}/googetArtifacts:create" - } - } - }, - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The name of the parent resource where the artifacts will be uploaded.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/googetArtifacts:create", - "request": { - "$ref": "UploadGooGetArtifactRequest" - }, - "response": { - "$ref": "UploadGooGetArtifactMediaResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "supportsMediaUpload": true - } - } - }, "packages": { "methods": { "delete": { @@ -1213,7 +1137,7 @@ } } }, - "revision": "20220212", + "revision": "20220307", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { @@ -1400,35 +1324,6 @@ }, "type": "object" }, - "ImportGooGetArtifactsGcsSource": { - "description": "Google Cloud Storage location where the artifacts currently reside.", - "id": "ImportGooGetArtifactsGcsSource", - "properties": { - "uris": { - "description": "Cloud Storage paths URI (e.g., gs://my_bucket/my_object).", - "items": { - "type": "string" - }, - "type": "array" - }, - "useWildcards": { - "description": "Supports URI wildcards for matching multiple objects from a single URI.", - "type": "boolean" - } - }, - "type": "object" - }, - "ImportGooGetArtifactsRequest": { - "description": "The request to import new googet artifacts.", - "id": "ImportGooGetArtifactsRequest", - "properties": { - "gcsSource": { - "$ref": "ImportGooGetArtifactsGcsSource", - "description": "Google Cloud Storage location where input content is located." - } - }, - "type": "object" - }, "ImportYumArtifactsGcsSource": { "description": "Google Cloud Storage location where the artifacts currently reside.", "id": "ImportYumArtifactsGcsSource", @@ -1862,23 +1757,6 @@ "properties": {}, "type": "object" }, - "UploadGooGetArtifactMediaResponse": { - "description": "The response to upload an artifact.", - "id": "UploadGooGetArtifactMediaResponse", - "properties": { - "operation": { - "$ref": "Operation", - "description": "Operation to be returned to the user." - } - }, - "type": "object" - }, - "UploadGooGetArtifactRequest": { - "description": "The request to upload an artifact.", - "id": "UploadGooGetArtifactRequest", - "properties": {}, - "type": "object" - }, "UploadYumArtifactMediaResponse": { "description": "The response to upload an artifact.", "id": "UploadYumArtifactMediaResponse", diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 808522e7566..a66411fa5fa 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -187,8 +187,6 @@ func NewProjectsLocationsRepositoriesService(s *Service) *ProjectsLocationsRepos rs.AptArtifacts = NewProjectsLocationsRepositoriesAptArtifactsService(s) rs.DockerImages = NewProjectsLocationsRepositoriesDockerImagesService(s) rs.Files = NewProjectsLocationsRepositoriesFilesService(s) - rs.GooGetArtifacts = NewProjectsLocationsRepositoriesGooGetArtifactsService(s) - rs.GoogetArtifacts = NewProjectsLocationsRepositoriesGoogetArtifactsService(s) rs.Packages = NewProjectsLocationsRepositoriesPackagesService(s) rs.YumArtifacts = NewProjectsLocationsRepositoriesYumArtifactsService(s) return rs @@ -203,10 +201,6 @@ type ProjectsLocationsRepositoriesService struct { Files *ProjectsLocationsRepositoriesFilesService - GooGetArtifacts *ProjectsLocationsRepositoriesGooGetArtifactsService - - GoogetArtifacts *ProjectsLocationsRepositoriesGoogetArtifactsService - Packages *ProjectsLocationsRepositoriesPackagesService YumArtifacts *ProjectsLocationsRepositoriesYumArtifactsService @@ -239,24 +233,6 @@ type ProjectsLocationsRepositoriesFilesService struct { s *Service } -func NewProjectsLocationsRepositoriesGooGetArtifactsService(s *Service) *ProjectsLocationsRepositoriesGooGetArtifactsService { - rs := &ProjectsLocationsRepositoriesGooGetArtifactsService{s: s} - return rs -} - -type ProjectsLocationsRepositoriesGooGetArtifactsService struct { - s *Service -} - -func NewProjectsLocationsRepositoriesGoogetArtifactsService(s *Service) *ProjectsLocationsRepositoriesGoogetArtifactsService { - rs := &ProjectsLocationsRepositoriesGoogetArtifactsService{s: s} - return rs -} - -type ProjectsLocationsRepositoriesGoogetArtifactsService struct { - s *Service -} - func NewProjectsLocationsRepositoriesPackagesService(s *Service) *ProjectsLocationsRepositoriesPackagesService { rs := &ProjectsLocationsRepositoriesPackagesService{s: s} rs.Tags = NewProjectsLocationsRepositoriesPackagesTagsService(s) @@ -663,69 +639,6 @@ func (s *ImportAptArtifactsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ImportGooGetArtifactsGcsSource: Google Cloud Storage location where -// the artifacts currently reside. -type ImportGooGetArtifactsGcsSource struct { - // Uris: Cloud Storage paths URI (e.g., gs://my_bucket/my_object). - Uris []string `json:"uris,omitempty"` - - // UseWildcards: Supports URI wildcards for matching multiple objects - // from a single URI. - UseWildcards bool `json:"useWildcards,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Uris") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Uris") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImportGooGetArtifactsGcsSource) MarshalJSON() ([]byte, error) { - type NoMethod ImportGooGetArtifactsGcsSource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImportGooGetArtifactsRequest: The request to import new googet -// artifacts. -type ImportGooGetArtifactsRequest struct { - // GcsSource: Google Cloud Storage location where input content is - // located. - GcsSource *ImportGooGetArtifactsGcsSource `json:"gcsSource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GcsSource") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GcsSource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImportGooGetArtifactsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ImportGooGetArtifactsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ImportYumArtifactsGcsSource: Google Cloud Storage location where the // artifacts currently reside. type ImportYumArtifactsGcsSource struct { @@ -1604,43 +1517,6 @@ func (s *UploadAptArtifactMediaResponse) MarshalJSON() ([]byte, error) { type UploadAptArtifactRequest struct { } -// UploadGooGetArtifactMediaResponse: The response to upload an -// artifact. -type UploadGooGetArtifactMediaResponse struct { - // Operation: Operation to be returned to the user. - Operation *Operation `json:"operation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Operation") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Operation") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UploadGooGetArtifactMediaResponse) MarshalJSON() ([]byte, error) { - type NoMethod UploadGooGetArtifactMediaResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UploadGooGetArtifactRequest: The request to upload an artifact. -type UploadGooGetArtifactRequest struct { -} - // UploadYumArtifactMediaResponse: The response to upload an artifact. type UploadYumArtifactMediaResponse struct { // Operation: Operation to be returned to the user. @@ -4314,7 +4190,8 @@ type ProjectsLocationsRepositoriesFilesListCall struct { // List: Lists files. // -// - parent: The name of the parent resource whose files will be listed. +// - parent: The name of the repository whose files will be listed. For +// example: "projects/p1/locations/us-central1/repositories/repo1. func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *ProjectsLocationsRepositoriesFilesListCall { c := &ProjectsLocationsRepositoriesFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4485,7 +4362,7 @@ func (c *ProjectsLocationsRepositoriesFilesListCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "parent": { - // "description": "The name of the parent resource whose files will be listed.", + // "description": "The name of the repository whose files will be listed. For example: \"projects/p1/locations/us-central1/repositories/repo1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", // "required": true, @@ -4525,379 +4402,6 @@ func (c *ProjectsLocationsRepositoriesFilesListCall) Pages(ctx context.Context, } } -// method id "artifactregistry.projects.locations.repositories.gooGetArtifacts.import": - -type ProjectsLocationsRepositoriesGooGetArtifactsImportCall struct { - s *Service - parent string - importgoogetartifactsrequest *ImportGooGetArtifactsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Import: Imports GooGet artifacts. The returned Operation will -// complete once the resources are imported. Package, Version, and File -// resources are created based on the imported artifacts. Imported -// artifacts that conflict with existing resources are ignored. -// -// - parent: The name of the parent resource where the artifacts will be -// imported. -func (r *ProjectsLocationsRepositoriesGooGetArtifactsService) Import(parent string, importgoogetartifactsrequest *ImportGooGetArtifactsRequest) *ProjectsLocationsRepositoriesGooGetArtifactsImportCall { - c := &ProjectsLocationsRepositoriesGooGetArtifactsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.importgoogetartifactsrequest = importgoogetartifactsrequest - 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 *ProjectsLocationsRepositoriesGooGetArtifactsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGooGetArtifactsImportCall { - 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 *ProjectsLocationsRepositoriesGooGetArtifactsImportCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGooGetArtifactsImportCall { - 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 *ProjectsLocationsRepositoriesGooGetArtifactsImportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesGooGetArtifactsImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - 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.importgoogetartifactsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gooGetArtifacts:import") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "artifactregistry.projects.locations.repositories.gooGetArtifacts.import" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesGooGetArtifactsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Imports GooGet artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/gooGetArtifacts:import", - // "httpMethod": "POST", - // "id": "artifactregistry.projects.locations.repositories.gooGetArtifacts.import", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The name of the parent resource where the artifacts will be imported.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/gooGetArtifacts:import", - // "request": { - // "$ref": "ImportGooGetArtifactsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "artifactregistry.projects.locations.repositories.googetArtifacts.upload": - -type ProjectsLocationsRepositoriesGoogetArtifactsUploadCall struct { - s *Service - parent string - uploadgoogetartifactrequest *UploadGooGetArtifactRequest - urlParams_ gensupport.URLParams - mediaInfo_ *gensupport.MediaInfo - ctx_ context.Context - header_ http.Header -} - -// Upload: Directly uploads a GooGet artifact. The returned Operation -// will complete once the resources are uploaded. Package, Version, and -// File resources are created based on the imported artifact. Imported -// artifacts that conflict with existing resources are ignored. -// -// - parent: The name of the parent resource where the artifacts will be -// uploaded. -func (r *ProjectsLocationsRepositoriesGoogetArtifactsService) Upload(parent string, uploadgoogetartifactrequest *UploadGooGetArtifactRequest) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall { - c := &ProjectsLocationsRepositoriesGoogetArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.uploadgoogetartifactrequest = uploadgoogetartifactrequest - return c -} - -// Media specifies the media to upload in one or more chunks. The chunk -// size may be controlled by supplying a MediaOption generated by -// googleapi.ChunkSize. The chunk size defaults to -// googleapi.DefaultUploadChunkSize.The Content-Type header used in the -// upload request will be determined by sniffing the contents of r, -// unless a MediaOption generated by googleapi.ContentType is -// supplied. -// At most one of Media and ResumableMedia may be set. -func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall { - c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) - return c -} - -// ResumableMedia specifies the media to upload in chunks and can be -// canceled with ctx. -// -// Deprecated: use Media instead. -// -// At most one of Media and ResumableMedia may be set. mediaType -// identifies the MIME media type of the upload, such as "image/png". If -// mediaType is "", it will be auto-detected. The provided ctx will -// supersede any context previously provided to the Context method. -func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall { - c.ctx_ = ctx - c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) - return c -} - -// ProgressUpdater provides a callback function that will be called -// after every chunk. It should be a low-latency function in order to -// not slow down the upload operation. This should only be called when -// using ResumableMedia (as opposed to Media). -func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall { - c.mediaInfo_.SetProgressUpdater(pu) - 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 *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall { - 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. -// This context will supersede any context previously provided to the -// ResumableMedia method. -func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall { - 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 *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - 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.uploadgoogetartifactrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/googetArtifacts:create") - if c.mediaInfo_ != nil { - urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/googetArtifacts:create") - c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) - } - if body == nil { - body = new(bytes.Buffer) - reqHeaders.Set("Content-Type", "application/json") - } - body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) - defer cleanup() - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - req.GetBody = getBody - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "artifactregistry.projects.locations.repositories.googetArtifacts.upload" call. -// Exactly one of *UploadGooGetArtifactMediaResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *UploadGooGetArtifactMediaResponse.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 *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadGooGetArtifactMediaResponse, 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 - } - rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) - if rx != nil { - rx.Client = c.s.client - rx.UserAgent = c.s.userAgent() - ctx := c.ctx_ - if ctx == nil { - ctx = context.TODO() - } - res, err = rx.Upload(ctx) - if err != nil { - return nil, err - } - defer res.Body.Close() - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - } - ret := &UploadGooGetArtifactMediaResponse{ - 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": "Directly uploads a GooGet artifact. The returned Operation will complete once the resources are uploaded. Package, Version, and File resources are created based on the imported artifact. Imported artifacts that conflict with existing resources are ignored.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/googetArtifacts:create", - // "httpMethod": "POST", - // "id": "artifactregistry.projects.locations.repositories.googetArtifacts.upload", - // "mediaUpload": { - // "accept": [ - // "*/*" - // ], - // "protocols": { - // "simple": { - // "multipart": true, - // "path": "/upload/v1/{+parent}/googetArtifacts:create" - // } - // } - // }, - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The name of the parent resource where the artifacts will be uploaded.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/googetArtifacts:create", - // "request": { - // "$ref": "UploadGooGetArtifactRequest" - // }, - // "response": { - // "$ref": "UploadGooGetArtifactMediaResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ], - // "supportsMediaUpload": true - // } - -} - // method id "artifactregistry.projects.locations.repositories.packages.delete": type ProjectsLocationsRepositoriesPackagesDeleteCall struct { diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index b225c53539d..0797586ba1b 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -514,7 +514,7 @@ "type": "string" }, "parent": { - "description": "The name of the parent resource whose files will be listed.", + "description": "The name of the repository whose files will be listed. For example: \"projects/p1/locations/us-central1/repositories/repo1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", "required": true, @@ -929,7 +929,7 @@ } } }, - "revision": "20220203", + "revision": "20220307", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index ce96e58d8a5..9726272cdef 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -3174,7 +3174,8 @@ type ProjectsLocationsRepositoriesFilesListCall struct { // List: Lists files. // -// - parent: The name of the parent resource whose files will be listed. +// - parent: The name of the repository whose files will be listed. For +// example: "projects/p1/locations/us-central1/repositories/repo1. func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *ProjectsLocationsRepositoriesFilesListCall { c := &ProjectsLocationsRepositoriesFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3333,7 +3334,7 @@ func (c *ProjectsLocationsRepositoriesFilesListCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "parent": { - // "description": "The name of the parent resource whose files will be listed.", + // "description": "The name of the repository whose files will be listed. For example: \"projects/p1/locations/us-central1/repositories/repo1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", // "required": true, diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 4ad29a07529..ee924cbc043 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -648,7 +648,7 @@ "type": "string" }, "parent": { - "description": "The name of the parent resource whose files will be listed.", + "description": "The name of the repository whose files will be listed. For example: \"projects/p1/locations/us-central1/repositories/repo1", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", "required": true, @@ -1135,7 +1135,7 @@ } } }, - "revision": "20220203", + "revision": "20220307", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 53f75219825..bf4113f3001 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -4466,7 +4466,8 @@ type ProjectsLocationsRepositoriesFilesListCall struct { // List: Lists files. // -// - parent: The name of the parent resource whose files will be listed. +// - parent: The name of the repository whose files will be listed. For +// example: "projects/p1/locations/us-central1/repositories/repo1. func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *ProjectsLocationsRepositoriesFilesListCall { c := &ProjectsLocationsRepositoriesFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4625,7 +4626,7 @@ func (c *ProjectsLocationsRepositoriesFilesListCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "parent": { - // "description": "The name of the parent resource whose files will be listed.", + // "description": "The name of the repository whose files will be listed. For example: \"projects/p1/locations/us-central1/repositories/repo1", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", // "required": true, diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index 59d5d77596a..62e610dcc4b 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1693,7 +1693,7 @@ } } }, - "revision": "20220222", + "revision": "20220226", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -2509,6 +2509,21 @@ }, "type": "object" }, + "CloneDefinition": { + "id": "CloneDefinition", + "properties": { + "baseTableReference": { + "$ref": "TableReference", + "description": "[Required] Reference describing the ID of the table that was cloned." + }, + "cloneTime": { + "description": "[Required] The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format.", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, "Cluster": { "description": "Message containing the information about one cluster.", "id": "Cluster", @@ -2670,6 +2685,10 @@ "$ref": "TableReference", "description": "Table reference of the evaluation data after split." }, + "testTable": { + "$ref": "TableReference", + "description": "Table reference of the test data after split." + }, "trainingTable": { "$ref": "TableReference", "description": "Table reference of the training data after split." @@ -2950,6 +2969,18 @@ }, "type": "object" }, + "DimensionalityReductionMetrics": { + "description": "Model evaluation metrics for dimensionality reduction models.", + "id": "DimensionalityReductionMetrics", + "properties": { + "totalExplainedVarianceRatio": { + "description": "Total percentage of variance explained by the selected principal components.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "DmlStatistics": { "id": "DmlStatistics", "properties": { @@ -2971,6 +3002,53 @@ }, "type": "object" }, + "DoubleCandidates": { + "description": "Discrete candidates of a double hyperparameter.", + "id": "DoubleCandidates", + "properties": { + "candidates": { + "description": "Candidates for the double parameter in increasing order.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + "DoubleHparamSearchSpace": { + "description": "Search space for a double hyperparameter.", + "id": "DoubleHparamSearchSpace", + "properties": { + "candidates": { + "$ref": "DoubleCandidates", + "description": "Candidates of the double hyperparameter." + }, + "range": { + "$ref": "DoubleRange", + "description": "Range of the double hyperparameter." + } + }, + "type": "object" + }, + "DoubleRange": { + "description": "Range of a double hyperparameter.", + "id": "DoubleRange", + "properties": { + "max": { + "description": "Max value of the double parameter.", + "format": "double", + "type": "number" + }, + "min": { + "description": "Min value of the double parameter.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "EncryptionConfiguration": { "id": "EncryptionConfiguration", "properties": { @@ -3035,6 +3113,10 @@ "$ref": "ClusteringMetrics", "description": "Populated for clustering models." }, + "dimensionalityReductionMetrics": { + "$ref": "DimensionalityReductionMetrics", + "description": "Evaluation metrics when the model is a dimensionality reduction model, which currently includes PCA." + }, "multiClassClassificationMetrics": { "$ref": "MultiClassClassificationMetrics", "description": "Populated for multi-class classification/classifier models." @@ -3226,6 +3308,22 @@ }, "type": "object" }, + "Explanation": { + "description": "Explanation for a single feature.", + "id": "Explanation", + "properties": { + "attribution": { + "description": "Attribution of feature.", + "format": "double", + "type": "number" + }, + "featureName": { + "description": "Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.", + "type": "string" + } + }, + "type": "object" + }, "Expr": { "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", "id": "Expr", @@ -3444,6 +3542,24 @@ }, "type": "object" }, + "GlobalExplanation": { + "description": "Global explanations containing the top most important features after training.", + "id": "GlobalExplanation", + "properties": { + "classLabel": { + "description": "Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.", + "type": "string" + }, + "explanations": { + "description": "A list of the top global explanations. Sorted by absolute value of attribution in descending order.", + "items": { + "$ref": "Explanation" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleSheetsOptions": { "id": "GoogleSheetsOptions", "properties": { @@ -3477,6 +3593,247 @@ }, "type": "object" }, + "HparamSearchSpaces": { + "description": "Hyperparameter search spaces. These should be a subset of training_options.", + "id": "HparamSearchSpaces", + "properties": { + "activationFn": { + "$ref": "StringHparamSearchSpace", + "description": "Activation functions of neural network models." + }, + "batchSize": { + "$ref": "IntHparamSearchSpace", + "description": "Mini batch sample size." + }, + "boosterType": { + "$ref": "StringHparamSearchSpace", + "description": "Booster type for boosted tree models." + }, + "colsampleBylevel": { + "$ref": "DoubleHparamSearchSpace", + "description": "Subsample ratio of columns for each level for boosted tree models." + }, + "colsampleBynode": { + "$ref": "DoubleHparamSearchSpace", + "description": "Subsample ratio of columns for each node(split) for boosted tree models." + }, + "colsampleBytree": { + "$ref": "DoubleHparamSearchSpace", + "description": "Subsample ratio of columns when constructing each tree for boosted tree models." + }, + "dartNormalizeType": { + "$ref": "StringHparamSearchSpace", + "description": "Dart normalization type for boosted tree models." + }, + "dropout": { + "$ref": "DoubleHparamSearchSpace", + "description": "Dropout probability for dnn model training and boosted tree models using dart booster." + }, + "hiddenUnits": { + "$ref": "IntArrayHparamSearchSpace", + "description": "Hidden units for neural network models." + }, + "l1Reg": { + "$ref": "DoubleHparamSearchSpace", + "description": "L1 regularization coefficient." + }, + "l2Reg": { + "$ref": "DoubleHparamSearchSpace", + "description": "L2 regularization coefficient." + }, + "learnRate": { + "$ref": "DoubleHparamSearchSpace", + "description": "Learning rate of training jobs." + }, + "maxTreeDepth": { + "$ref": "IntHparamSearchSpace", + "description": "Maximum depth of a tree for boosted tree models." + }, + "minSplitLoss": { + "$ref": "DoubleHparamSearchSpace", + "description": "Minimum split loss for boosted tree models." + }, + "minTreeChildWeight": { + "$ref": "IntHparamSearchSpace", + "description": "Minimum sum of instance weight needed in a child for boosted tree models." + }, + "numClusters": { + "$ref": "IntHparamSearchSpace", + "description": "Number of clusters for k-means." + }, + "numFactors": { + "$ref": "IntHparamSearchSpace", + "description": "Number of latent factors to train on." + }, + "numParallelTree": { + "$ref": "IntHparamSearchSpace", + "description": "Number of parallel trees for boosted tree models." + }, + "optimizer": { + "$ref": "StringHparamSearchSpace", + "description": "Optimizer of TF models." + }, + "subsample": { + "$ref": "DoubleHparamSearchSpace", + "description": "Subsample the training data to grow tree to prevent overfitting for boosted tree models." + }, + "treeMethod": { + "$ref": "StringHparamSearchSpace", + "description": "Tree construction algorithm for boosted tree models." + }, + "walsAlpha": { + "$ref": "DoubleHparamSearchSpace", + "description": "Hyperparameter for matrix factoration when implicit feedback type is specified." + } + }, + "type": "object" + }, + "HparamTuningTrial": { + "description": "Training info of a trial in hyperparameter tuning.", + "id": "HparamTuningTrial", + "properties": { + "endTimeMs": { + "description": "Ending time of the trial.", + "format": "int64", + "type": "string" + }, + "errorMessage": { + "description": "Error message for FAILED and INFEASIBLE trial.", + "type": "string" + }, + "evalLoss": { + "description": "Loss computed on the eval data at the end of trial.", + "format": "double", + "type": "number" + }, + "evaluationMetrics": { + "$ref": "EvaluationMetrics", + "description": "Evaluation metrics of this trial calculated on the test data. Empty in Job API." + }, + "hparamTuningEvaluationMetrics": { + "$ref": "EvaluationMetrics", + "description": "Hyperparameter tuning evaluation metrics of this trial calculated on the eval data. Unlike evaluation_metrics, only the fields corresponding to the hparam_tuning_objectives are set." + }, + "hparams": { + "$ref": "TrainingOptions", + "description": "The hyperprameters selected for this trial." + }, + "startTimeMs": { + "description": "Starting time of the trial.", + "format": "int64", + "type": "string" + }, + "status": { + "description": "The status of the trial.", + "enum": [ + "TRIAL_STATUS_UNSPECIFIED", + "NOT_STARTED", + "RUNNING", + "SUCCEEDED", + "FAILED", + "INFEASIBLE", + "STOPPED_EARLY" + ], + "enumDescriptions": [ + "", + "Scheduled but not started.", + "Running state.", + "The trial succeeded.", + "The trial failed.", + "The trial is infeasible due to the invalid params.", + "Trial stopped early because it's not promising." + ], + "type": "string" + }, + "trainingLoss": { + "description": "Loss computed on the training data at the end of trial.", + "format": "double", + "type": "number" + }, + "trialId": { + "description": "1-based index of the trial.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "IntArray": { + "description": "An array of int.", + "id": "IntArray", + "properties": { + "elements": { + "description": "Elements in the int array.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "IntArrayHparamSearchSpace": { + "description": "Search space for int array.", + "id": "IntArrayHparamSearchSpace", + "properties": { + "candidates": { + "description": "Candidates for the int array parameter.", + "items": { + "$ref": "IntArray" + }, + "type": "array" + } + }, + "type": "object" + }, + "IntCandidates": { + "description": "Discrete candidates of an int hyperparameter.", + "id": "IntCandidates", + "properties": { + "candidates": { + "description": "Candidates for the int parameter in increasing order.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "IntHparamSearchSpace": { + "description": "Search space for an int hyperparameter.", + "id": "IntHparamSearchSpace", + "properties": { + "candidates": { + "$ref": "IntCandidates", + "description": "Candidates of the int hyperparameter." + }, + "range": { + "$ref": "IntRange", + "description": "Range of the int hyperparameter." + } + }, + "type": "object" + }, + "IntRange": { + "description": "Range of an int hyperparameter.", + "id": "IntRange", + "properties": { + "max": { + "description": "Max value of the int parameter.", + "format": "int64", + "type": "string" + }, + "min": { + "description": "Min value of the int parameter.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "IterationResult": { "id": "IterationResult", "properties": { @@ -4527,6 +4884,12 @@ "readOnly": true, "type": "string" }, + "defaultTrialId": { + "description": "Output only. The default trial_id to use in TVFs when the trial_id is not passed in. For single-objective hyperparameter tuning, this is the best trial id. For multi-objective hyperparameter tuning, this is the smallest trial id among all Pareto optimal trials.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "description": { "description": "Optional. A user-friendly description of this model.", "type": "string" @@ -4557,6 +4920,19 @@ "description": "Optional. A descriptive name for this model.", "type": "string" }, + "hparamSearchSpaces": { + "$ref": "HparamSearchSpaces", + "description": "Output only. All hyperparameter search spaces in this model.", + "readOnly": true + }, + "hparamTrials": { + "description": "Output only. Trials of a hyperparameter tuning model sorted by trial_id.", + "items": { + "$ref": "HparamTuningTrial" + }, + "readOnly": true, + "type": "array" + }, "labelColumns": { "description": "Output only. Label columns that were used to train this model. The output of the model will have a \"predicted_\" prefix to these columns.", "items": { @@ -4603,6 +4979,8 @@ "ARIMA", "AUTOML_REGRESSOR", "AUTOML_CLASSIFIER", + "PCA", + "AUTOENCODER", "ARIMA_PLUS" ], "enumDescriptions": [ @@ -4619,11 +4997,22 @@ "ARIMA model.", "AutoML Tables regression model.", "AutoML Tables classification model.", + "Prinpical Component Analysis model.", + "Autoencoder model.", "New name for the ARIMA model." ], "readOnly": true, "type": "string" }, + "optimalTrialIds": { + "description": "Output only. For single-objective hyperparameter tuning, it only contains the best trial. For multi-objective hyperparameter tuning, it contains all Pareto optimal trials sorted by trial_id.", + "items": { + "format": "int64", + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "trainingRuns": { "description": "Output only. Information for all training runs in increasing order of start_time.", "items": { @@ -4747,6 +5136,33 @@ }, "type": "object" }, + "PrincipalComponentInfo": { + "description": "Principal component infos, used only for eigen decomposition based models, e.g., PCA. Ordered by explained_variance in the descending order.", + "id": "PrincipalComponentInfo", + "properties": { + "cumulativeExplainedVarianceRatio": { + "description": "The explained_variance is pre-ordered in the descending order to compute the cumulative explained variance ratio.", + "format": "double", + "type": "number" + }, + "explainedVariance": { + "description": "Explained variance by this principal component, which is simply the eigenvalue.", + "format": "double", + "type": "number" + }, + "explainedVarianceRatio": { + "description": "Explained_variance over the total explained variance.", + "format": "double", + "type": "number" + }, + "principalComponentId": { + "description": "Id of the principal component.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "ProjectList": { "id": "ProjectList", "properties": { @@ -5589,9 +6005,27 @@ }, "type": "object" }, + "StringHparamSearchSpace": { + "description": "Search space for string and enum.", + "id": "StringHparamSearchSpace", + "properties": { + "candidates": { + "description": "Canididates for the string or enum parameter in lower case.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Table": { "id": "Table", "properties": { + "cloneDefinition": { + "$ref": "CloneDefinition", + "description": "[Output-only] Clone definition." + }, "clustering": { "$ref": "Clustering", "description": "[Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered." @@ -6150,6 +6584,10 @@ ], "type": "string" }, + "calculatePValues": { + "description": "Whether or not p-value test should be computed for this model. Only available for linear and logistic regression models.", + "type": "boolean" + }, "cleanSpikesAndDips": { "description": "If true, clean spikes and dips in the input time series.", "type": "boolean" @@ -6265,6 +6703,10 @@ "description": "Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.", "type": "boolean" }, + "enableGlobalExplain": { + "description": "If true, enable global explanation during training.", + "type": "boolean" + }, "feedbackType": { "description": "Feedback type that specifies which algorithm to run for matrix factorization.", "enum": [ @@ -6438,6 +6880,51 @@ "format": "int64", "type": "string" }, + "hparamTuningObjectives": { + "description": "The target evaluation metrics to optimize the hyperparameters for.", + "items": { + "enum": [ + "HPARAM_TUNING_OBJECTIVE_UNSPECIFIED", + "MEAN_ABSOLUTE_ERROR", + "MEAN_SQUARED_ERROR", + "MEAN_SQUARED_LOG_ERROR", + "MEDIAN_ABSOLUTE_ERROR", + "R_SQUARED", + "EXPLAINED_VARIANCE", + "PRECISION", + "RECALL", + "ACCURACY", + "F1_SCORE", + "LOG_LOSS", + "ROC_AUC", + "DAVIES_BOULDIN_INDEX", + "MEAN_AVERAGE_PRECISION", + "NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN", + "AVERAGE_RANK" + ], + "enumDescriptions": [ + "Unspecified evaluation metric.", + "Mean absolute error. mean_absolute_error = AVG(ABS(label - predicted))", + "Mean squared error. mean_squared_error = AVG(POW(label - predicted, 2))", + "Mean squared log error. mean_squared_log_error = AVG(POW(LN(1 + label) - LN(1 + predicted), 2))", + "Mean absolute error. median_absolute_error = APPROX_QUANTILES(absolute_error, 2)[OFFSET(1)]", + "R^2 score. This corresponds to r2_score in ML.EVALUATE. r_squared = 1 - SUM(squared_error)/(COUNT(label)*VAR_POP(label))", + "Explained variance. explained_variance = 1 - VAR_POP(label_error)/VAR_POP(label)", + "Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.", + "Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.", + "Accuracy is the fraction of predictions given the correct label. For multiclass this is a globally micro-averaged metric.", + "The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.", + "Logorithmic Loss. For multiclass this is a macro-averaged metric.", + "Area Under an ROC Curve. For multiclass this is a macro-averaged metric.", + "Davies-Bouldin Index.", + "Mean Average Precision.", + "Normalized Discounted Cumulative Gain.", + "Average Rank." + ], + "type": "string" + }, + "type": "array" + }, "includeDrift": { "description": "Include drift when fitting an ARIMA model.", "type": "boolean" @@ -6454,6 +6941,11 @@ }, "type": "array" }, + "integratedGradientsNumSteps": { + "description": "Number of integral steps for the integrated gradients explain method.", + "format": "int64", + "type": "string" + }, "itemColumn": { "description": "Item column specified for matrix factorization models.", "type": "string" @@ -6534,6 +7026,11 @@ "format": "int64", "type": "string" }, + "maxParallelTrials": { + "description": "Maximum number of trials to run in parallel.", + "format": "int64", + "type": "string" + }, "maxTreeDepth": { "description": "Maximum depth of a tree for boosted tree models.", "format": "int64", @@ -6577,6 +7074,11 @@ "format": "int64", "type": "string" }, + "numTrials": { + "description": "Number of trials to run this hyperparameter tuning job.", + "format": "int64", + "type": "string" + }, "optimizationStrategy": { "description": "Optimization strategy for training linear regression models.", "enum": [ @@ -6595,6 +7097,11 @@ "description": "Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.", "type": "boolean" }, + "sampledShapleyNumPaths": { + "description": "Number of paths for the sampled shapley explain method.", + "format": "int64", + "type": "string" + }, "subsample": { "description": "Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.", "format": "double", @@ -6657,6 +7164,13 @@ "description": "Information about a single training query run for the model.", "id": "TrainingRun", "properties": { + "classLevelGlobalExplanations": { + "description": "Global explanation contains the explanation of top features on the class level. Applies to classification models only.", + "items": { + "$ref": "GlobalExplanation" + }, + "type": "array" + }, "dataSplitResult": { "$ref": "DataSplitResult", "description": "Data split result of the training run. Only set when the input data is actually split." @@ -6665,6 +7179,10 @@ "$ref": "EvaluationMetrics", "description": "The evaluation metrics over training/eval data that were computed at the end of training." }, + "modelLevelGlobalExplanation": { + "$ref": "GlobalExplanation", + "description": "Global explanation contains the explanation of top features on the model level. Applies to both regression and classification models." + }, "results": { "description": "Output of each iteration run, results.size() \u003c= max_iterations.", "items": { diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 30c3859e1b4..9b6a782904d 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -1641,6 +1641,39 @@ func (s *CategoryCount) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type CloneDefinition struct { + // BaseTableReference: [Required] Reference describing the ID of the + // table that was cloned. + BaseTableReference *TableReference `json:"baseTableReference,omitempty"` + + // CloneTime: [Required] The time at which the base table was cloned. + // This value is reported in the JSON response using RFC3339 format. + CloneTime string `json:"cloneTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BaseTableReference") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BaseTableReference") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CloneDefinition) MarshalJSON() ([]byte, error) { + type NoMethod CloneDefinition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Cluster: Message containing the information about one cluster. type Cluster struct { // CentroidId: Centroid id. @@ -1974,6 +2007,9 @@ type DataSplitResult struct { // EvaluationTable: Table reference of the evaluation data after split. EvaluationTable *TableReference `json:"evaluationTable,omitempty"` + // TestTable: Table reference of the test data after split. + TestTable *TableReference `json:"testTable,omitempty"` + // TrainingTable: Table reference of the training data after split. TrainingTable *TableReference `json:"trainingTable,omitempty"` @@ -2446,6 +2482,52 @@ func (s *DestinationTableProperties) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DimensionalityReductionMetrics: Model evaluation metrics for +// dimensionality reduction models. +type DimensionalityReductionMetrics struct { + // TotalExplainedVarianceRatio: Total percentage of variance explained + // by the selected principal components. + TotalExplainedVarianceRatio float64 `json:"totalExplainedVarianceRatio,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "TotalExplainedVarianceRatio") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "TotalExplainedVarianceRatio") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DimensionalityReductionMetrics) MarshalJSON() ([]byte, error) { + type NoMethod DimensionalityReductionMetrics + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *DimensionalityReductionMetrics) UnmarshalJSON(data []byte) error { + type NoMethod DimensionalityReductionMetrics + var s1 struct { + TotalExplainedVarianceRatio gensupport.JSONFloat64 `json:"totalExplainedVarianceRatio"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.TotalExplainedVarianceRatio = float64(s1.TotalExplainedVarianceRatio) + return nil +} + type DmlStatistics struct { // DeletedRowCount: Number of deleted Rows. populated by DML DELETE, // MERGE and TRUNCATE statements. @@ -2483,6 +2565,112 @@ func (s *DmlStatistics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DoubleCandidates: Discrete candidates of a double hyperparameter. +type DoubleCandidates struct { + // Candidates: Candidates for the double parameter in increasing order. + Candidates []float64 `json:"candidates,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Candidates") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DoubleCandidates) MarshalJSON() ([]byte, error) { + type NoMethod DoubleCandidates + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DoubleHparamSearchSpace: Search space for a double hyperparameter. +type DoubleHparamSearchSpace struct { + // Candidates: Candidates of the double hyperparameter. + Candidates *DoubleCandidates `json:"candidates,omitempty"` + + // Range: Range of the double hyperparameter. + Range *DoubleRange `json:"range,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Candidates") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DoubleHparamSearchSpace) MarshalJSON() ([]byte, error) { + type NoMethod DoubleHparamSearchSpace + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DoubleRange: Range of a double hyperparameter. +type DoubleRange struct { + // Max: Max value of the double parameter. + Max float64 `json:"max,omitempty"` + + // Min: Min value of the double parameter. + Min float64 `json:"min,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Max") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *DoubleRange) MarshalJSON() ([]byte, error) { + type NoMethod DoubleRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *DoubleRange) UnmarshalJSON(data []byte) error { + type NoMethod DoubleRange + var s1 struct { + Max gensupport.JSONFloat64 `json:"max"` + Min gensupport.JSONFloat64 `json:"min"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Max = float64(s1.Max) + s.Min = float64(s1.Min) + return nil +} + type EncryptionConfiguration struct { // KmsKeyName: [Optional] Describes the Cloud KMS encryption key that // will be used to protect destination BigQuery table. The BigQuery @@ -2598,6 +2786,10 @@ type EvaluationMetrics struct { // ClusteringMetrics: Populated for clustering models. ClusteringMetrics *ClusteringMetrics `json:"clusteringMetrics,omitempty"` + // DimensionalityReductionMetrics: Evaluation metrics when the model is + // a dimensionality reduction model, which currently includes PCA. + DimensionalityReductionMetrics *DimensionalityReductionMetrics `json:"dimensionalityReductionMetrics,omitempty"` + // MultiClassClassificationMetrics: Populated for multi-class // classification/classifier models. MultiClassClassificationMetrics *MultiClassClassificationMetrics `json:"multiClassClassificationMetrics,omitempty"` @@ -2823,6 +3015,53 @@ func (s *ExplainQueryStep) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Explanation: Explanation for a single feature. +type Explanation struct { + // Attribution: Attribution of feature. + Attribution float64 `json:"attribution,omitempty"` + + // FeatureName: Full name of the feature. For non-numerical features, + // will be formatted like .. Overall size of feature name will always be + // truncated to first 120 characters. + FeatureName string `json:"featureName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attribution") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attribution") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Explanation) MarshalJSON() ([]byte, error) { + type NoMethod Explanation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *Explanation) UnmarshalJSON(data []byte) error { + type NoMethod Explanation + var s1 struct { + Attribution gensupport.JSONFloat64 `json:"attribution"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Attribution = float64(s1.Attribution) + return nil +} + // Expr: Represents a textual expression in the Common Expression // Language (CEL) syntax. CEL is a C-like expression language. The // syntax and semantics of CEL are documented at @@ -3250,6 +3489,41 @@ func (s *GetServiceAccountResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GlobalExplanation: Global explanations containing the top most +// important features after training. +type GlobalExplanation struct { + // ClassLabel: Class label for this set of global explanations. Will be + // empty/null for binary logistic and linear regression models. Sorted + // alphabetically in descending order. + ClassLabel string `json:"classLabel,omitempty"` + + // Explanations: A list of the top global explanations. Sorted by + // absolute value of attribution in descending order. + Explanations []*Explanation `json:"explanations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClassLabel") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClassLabel") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GlobalExplanation) MarshalJSON() ([]byte, error) { + type NoMethod GlobalExplanation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type GoogleSheetsOptions struct { // Range: [Optional] Range of a sheet to query from. Only used when // non-empty. Typical format: @@ -3350,6 +3624,335 @@ func (s *HivePartitioningOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HparamSearchSpaces: Hyperparameter search spaces. These should be a +// subset of training_options. +type HparamSearchSpaces struct { + // ActivationFn: Activation functions of neural network models. + ActivationFn *StringHparamSearchSpace `json:"activationFn,omitempty"` + + // BatchSize: Mini batch sample size. + BatchSize *IntHparamSearchSpace `json:"batchSize,omitempty"` + + // BoosterType: Booster type for boosted tree models. + BoosterType *StringHparamSearchSpace `json:"boosterType,omitempty"` + + // ColsampleBylevel: Subsample ratio of columns for each level for + // boosted tree models. + ColsampleBylevel *DoubleHparamSearchSpace `json:"colsampleBylevel,omitempty"` + + // ColsampleBynode: Subsample ratio of columns for each node(split) for + // boosted tree models. + ColsampleBynode *DoubleHparamSearchSpace `json:"colsampleBynode,omitempty"` + + // ColsampleBytree: Subsample ratio of columns when constructing each + // tree for boosted tree models. + ColsampleBytree *DoubleHparamSearchSpace `json:"colsampleBytree,omitempty"` + + // DartNormalizeType: Dart normalization type for boosted tree models. + DartNormalizeType *StringHparamSearchSpace `json:"dartNormalizeType,omitempty"` + + // Dropout: Dropout probability for dnn model training and boosted tree + // models using dart booster. + Dropout *DoubleHparamSearchSpace `json:"dropout,omitempty"` + + // HiddenUnits: Hidden units for neural network models. + HiddenUnits *IntArrayHparamSearchSpace `json:"hiddenUnits,omitempty"` + + // L1Reg: L1 regularization coefficient. + L1Reg *DoubleHparamSearchSpace `json:"l1Reg,omitempty"` + + // L2Reg: L2 regularization coefficient. + L2Reg *DoubleHparamSearchSpace `json:"l2Reg,omitempty"` + + // LearnRate: Learning rate of training jobs. + LearnRate *DoubleHparamSearchSpace `json:"learnRate,omitempty"` + + // MaxTreeDepth: Maximum depth of a tree for boosted tree models. + MaxTreeDepth *IntHparamSearchSpace `json:"maxTreeDepth,omitempty"` + + // MinSplitLoss: Minimum split loss for boosted tree models. + MinSplitLoss *DoubleHparamSearchSpace `json:"minSplitLoss,omitempty"` + + // MinTreeChildWeight: Minimum sum of instance weight needed in a child + // for boosted tree models. + MinTreeChildWeight *IntHparamSearchSpace `json:"minTreeChildWeight,omitempty"` + + // NumClusters: Number of clusters for k-means. + NumClusters *IntHparamSearchSpace `json:"numClusters,omitempty"` + + // NumFactors: Number of latent factors to train on. + NumFactors *IntHparamSearchSpace `json:"numFactors,omitempty"` + + // NumParallelTree: Number of parallel trees for boosted tree models. + NumParallelTree *IntHparamSearchSpace `json:"numParallelTree,omitempty"` + + // Optimizer: Optimizer of TF models. + Optimizer *StringHparamSearchSpace `json:"optimizer,omitempty"` + + // Subsample: Subsample the training data to grow tree to prevent + // overfitting for boosted tree models. + Subsample *DoubleHparamSearchSpace `json:"subsample,omitempty"` + + // TreeMethod: Tree construction algorithm for boosted tree models. + TreeMethod *StringHparamSearchSpace `json:"treeMethod,omitempty"` + + // WalsAlpha: Hyperparameter for matrix factoration when implicit + // feedback type is specified. + WalsAlpha *DoubleHparamSearchSpace `json:"walsAlpha,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActivationFn") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActivationFn") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HparamSearchSpaces) MarshalJSON() ([]byte, error) { + type NoMethod HparamSearchSpaces + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HparamTuningTrial: Training info of a trial in hyperparameter tuning. +type HparamTuningTrial struct { + // EndTimeMs: Ending time of the trial. + EndTimeMs int64 `json:"endTimeMs,omitempty,string"` + + // ErrorMessage: Error message for FAILED and INFEASIBLE trial. + ErrorMessage string `json:"errorMessage,omitempty"` + + // EvalLoss: Loss computed on the eval data at the end of trial. + EvalLoss float64 `json:"evalLoss,omitempty"` + + // EvaluationMetrics: Evaluation metrics of this trial calculated on the + // test data. Empty in Job API. + EvaluationMetrics *EvaluationMetrics `json:"evaluationMetrics,omitempty"` + + // HparamTuningEvaluationMetrics: Hyperparameter tuning evaluation + // metrics of this trial calculated on the eval data. Unlike + // evaluation_metrics, only the fields corresponding to the + // hparam_tuning_objectives are set. + HparamTuningEvaluationMetrics *EvaluationMetrics `json:"hparamTuningEvaluationMetrics,omitempty"` + + // Hparams: The hyperprameters selected for this trial. + Hparams *TrainingOptions `json:"hparams,omitempty"` + + // StartTimeMs: Starting time of the trial. + StartTimeMs int64 `json:"startTimeMs,omitempty,string"` + + // Status: The status of the trial. + // + // Possible values: + // "TRIAL_STATUS_UNSPECIFIED" + // "NOT_STARTED" - Scheduled but not started. + // "RUNNING" - Running state. + // "SUCCEEDED" - The trial succeeded. + // "FAILED" - The trial failed. + // "INFEASIBLE" - The trial is infeasible due to the invalid params. + // "STOPPED_EARLY" - Trial stopped early because it's not promising. + Status string `json:"status,omitempty"` + + // TrainingLoss: Loss computed on the training data at the end of trial. + TrainingLoss float64 `json:"trainingLoss,omitempty"` + + // TrialId: 1-based index of the trial. + TrialId int64 `json:"trialId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EndTimeMs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTimeMs") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HparamTuningTrial) MarshalJSON() ([]byte, error) { + type NoMethod HparamTuningTrial + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *HparamTuningTrial) UnmarshalJSON(data []byte) error { + type NoMethod HparamTuningTrial + var s1 struct { + EvalLoss gensupport.JSONFloat64 `json:"evalLoss"` + TrainingLoss gensupport.JSONFloat64 `json:"trainingLoss"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.EvalLoss = float64(s1.EvalLoss) + s.TrainingLoss = float64(s1.TrainingLoss) + return nil +} + +// IntArray: An array of int. +type IntArray struct { + // Elements: Elements in the int array. + Elements googleapi.Int64s `json:"elements,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Elements") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Elements") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IntArray) MarshalJSON() ([]byte, error) { + type NoMethod IntArray + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntArrayHparamSearchSpace: Search space for int array. +type IntArrayHparamSearchSpace struct { + // Candidates: Candidates for the int array parameter. + Candidates []*IntArray `json:"candidates,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Candidates") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IntArrayHparamSearchSpace) MarshalJSON() ([]byte, error) { + type NoMethod IntArrayHparamSearchSpace + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntCandidates: Discrete candidates of an int hyperparameter. +type IntCandidates struct { + // Candidates: Candidates for the int parameter in increasing order. + Candidates googleapi.Int64s `json:"candidates,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Candidates") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IntCandidates) MarshalJSON() ([]byte, error) { + type NoMethod IntCandidates + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntHparamSearchSpace: Search space for an int hyperparameter. +type IntHparamSearchSpace struct { + // Candidates: Candidates of the int hyperparameter. + Candidates *IntCandidates `json:"candidates,omitempty"` + + // Range: Range of the int hyperparameter. + Range *IntRange `json:"range,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Candidates") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IntHparamSearchSpace) MarshalJSON() ([]byte, error) { + type NoMethod IntHparamSearchSpace + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntRange: Range of an int hyperparameter. +type IntRange struct { + // Max: Max value of the int parameter. + Max int64 `json:"max,omitempty,string"` + + // Min: Min value of the int parameter. + Min int64 `json:"min,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Max") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *IntRange) MarshalJSON() ([]byte, error) { + type NoMethod IntRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type IterationResult struct { // DurationMs: Time taken to run the iteration in milliseconds. DurationMs int64 `json:"durationMs,omitempty,string"` @@ -4946,6 +5549,13 @@ type Model struct { // millisecs since the epoch. CreationTime int64 `json:"creationTime,omitempty,string"` + // DefaultTrialId: Output only. The default trial_id to use in TVFs when + // the trial_id is not passed in. For single-objective hyperparameter + // tuning, this is the best trial id. For multi-objective hyperparameter + // tuning, this is the smallest trial id among all Pareto optimal + // trials. + DefaultTrialId int64 `json:"defaultTrialId,omitempty,string"` + // Description: Optional. A user-friendly description of this model. Description string `json:"description,omitempty"` @@ -4973,6 +5583,14 @@ type Model struct { // FriendlyName: Optional. A descriptive name for this model. FriendlyName string `json:"friendlyName,omitempty"` + // HparamSearchSpaces: Output only. All hyperparameter search spaces in + // this model. + HparamSearchSpaces *HparamSearchSpaces `json:"hparamSearchSpaces,omitempty"` + + // HparamTrials: Output only. Trials of a hyperparameter tuning model + // sorted by trial_id. + HparamTrials []*HparamTuningTrial `json:"hparamTrials,omitempty"` + // LabelColumns: Output only. Label columns that were used to train this // model. The output of the model will have a "predicted_" prefix to // these columns. @@ -5014,9 +5632,17 @@ type Model struct { // "ARIMA" - ARIMA model. // "AUTOML_REGRESSOR" - AutoML Tables regression model. // "AUTOML_CLASSIFIER" - AutoML Tables classification model. + // "PCA" - Prinpical Component Analysis model. + // "AUTOENCODER" - Autoencoder model. // "ARIMA_PLUS" - New name for the ARIMA model. ModelType string `json:"modelType,omitempty"` + // OptimalTrialIds: Output only. For single-objective hyperparameter + // tuning, it only contains the best trial. For multi-objective + // hyperparameter tuning, it contains all Pareto optimal trials sorted + // by trial_id. + OptimalTrialIds googleapi.Int64s `json:"optimalTrialIds,omitempty"` + // TrainingRuns: Output only. Information for all training runs in // increasing order of start_time. TrainingRuns []*TrainingRun `json:"trainingRuns,omitempty"` @@ -5330,6 +5956,69 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PrincipalComponentInfo: Principal component infos, used only for +// eigen decomposition based models, e.g., PCA. Ordered by +// explained_variance in the descending order. +type PrincipalComponentInfo struct { + // CumulativeExplainedVarianceRatio: The explained_variance is + // pre-ordered in the descending order to compute the cumulative + // explained variance ratio. + CumulativeExplainedVarianceRatio float64 `json:"cumulativeExplainedVarianceRatio,omitempty"` + + // ExplainedVariance: Explained variance by this principal component, + // which is simply the eigenvalue. + ExplainedVariance float64 `json:"explainedVariance,omitempty"` + + // ExplainedVarianceRatio: Explained_variance over the total explained + // variance. + ExplainedVarianceRatio float64 `json:"explainedVarianceRatio,omitempty"` + + // PrincipalComponentId: Id of the principal component. + PrincipalComponentId int64 `json:"principalComponentId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "CumulativeExplainedVarianceRatio") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "CumulativeExplainedVarianceRatio") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PrincipalComponentInfo) MarshalJSON() ([]byte, error) { + type NoMethod PrincipalComponentInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PrincipalComponentInfo) UnmarshalJSON(data []byte) error { + type NoMethod PrincipalComponentInfo + var s1 struct { + CumulativeExplainedVarianceRatio gensupport.JSONFloat64 `json:"cumulativeExplainedVarianceRatio"` + ExplainedVariance gensupport.JSONFloat64 `json:"explainedVariance"` + ExplainedVarianceRatio gensupport.JSONFloat64 `json:"explainedVarianceRatio"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CumulativeExplainedVarianceRatio = float64(s1.CumulativeExplainedVarianceRatio) + s.ExplainedVariance = float64(s1.ExplainedVariance) + s.ExplainedVarianceRatio = float64(s1.ExplainedVarianceRatio) + return nil +} + type ProjectList struct { // Etag: A hash of the page of results Etag string `json:"etag,omitempty"` @@ -6737,7 +7426,39 @@ func (s *Streamingbuffer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StringHparamSearchSpace: Search space for string and enum. +type StringHparamSearchSpace struct { + // Candidates: Canididates for the string or enum parameter in lower + // case. + Candidates []string `json:"candidates,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Candidates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Candidates") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StringHparamSearchSpace) MarshalJSON() ([]byte, error) { + type NoMethod StringHparamSearchSpace + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Table struct { + // CloneDefinition: [Output-only] Clone definition. + CloneDefinition *CloneDefinition `json:"cloneDefinition,omitempty"` + // Clustering: [Beta] Clustering specification for the table. Must be // specified with partitioning, data in the table will be first // partitioned and subsequently clustered. @@ -6878,7 +7599,7 @@ type Table struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Clustering") to + // ForceSendFields is a list of field names (e.g. "CloneDefinition") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6886,12 +7607,13 @@ type Table struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Clustering") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CloneDefinition") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -7636,6 +8358,10 @@ type TrainingOptions struct { // "DART" - Dart booster. BoosterType string `json:"boosterType,omitempty"` + // CalculatePValues: Whether or not p-value test should be computed for + // this model. Only available for linear and logistic regression models. + CalculatePValues bool `json:"calculatePValues,omitempty"` + // CleanSpikesAndDips: If true, clean spikes and dips in the input time // series. CleanSpikesAndDips bool `json:"cleanSpikesAndDips,omitempty"` @@ -7726,6 +8452,10 @@ type TrainingOptions struct { // for iterative training algorithms. EarlyStop bool `json:"earlyStop,omitempty"` + // EnableGlobalExplain: If true, enable global explanation during + // training. + EnableGlobalExplain bool `json:"enableGlobalExplain,omitempty"` + // FeedbackType: Feedback type that specifies which algorithm to run for // matrix factorization. // @@ -7818,6 +8548,49 @@ type TrainingOptions struct { // Horizon: The number of periods ahead that need to be forecasted. Horizon int64 `json:"horizon,omitempty,string"` + // HparamTuningObjectives: The target evaluation metrics to optimize the + // hyperparameters for. + // + // Possible values: + // "HPARAM_TUNING_OBJECTIVE_UNSPECIFIED" - Unspecified evaluation + // metric. + // "MEAN_ABSOLUTE_ERROR" - Mean absolute error. mean_absolute_error = + // AVG(ABS(label - predicted)) + // "MEAN_SQUARED_ERROR" - Mean squared error. mean_squared_error = + // AVG(POW(label - predicted, 2)) + // "MEAN_SQUARED_LOG_ERROR" - Mean squared log error. + // mean_squared_log_error = AVG(POW(LN(1 + label) - LN(1 + predicted), + // 2)) + // "MEDIAN_ABSOLUTE_ERROR" - Mean absolute error. + // median_absolute_error = APPROX_QUANTILES(absolute_error, + // 2)[OFFSET(1)] + // "R_SQUARED" - R^2 score. This corresponds to r2_score in + // ML.EVALUATE. r_squared = 1 - + // SUM(squared_error)/(COUNT(label)*VAR_POP(label)) + // "EXPLAINED_VARIANCE" - Explained variance. explained_variance = 1 - + // VAR_POP(label_error)/VAR_POP(label) + // "PRECISION" - Precision is the fraction of actual positive + // predictions that had positive actual labels. For multiclass this is a + // macro-averaged metric treating each class as a binary classifier. + // "RECALL" - Recall is the fraction of actual positive labels that + // were given a positive prediction. For multiclass this is a + // macro-averaged metric. + // "ACCURACY" - Accuracy is the fraction of predictions given the + // correct label. For multiclass this is a globally micro-averaged + // metric. + // "F1_SCORE" - The F1 score is an average of recall and precision. + // For multiclass this is a macro-averaged metric. + // "LOG_LOSS" - Logorithmic Loss. For multiclass this is a + // macro-averaged metric. + // "ROC_AUC" - Area Under an ROC Curve. For multiclass this is a + // macro-averaged metric. + // "DAVIES_BOULDIN_INDEX" - Davies-Bouldin Index. + // "MEAN_AVERAGE_PRECISION" - Mean Average Precision. + // "NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN" - Normalized Discounted + // Cumulative Gain. + // "AVERAGE_RANK" - Average Rank. + HparamTuningObjectives []string `json:"hparamTuningObjectives,omitempty"` + // IncludeDrift: Include drift when fitting an ARIMA model. IncludeDrift bool `json:"includeDrift,omitempty"` @@ -7828,6 +8601,10 @@ type TrainingOptions struct { // InputLabelColumns: Name of input label columns in training data. InputLabelColumns []string `json:"inputLabelColumns,omitempty"` + // IntegratedGradientsNumSteps: Number of integral steps for the + // integrated gradients explain method. + IntegratedGradientsNumSteps int64 `json:"integratedGradientsNumSteps,omitempty,string"` + // ItemColumn: Item column specified for matrix factorization models. ItemColumn string `json:"itemColumn,omitempty"` @@ -7885,6 +8662,9 @@ type TrainingOptions struct { // only for iterative training algorithms. MaxIterations int64 `json:"maxIterations,omitempty,string"` + // MaxParallelTrials: Maximum number of trials to run in parallel. + MaxParallelTrials int64 `json:"maxParallelTrials,omitempty,string"` + // MaxTreeDepth: Maximum depth of a tree for boosted tree models. MaxTreeDepth int64 `json:"maxTreeDepth,omitempty,string"` @@ -7919,6 +8699,9 @@ type TrainingOptions struct { // iteration for boosted tree models. NumParallelTree int64 `json:"numParallelTree,omitempty,string"` + // NumTrials: Number of trials to run this hyperparameter tuning job. + NumTrials int64 `json:"numTrials,omitempty,string"` + // OptimizationStrategy: Optimization strategy for training linear // regression models. // @@ -7936,6 +8719,10 @@ type TrainingOptions struct { // feature name is A.b. PreserveInputStructs bool `json:"preserveInputStructs,omitempty"` + // SampledShapleyNumPaths: Number of paths for the sampled shapley + // explain method. + SampledShapleyNumPaths int64 `json:"sampledShapleyNumPaths,omitempty,string"` + // Subsample: Subsample fraction of the training data to grow tree to // prevent overfitting for boosted tree models. Subsample float64 `json:"subsample,omitempty"` @@ -8042,6 +8829,11 @@ func (s *TrainingOptions) UnmarshalJSON(data []byte) error { // TrainingRun: Information about a single training query run for the // model. type TrainingRun struct { + // ClassLevelGlobalExplanations: Global explanation contains the + // explanation of top features on the class level. Applies to + // classification models only. + ClassLevelGlobalExplanations []*GlobalExplanation `json:"classLevelGlobalExplanations,omitempty"` + // DataSplitResult: Data split result of the training run. Only set when // the input data is actually split. DataSplitResult *DataSplitResult `json:"dataSplitResult,omitempty"` @@ -8050,6 +8842,11 @@ type TrainingRun struct { // that were computed at the end of training. EvaluationMetrics *EvaluationMetrics `json:"evaluationMetrics,omitempty"` + // ModelLevelGlobalExplanation: Global explanation contains the + // explanation of top features on the model level. Applies to both + // regression and classification models. + ModelLevelGlobalExplanation *GlobalExplanation `json:"modelLevelGlobalExplanation,omitempty"` + // Results: Output of each iteration run, results.size() <= // max_iterations. Results []*IterationResult `json:"results,omitempty"` @@ -8061,21 +8858,22 @@ type TrainingRun struct { // includes user specified and default options that were used. TrainingOptions *TrainingOptions `json:"trainingOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSplitResult") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ClassLevelGlobalExplanations") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataSplitResult") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "ClassLevelGlobalExplanations") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if 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/cloudresourcemanager/v3/cloudresourcemanager-api.json b/cloudresourcemanager/v3/cloudresourcemanager-api.json index d7585e8845a..8cddfa2f05a 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v3/cloudresourcemanager-api.json @@ -1092,13 +1092,13 @@ "parameterOrder": [], "parameters": { "pageSize": { - "description": "Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default.", + "description": "Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default. Currently this api returns unpaginated response and `page_size` is ignored.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A pagination token returned from a previous call to `ListTagBindings` that indicates where this listing should continue from.", + "description": "Optional. A pagination token returned from a previous call to `ListTagBindings` that indicates where this listing should continue from. Currently this api returns unpaginated response and `page_token` is ignored.", "location": "query", "type": "string" }, @@ -1612,7 +1612,7 @@ } } }, - "revision": "20220219", + "revision": "20220306", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index d0cf7ee352d..143db6c5a05 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -7626,7 +7626,8 @@ func (r *TagBindingsService) List() *TagBindingsListCall { // PageSize sets the optional parameter "pageSize": The maximum number // of TagBindings to return in the response. The server allows a maximum // of 300 TagBindings to return. If unspecified, the server will use 100 -// as the default. +// as the default. Currently this api returns unpaginated response and +// `page_size` is ignored. func (c *TagBindingsListCall) PageSize(pageSize int64) *TagBindingsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -7634,7 +7635,8 @@ func (c *TagBindingsListCall) PageSize(pageSize int64) *TagBindingsListCall { // PageToken sets the optional parameter "pageToken": A pagination token // returned from a previous call to `ListTagBindings` that indicates -// where this listing should continue from. +// where this listing should continue from. Currently this api returns +// unpaginated response and `page_token` is ignored. func (c *TagBindingsListCall) PageToken(pageToken string) *TagBindingsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -7752,13 +7754,13 @@ func (c *TagBindingsListCall) Do(opts ...googleapi.CallOption) (*ListTagBindings // "parameterOrder": [], // "parameters": { // "pageSize": { - // "description": "Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default.", + // "description": "Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default. Currently this api returns unpaginated response and `page_size` is ignored.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A pagination token returned from a previous call to `ListTagBindings` that indicates where this listing should continue from.", + // "description": "Optional. A pagination token returned from a previous call to `ListTagBindings` that indicates where this listing should continue from. Currently this api returns unpaginated response and `page_token` is ignored.", // "location": "query", // "type": "string" // }, diff --git a/composer/v1/composer-api.json b/composer/v1/composer-api.json index 872d744a57d..505ac4270ce 100644 --- a/composer/v1/composer-api.json +++ b/composer/v1/composer-api.json @@ -242,7 +242,7 @@ "type": "string" }, "updateMask": { - "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -406,7 +406,7 @@ } } }, - "revision": "20220224", + "revision": "20220307", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { @@ -468,18 +468,18 @@ "type": "object" }, "DatabaseConfig": { - "description": "The configuration of Cloud SQL instance that is used by the Apache Airflow software. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + "description": "The configuration of Cloud SQL instance that is used by the Apache Airflow software.", "id": "DatabaseConfig", "properties": { "machineType": { - "description": "Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.", + "description": "Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", "type": "string" } }, "type": "object" }, "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day, with a zero year (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", "id": "Date", "properties": { "day": { @@ -587,7 +587,7 @@ }, "databaseConfig": { "$ref": "DatabaseConfig", - "description": "Optional. The configuration settings for Cloud SQL instance used internally by Apache Airflow software. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*." + "description": "Optional. The configuration settings for Cloud SQL instance used internally by Apache Airflow software." }, "encryptionConfig": { "$ref": "EncryptionConfig", @@ -685,7 +685,7 @@ "type": "boolean" }, "imageVersionId": { - "description": "The string identifier of the ImageVersion, in the form: \"composer-x.y.z-airflow-a.b(.c)\"", + "description": "The string identifier of the ImageVersion, in the form: \"composer-x.y.z-airflow-a.b.c\"", "type": "string" }, "isDefault": { @@ -1044,7 +1044,7 @@ "type": "object" }, "imageVersion": { - "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+\\.[0-9]+\\.[0-9]+|latest)-airflow-[0-9]+\\.[0-9]+(\\.[0-9]+.*)?`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the version is a [semantic version](https://semver.org) or `latest`. When the patch version is omitted, the current Cloud Composer patch version is selected. When `latest` is provided instead of an explicit version number, the server replaces `latest` with the current Cloud Composer version and stores that version number in the same field. The portion of the image version that follows *airflow-* is an official Apache Airflow repository [release name](https://github.com/apache/incubator-airflow/releases). See also [Version List](/composer/docs/concepts/versioning/composer-versions).", + "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+\\.[0-9]+(\\.[0-9]+)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major and minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", "type": "string" }, "pypiPackages": { diff --git a/composer/v1/composer-gen.go b/composer/v1/composer-gen.go index 8f5df2ed6a4..ecf6439d499 100644 --- a/composer/v1/composer-gen.go +++ b/composer/v1/composer-gen.go @@ -284,13 +284,13 @@ func (s *CheckUpgradeResponse) MarshalJSON() ([]byte, error) { } // DatabaseConfig: The configuration of Cloud SQL instance that is used -// by the Apache Airflow software. Supported for Cloud Composer -// environments in versions composer-1.*.*-airflow-*.*.*. +// by the Apache Airflow software. type DatabaseConfig struct { // MachineType: Optional. Cloud SQL machine type used by Airflow // database. It has to be one of: db-n1-standard-2, db-n1-standard-4, // db-n1-standard-8 or db-n1-standard-16. If not specified, - // db-n1-standard-2 will be used. + // db-n1-standard-2 will be used. Supported for Cloud Composer + // environments in versions composer-1.*.*-airflow-*.*.*. MachineType string `json:"machineType,omitempty"` // ForceSendFields is a list of field names (e.g. "MachineType") to @@ -320,11 +320,12 @@ func (s *DatabaseConfig) MarshalJSON() ([]byte, error) { // birthday. The time of day and time zone are either specified // elsewhere or are insignificant. The date is relative to the Gregorian // Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values * A month and day, with a -// zero year (e.g., an anniversary) * A year on its own, with a zero -// month and a zero day * A year and month, with a zero day (e.g., a -// credit card expiration date) Related types: * google.type.TimeOfDay * -// google.type.DateTime * google.protobuf.Timestamp +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp type Date struct { // Day: Day of a month. Must be from 1 to 31 and valid for the year and // month, or 0 to specify a year by itself or a year and month where the @@ -497,9 +498,7 @@ type EnvironmentConfig struct { DagGcsPrefix string `json:"dagGcsPrefix,omitempty"` // DatabaseConfig: Optional. The configuration settings for Cloud SQL - // instance used internally by Apache Airflow software. This field is - // supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. + // instance used internally by Apache Airflow software. DatabaseConfig *DatabaseConfig `json:"databaseConfig,omitempty"` // EncryptionConfig: Optional. The encryption options for the Cloud @@ -667,7 +666,7 @@ type ImageVersion struct { CreationDisabled bool `json:"creationDisabled,omitempty"` // ImageVersionId: The string identifier of the ImageVersion, in the - // form: "composer-x.y.z-airflow-a.b(.c)" + // form: "composer-x.y.z-airflow-a.b.c" ImageVersionId string `json:"imageVersionId,omitempty"` // IsDefault: Whether this is the default ImageVersion used by Composer @@ -1319,19 +1318,24 @@ type SoftwareConfig struct { // This encapsulates both the version of Cloud Composer functionality // and the version of Apache Airflow. It must match the regular // expression - // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0- - // 9]+.*)?`. When used as input, the server also checks if the provided - // version is supported and denies the request for an unsupported - // version. The Cloud Composer portion of the version is a semantic - // version (https://semver.org) or `latest`. When the patch version is - // omitted, the current Cloud Composer patch version is selected. When - // `latest` is provided instead of an explicit version number, the - // server replaces `latest` with the current Cloud Composer version and - // stores that version number in the same field. The portion of the - // image version that follows *airflow-* is an official Apache Airflow - // repository release name - // (https://github.com/apache/incubator-airflow/releases). See also - // Version List (/composer/docs/concepts/versioning/composer-versions). + // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflo + // w-([0-9]+\.[0-9]+(\.[0-9]+)?)`. When used as input, the server also + // checks if the provided version is supported and denies the request + // for an unsupported version. The Cloud Composer portion of the image + // version is a full semantic version (https://semver.org), or an alias + // in the form of major version number or `latest`. When an alias is + // provided, the server replaces it with the current Cloud Composer + // version that satisfies the alias. The Apache Airflow portion of the + // image version is a full semantic version that points to one of the + // supported Apache Airflow versions, or an alias in the form of only + // major and minor versions specified. When an alias is provided, the + // server replaces it with the latest Apache Airflow version that + // satisfies the alias and is supported in the given Cloud Composer + // version. In all cases, the resolved image version is stored in the + // same field. See also version list + // (/composer/docs/concepts/versioning/composer-versions) and versioning + // overview + // (/composer/docs/concepts/versioning/composer-versioning-overview). ImageVersion string `json:"imageVersion,omitempty"` // PypiPackages: Optional. Custom Python Package Index (PyPI) packages @@ -2338,15 +2342,6 @@ func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *E // environments in versions composer-1.*.*-airflow-*.*.*. * // `config.webServerNetworkAccessControl` * Replace the environment's // current `WebServerNetworkAccessControl`. * -// `config.databaseConfig.machineType` * Cloud SQL machine type used by -// Airflow database. It has to be one of: db-n1-standard-2, -// db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported -// for Cloud Composer environments in versions -// composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` -// * Machine type on which Airflow web server is running. It has to be -// one of: composer-n1-webserver-2, composer-n1-webserver-4 or -// composer-n1-webserver-8. Supported for Cloud Composer environments in -// versions composer-1.*.*-airflow-*.*.*. * // `config.softwareConfig.airflowConfigOverrides` * Replace all Apache // Airflow config overrides. If a replacement config overrides map is // not included in `environment`, all config overrides are cleared. It @@ -2490,7 +2485,7 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "updateMask": { - // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.numpy\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index 4053b8e1361..a34fa0ddd17 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -270,7 +270,7 @@ "type": "string" }, "updateMask": { - "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade and must match the current image version's Composer major version and Airflow major and minor versions. Consult the [Cloud Composer Version List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", + "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -462,7 +462,7 @@ } } }, - "revision": "20220224", + "revision": "20220307", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { @@ -485,7 +485,7 @@ "id": "CheckUpgradeRequest", "properties": { "imageVersion": { - "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+\\.[0-9]+\\.[0-9]+|latest)-airflow-[0-9]+\\.[0-9]+(\\.[0-9]+.*)?`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the version is a [semantic version](https://semver.org) or `latest`. When the patch version is omitted, the current Cloud Composer patch version is selected. When `latest` is provided instead of an explicit version number, the server replaces `latest` with the current Cloud Composer version and stores that version number in the same field. The portion of the image version that follows `airflow-` is an official Apache Airflow repository [release name](https://github.com/apache/incubator-airflow/releases). See also [Version List] (/composer/docs/concepts/versioning/composer-versions).", + "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+\\.[0-9]+(\\.[0-9]+)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major and minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", "type": "string" } }, @@ -550,18 +550,18 @@ "type": "object" }, "DatabaseConfig": { - "description": "The configuration of Cloud SQL instance that is used by the Apache Airflow software. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + "description": "The configuration of Cloud SQL instance that is used by the Apache Airflow software.", "id": "DatabaseConfig", "properties": { "machineType": { - "description": "Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.", + "description": "Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", "type": "string" } }, "type": "object" }, "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day, with a zero year (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", "id": "Date", "properties": { "day": { @@ -674,7 +674,7 @@ }, "databaseConfig": { "$ref": "DatabaseConfig", - "description": "Optional. The configuration settings for Cloud SQL instance used internally by Apache Airflow software. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*." + "description": "Optional. The configuration settings for Cloud SQL instance used internally by Apache Airflow software." }, "encryptionConfig": { "$ref": "EncryptionConfig", @@ -777,7 +777,7 @@ "type": "boolean" }, "imageVersionId": { - "description": "The string identifier of the ImageVersion, in the form: \"composer-x.y.z-airflow-a.b(.c)\"", + "description": "The string identifier of the ImageVersion, in the form: \"composer-x.y.z-airflow-a.b.c\"", "type": "string" }, "isDefault": { @@ -1188,7 +1188,7 @@ "type": "object" }, "imageVersion": { - "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+\\.[0-9]+\\.[0-9]+|latest)-airflow-[0-9]+\\.[0-9]+(\\.[0-9]+.*)?`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the version is a [semantic version](https://semver.org) or `latest`. When the patch version is omitted, the current Cloud Composer patch version is selected. When `latest` is provided instead of an explicit version number, the server replaces `latest` with the current Cloud Composer version and stores that version number in the same field. The portion of the image version that follows *airflow-* is an official Apache Airflow repository [release name](https://github.com/apache/incubator-airflow/releases). See also [Version List](/composer/docs/concepts/versioning/composer-versions).", + "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+\\.[0-9]+(\\.[0-9]+)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major and minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", "type": "string" }, "pypiPackages": { diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index 9d3cd9d5a5e..0a957bb4cda 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -239,20 +239,24 @@ type CheckUpgradeRequest struct { // This encapsulates both the version of Cloud Composer functionality // and the version of Apache Airflow. It must match the regular // expression - // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0- - // 9]+.*)?`. When used as input, the server also checks if the provided - // version is supported and denies the request for an unsupported - // version. The Cloud Composer portion of the version is a semantic - // version (https://semver.org) or `latest`. When the patch version is - // omitted, the current Cloud Composer patch version is selected. When - // `latest` is provided instead of an explicit version number, the - // server replaces `latest` with the current Cloud Composer version and - // stores that version number in the same field. The portion of the - // image version that follows `airflow-` is an official Apache Airflow - // repository release name - // (https://github.com/apache/incubator-airflow/releases). See also - // [Version List] - // (/composer/docs/concepts/versioning/composer-versions). + // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflo + // w-([0-9]+\.[0-9]+(\.[0-9]+)?)`. When used as input, the server also + // checks if the provided version is supported and denies the request + // for an unsupported version. The Cloud Composer portion of the image + // version is a full semantic version (https://semver.org), or an alias + // in the form of major version number or `latest`. When an alias is + // provided, the server replaces it with the current Cloud Composer + // version that satisfies the alias. The Apache Airflow portion of the + // image version is a full semantic version that points to one of the + // supported Apache Airflow versions, or an alias in the form of only + // major and minor versions specified. When an alias is provided, the + // server replaces it with the latest Apache Airflow version that + // satisfies the alias and is supported in the given Cloud Composer + // version. In all cases, the resolved image version is stored in the + // same field. See also version list + // (/composer/docs/concepts/versioning/composer-versions) and versioning + // overview + // (/composer/docs/concepts/versioning/composer-versioning-overview). ImageVersion string `json:"imageVersion,omitempty"` // ForceSendFields is a list of field names (e.g. "ImageVersion") to @@ -362,13 +366,13 @@ func (s *CidrBlock) MarshalJSON() ([]byte, error) { } // DatabaseConfig: The configuration of Cloud SQL instance that is used -// by the Apache Airflow software. Supported for Cloud Composer -// environments in versions composer-1.*.*-airflow-*.*.*. +// by the Apache Airflow software. type DatabaseConfig struct { // MachineType: Optional. Cloud SQL machine type used by Airflow // database. It has to be one of: db-n1-standard-2, db-n1-standard-4, // db-n1-standard-8 or db-n1-standard-16. If not specified, - // db-n1-standard-2 will be used. + // db-n1-standard-2 will be used. Supported for Cloud Composer + // environments in versions composer-1.*.*-airflow-*.*.*. MachineType string `json:"machineType,omitempty"` // ForceSendFields is a list of field names (e.g. "MachineType") to @@ -398,11 +402,12 @@ func (s *DatabaseConfig) MarshalJSON() ([]byte, error) { // birthday. The time of day and time zone are either specified // elsewhere or are insignificant. The date is relative to the Gregorian // Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values * A month and day, with a -// zero year (e.g., an anniversary) * A year on its own, with a zero -// month and a zero day * A year and month, with a zero day (e.g., a -// credit card expiration date) Related types: * google.type.TimeOfDay * -// google.type.DateTime * google.protobuf.Timestamp +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp type Date struct { // Day: Day of a month. Must be from 1 to 31 and valid for the year and // month, or 0 to specify a year by itself or a year and month where the @@ -575,9 +580,7 @@ type EnvironmentConfig struct { DagGcsPrefix string `json:"dagGcsPrefix,omitempty"` // DatabaseConfig: Optional. The configuration settings for Cloud SQL - // instance used internally by Apache Airflow software. This field is - // supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. + // instance used internally by Apache Airflow software. DatabaseConfig *DatabaseConfig `json:"databaseConfig,omitempty"` // EncryptionConfig: Optional. The encryption options for the Cloud @@ -759,7 +762,7 @@ type ImageVersion struct { CreationDisabled bool `json:"creationDisabled,omitempty"` // ImageVersionId: The string identifier of the ImageVersion, in the - // form: "composer-x.y.z-airflow-a.b(.c)" + // form: "composer-x.y.z-airflow-a.b.c" ImageVersionId string `json:"imageVersionId,omitempty"` // IsDefault: Whether this is the default ImageVersion used by Composer @@ -1512,19 +1515,24 @@ type SoftwareConfig struct { // This encapsulates both the version of Cloud Composer functionality // and the version of Apache Airflow. It must match the regular // expression - // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0- - // 9]+.*)?`. When used as input, the server also checks if the provided - // version is supported and denies the request for an unsupported - // version. The Cloud Composer portion of the version is a semantic - // version (https://semver.org) or `latest`. When the patch version is - // omitted, the current Cloud Composer patch version is selected. When - // `latest` is provided instead of an explicit version number, the - // server replaces `latest` with the current Cloud Composer version and - // stores that version number in the same field. The portion of the - // image version that follows *airflow-* is an official Apache Airflow - // repository release name - // (https://github.com/apache/incubator-airflow/releases). See also - // Version List (/composer/docs/concepts/versioning/composer-versions). + // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflo + // w-([0-9]+\.[0-9]+(\.[0-9]+)?)`. When used as input, the server also + // checks if the provided version is supported and denies the request + // for an unsupported version. The Cloud Composer portion of the image + // version is a full semantic version (https://semver.org), or an alias + // in the form of major version number or `latest`. When an alias is + // provided, the server replaces it with the current Cloud Composer + // version that satisfies the alias. The Apache Airflow portion of the + // image version is a full semantic version that points to one of the + // supported Apache Airflow versions, or an alias in the form of only + // major and minor versions specified. When an alias is provided, the + // server replaces it with the latest Apache Airflow version that + // satisfies the alias and is supported in the given Cloud Composer + // version. In all cases, the resolved image version is stored in the + // same field. See also version list + // (/composer/docs/concepts/versioning/composer-versions) and versioning + // overview + // (/composer/docs/concepts/versioning/composer-versioning-overview). ImageVersion string `json:"imageVersion,omitempty"` // PypiPackages: Optional. Custom Python Package Index (PyPI) packages @@ -2698,13 +2706,13 @@ func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *E // `config.softwareConfig.imageVersion` * Upgrade the version of the // environment in-place. Refer to `SoftwareConfig.image_version` for // information on how to format the new image version. Additionally, the -// new image version cannot effect a version downgrade and must match -// the current image version's Composer major version and Airflow major -// and minor versions. Consult the Cloud Composer Version List -// (https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) -// for valid values. * `config.softwareConfig.schedulerCount` * -// Horizontally scale the number of schedulers in Airflow. A positive -// integer not greater than the number of nodes must be provided in the +// new image version cannot effect a version downgrade, and must match +// the current image version's Composer and Airflow major versions. +// Consult the Cloud Composer version list +// (/composer/docs/concepts/versioning/composer-versions) for valid +// values. * `config.softwareConfig.schedulerCount` * Horizontally scale +// the number of schedulers in Airflow. A positive integer not greater +// than the number of nodes must be provided in the // `config.softwareConfig.schedulerCount` field. Supported for Cloud // Composer environments in versions composer-1.*.*-airflow-2.*.*. * // `config.databaseConfig.machineType` * Cloud SQL machine type used by @@ -2836,7 +2844,7 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "updateMask": { - // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade and must match the current image version's Composer major version and Airflow major and minor versions. Consult the [Cloud Composer Version List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", + // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index bdea6e69987..cf0c42f1be4 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -11345,7 +11345,7 @@ ] }, "reset": { - "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + "description": "Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.", "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reset", "httpMethod": "POST", "id": "compute.instances.reset", @@ -21933,7 +21933,7 @@ "type": "string" }, "guestFlush": { - "description": "[Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).", + "description": "[Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process.", "location": "query", "type": "boolean" }, @@ -38494,7 +38494,7 @@ } } }, - "revision": "20220224", + "revision": "20220301", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -39639,6 +39639,20 @@ "description": "An instance-attached disk resource.", "id": "AttachedDisk", "properties": { + "architecture": { + "description": "[Output Only] The architecture of the attached disk. Valid values are ARM64 or X86_64.", + "enum": [ + "ARCHITECTURE_UNSPECIFIED", + "ARM64", + "X86_64" + ], + "enumDescriptions": [ + "Default value indicating Architecture is not set.", + "Machines with architecture ARM64", + "Machines with architecture X86_64" + ], + "type": "string" + }, "autoDelete": { "description": "Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).", "type": "boolean" @@ -46392,6 +46406,7 @@ }, "kind": { "default": "compute#futureReservation", + "description": "[Output Only] Type of the resource. Always compute#futureReservation for future reservations.", "type": "string" }, "name": { @@ -46544,6 +46559,7 @@ }, "kind": { "default": "compute#futureReservationsAggregatedListResponse", + "description": "[Output Only] Type of resource. Always compute#futureReservationsAggregatedListResponse for future resevation aggregated list response.", "type": "string" }, "nextPageToken": { @@ -46668,6 +46684,7 @@ }, "kind": { "default": "compute#futureReservationsListResponse", + "description": "[Output Only] Type of resource.Always compute#FutureReservationsListResponse for lists of reservations", "type": "string" }, "nextPageToken": { @@ -56045,6 +56062,20 @@ }, "type": "array" }, + "architecture": { + "description": "[Output Only] The architecture of the machine type.", + "enum": [ + "ARCHITECTURE_UNSPECIFIED", + "ARM64", + "X86_64" + ], + "enumDescriptions": [ + "Default value indicating Architecture is not set.", + "Machines with architecture ARM64", + "Machines with architecture X86_64" + ], + "type": "string" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -56951,6 +56982,7 @@ }, "kind": { "default": "compute#networkEdgeSecurityService", + "description": "[Output only] Type of the resource. Always compute#networkEdgeSecurityService for NetworkEdgeSecurityServices", "type": "string" }, "name": { @@ -56997,6 +57029,7 @@ }, "kind": { "default": "compute#networkEdgeSecurityServiceAggregatedList", + "description": "[Output Only] Type of resource. Always compute#networkEdgeSecurityServiceAggregatedList for lists of Network Edge Security Services.", "type": "string" }, "nextPageToken": { @@ -70334,6 +70367,14 @@ "description": "[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.", "type": "string" }, + "sourceSnapshotSchedulePolicy": { + "description": "[Output Only] URL of the resource policy which created this scheduled snapshot.", + "type": "string" + }, + "sourceSnapshotSchedulePolicyId": { + "description": "[Output Only] ID of the resource policy which created this scheduled snapshot.", + "type": "string" + }, "status": { "description": "[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.", "enum": [ diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index a4edade6fe2..dd586b82534 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -3018,6 +3018,16 @@ func (s *AllocationSpecificSKUReservation) MarshalJSON() ([]byte, error) { // AttachedDisk: An instance-attached disk resource. type AttachedDisk struct { + // Architecture: [Output Only] The architecture of the attached disk. + // Valid values are ARM64 or X86_64. + // + // Possible values: + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture + // is not set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` + // AutoDelete: Specifies whether the disk will be auto-deleted when the // instance is deleted (but not when the disk is detached from the // instance). @@ -3159,7 +3169,7 @@ type AttachedDisk struct { // created. UserLicenses []string `json:"userLicenses,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // ForceSendFields is a list of field names (e.g. "Architecture") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3167,10 +3177,10 @@ type AttachedDisk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Architecture") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -13804,6 +13814,8 @@ type FutureReservation struct { // The server defines this identifier. Id uint64 `json:"id,omitempty,string"` + // Kind: [Output Only] Type of the resource. Always + // compute#futureReservation for future reservations. Kind string `json:"kind,omitempty"` // Name: The name of the resource, provided by the client when initially @@ -14019,6 +14031,9 @@ type FutureReservationsAggregatedListResponse struct { // Items: A list of Future reservation resources. Items map[string]FutureReservationsScopedList `json:"items,omitempty"` + // Kind: [Output Only] Type of resource. Always + // compute#futureReservationsAggregatedListResponse for future + // resevation aggregated list response. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -14205,6 +14220,8 @@ type FutureReservationsListResponse struct { // Items: [Output Only] A list of future reservation resources. Items []*FutureReservation `json:"items,omitempty"` + // Kind: [Output Only] Type of resource.Always + // compute#FutureReservationsListResponse for lists of reservations Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -29147,6 +29164,15 @@ type MachineType struct { // assigned to this machine type. Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` + // Architecture: [Output Only] The architecture of the machine type. + // + // Possible values: + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture + // is not set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -30609,6 +30635,8 @@ type NetworkEdgeSecurityService struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` + // Kind: [Output only] Type of the resource. Always + // compute#networkEdgeSecurityService for NetworkEdgeSecurityServices Kind string `json:"kind,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -30674,6 +30702,9 @@ type NetworkEdgeSecurityServiceAggregatedList struct { // Items: A list of NetworkEdgeSecurityServicesScopedList resources. Items map[string]NetworkEdgeSecurityServicesScopedList `json:"items,omitempty"` + // Kind: [Output Only] Type of resource. Always + // compute#networkEdgeSecurityServiceAggregatedList for lists of Network + // Edge Security Services. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -51139,6 +51170,14 @@ type Snapshot struct { // snapshot that was used. SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` + // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource + // policy which created this scheduled snapshot. + SourceSnapshotSchedulePolicy string `json:"sourceSnapshotSchedulePolicy,omitempty"` + + // SourceSnapshotSchedulePolicyId: [Output Only] ID of the resource + // policy which created this scheduled snapshot. + SourceSnapshotSchedulePolicyId string `json:"sourceSnapshotSchedulePolicyId,omitempty"` + // Status: [Output Only] The status of the snapshot. This can be // CREATING, DELETING, FAILED, READY, or UPLOADING. // @@ -111048,7 +111087,7 @@ type InstancesResetCall struct { header_ http.Header } -// Reset: Performs a reset on the instance. This is a hard reset the VM +// Reset: Performs a reset on the instance. This is a hard reset. The VM // does not do a graceful shutdown. For more information, see Resetting // an instance. // @@ -111167,7 +111206,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + // "description": "Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.", // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reset", // "httpMethod": "POST", // "id": "compute.instances.reset", @@ -154838,8 +154877,7 @@ func (r *RegionDisksService) CreateSnapshot(project string, region string, disk // GuestFlush sets the optional parameter "guestFlush": [Input Only] // Specifies to create an application consistent snapshot by informing -// the OS to prepare for the snapshot process. Currently only supported -// on Windows instances using the Volume Shadow Copy Service (VSS). +// the OS to prepare for the snapshot process. func (c *RegionDisksCreateSnapshotCall) GuestFlush(guestFlush bool) *RegionDisksCreateSnapshotCall { c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) return c @@ -154972,7 +155010,7 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera // "type": "string" // }, // "guestFlush": { - // "description": "[Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).", + // "description": "[Input Only] Specifies to create an application consistent snapshot by informing the OS to prepare for the snapshot process.", // "location": "query", // "type": "boolean" // }, diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 8e1ec2afbe4..a41dc616ef9 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2225,7 +2225,7 @@ } } }, - "revision": "20220218", + "revision": "20220301", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -5189,6 +5189,13 @@ "description": "Defines a SDK harness container for executing Dataflow pipelines.", "id": "SdkHarnessContainerImage", "properties": { + "capabilities": { + "description": "The set of capabilities enumerated in the above Environment proto. See also https://github.com/apache/beam/blob/master/model/pipeline/src/main/proto/beam_runner_api.proto", + "items": { + "type": "string" + }, + "type": "array" + }, "containerImage": { "description": "A docker container image that resides in Google Container Registry.", "type": "string" @@ -5238,7 +5245,7 @@ "type": "object" }, "SendDebugCaptureRequest": { - "description": "Request to send encoded debug information.", + "description": "Request to send encoded debug information. Next ID: 8", "id": "SendDebugCaptureRequest", "properties": { "componentId": { @@ -5249,6 +5256,24 @@ "description": "The encoded debug information.", "type": "string" }, + "dataFormat": { + "description": "Format for the data field above (id=5).", + "enum": [ + "DATA_FORMAT_UNSPECIFIED", + "RAW", + "JSON", + "ZLIB", + "BROTLI" + ], + "enumDescriptions": [ + "Format unspecified, parsing is determined based upon page type and legacy encoding. (go/protodosdonts#do-include-an-unspecified-value-in-an-enum)", + "Raw HTML string.", + "JSON-encoded string.", + "Websafe encoded zlib-compressed string.", + "Websafe encoded brotli-compressed string." + ], + "type": "string" + }, "location": { "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", "type": "string" diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index cac56067c70..19b958cb185 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -5081,6 +5081,11 @@ func (s *SDKInfo) MarshalJSON() ([]byte, error) { // SdkHarnessContainerImage: Defines a SDK harness container for // executing Dataflow pipelines. type SdkHarnessContainerImage struct { + // Capabilities: The set of capabilities enumerated in the above + // Environment proto. See also + // https://github.com/apache/beam/blob/master/model/pipeline/src/main/proto/beam_runner_api.proto + Capabilities []string `json:"capabilities,omitempty"` + // ContainerImage: A docker container image that resides in Google // Container Registry. ContainerImage string `json:"containerImage,omitempty"` @@ -5096,7 +5101,7 @@ type SdkHarnessContainerImage struct { // service may choose to override this property if needed. UseSingleCorePerContainer bool `json:"useSingleCorePerContainer,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerImage") to + // ForceSendFields is a list of field names (e.g. "Capabilities") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5104,13 +5109,12 @@ type SdkHarnessContainerImage struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerImage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Capabilities") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -5167,6 +5171,7 @@ func (s *SdkVersion) MarshalJSON() ([]byte, error) { } // SendDebugCaptureRequest: Request to send encoded debug information. +// Next ID: 8 type SendDebugCaptureRequest struct { // ComponentId: The internal component id for which debug information is // sent. @@ -5175,6 +5180,18 @@ type SendDebugCaptureRequest struct { // Data: The encoded debug information. Data string `json:"data,omitempty"` + // DataFormat: Format for the data field above (id=5). + // + // Possible values: + // "DATA_FORMAT_UNSPECIFIED" - Format unspecified, parsing is + // determined based upon page type and legacy encoding. + // (go/protodosdonts#do-include-an-unspecified-value-in-an-enum) + // "RAW" - Raw HTML string. + // "JSON" - JSON-encoded string. + // "ZLIB" - Websafe encoded zlib-compressed string. + // "BROTLI" - Websafe encoded brotli-compressed string. + DataFormat string `json:"dataFormat,omitempty"` + // Location: The [regional endpoint] // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) // that contains the job specified by job_id. diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json index 076b25de581..a7dded0d3c5 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -1588,7 +1588,7 @@ } } }, - "revision": "20211014", + "revision": "20220303", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -2316,7 +2316,7 @@ "type": "string" }, "kind": { - "default": "deploymentmanager#operation", + "default": "compute#operation", "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", "type": "string" }, diff --git a/deploymentmanager/v2/deploymentmanager-api.json b/deploymentmanager/v2/deploymentmanager-api.json index d3a6c639ad3..afab67bac27 100644 --- a/deploymentmanager/v2/deploymentmanager-api.json +++ b/deploymentmanager/v2/deploymentmanager-api.json @@ -988,7 +988,7 @@ } } }, - "revision": "20211014", + "revision": "20220303", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1414,7 +1414,7 @@ "type": "string" }, "kind": { - "default": "deploymentmanager#operation", + "default": "compute#operation", "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", "type": "string" }, diff --git a/deploymentmanager/v2beta/deploymentmanager-api.json b/deploymentmanager/v2beta/deploymentmanager-api.json index f68228209af..6f59d7ea3a7 100644 --- a/deploymentmanager/v2beta/deploymentmanager-api.json +++ b/deploymentmanager/v2beta/deploymentmanager-api.json @@ -1552,7 +1552,7 @@ } } }, - "revision": "20211014", + "revision": "20220303", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -2219,7 +2219,7 @@ "type": "string" }, "kind": { - "default": "deploymentmanager#operation", + "default": "compute#operation", "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", "type": "string" }, diff --git a/domains/v1/domains-api.json b/domains/v1/domains-api.json index 7815693a7da..e1eed2815fb 100644 --- a/domains/v1/domains-api.json +++ b/domains/v1/domains-api.json @@ -779,7 +779,7 @@ } } }, - "revision": "20211108", + "revision": "20220308", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1487,7 +1487,7 @@ "type": "array" }, "regionCode": { - "description": "Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland.", + "description": "Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland.", "type": "string" }, "revision": { diff --git a/domains/v1/domains-gen.go b/domains/v1/domains-gen.go index f3955c7b107..2e4076f125b 100644 --- a/domains/v1/domains-gen.go +++ b/domains/v1/domains-gen.go @@ -1471,8 +1471,8 @@ type PostalAddress struct { // RegionCode: Required. CLDR region code of the country/region of the // address. This is never inferred and it is up to the user to ensure - // the value is correct. See http://cldr.unicode.org/ and - // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + // the value is correct. See https://cldr.unicode.org/ and + // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html // for details. Example: "CH" for Switzerland. RegionCode string `json:"regionCode,omitempty"` diff --git a/file/v1beta1/file-api.json b/file/v1beta1/file-api.json index 0428222bfd6..54f8c08e732 100644 --- a/file/v1beta1/file-api.json +++ b/file/v1beta1/file-api.json @@ -874,7 +874,7 @@ } } }, - "revision": "20220214", + "revision": "20220222", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -1426,7 +1426,7 @@ "type": "string" }, "suspensionReasons": { - "description": "Output only. field indicates all the reasons the instance is in \"SUSPENDED\" state.", + "description": "Output only. Field indicates all the reasons the instance is in \"SUSPENDED\" state.", "items": { "enum": [ "SUSPENSION_REASON_UNSPECIFIED", diff --git a/file/v1beta1/file-gen.go b/file/v1beta1/file-gen.go index 2afbd965820..9cf9de13e15 100644 --- a/file/v1beta1/file-gen.go +++ b/file/v1beta1/file-gen.go @@ -977,7 +977,7 @@ type Instance struct { // state, if available. StatusMessage string `json:"statusMessage,omitempty"` - // SuspensionReasons: Output only. field indicates all the reasons the + // SuspensionReasons: Output only. Field indicates all the reasons the // instance is in "SUSPENDED" state. // // Possible values: diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index d692dbee38e..582d11ab21d 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -844,6 +844,78 @@ "https://www.googleapis.com/auth/datastore" ] }, + "listDocuments": { + "description": "Lists documents.", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{collectionId}", + "httpMethod": "GET", + "id": "firestore.projects.databases.documents.listDocuments", + "parameterOrder": [ + "parent", + "collectionId" + ], + "parameters": { + "collectionId": { + "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + "location": "path", + "required": true, + "type": "string" + }, + "mask.fieldPaths": { + "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + "location": "query", + "repeated": true, + "type": "string" + }, + "orderBy": { + "description": "The order to sort results by. For example: `priority desc, name`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of documents to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The `next_page_token` value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+/documents$", + "required": true, + "type": "string" + }, + "readTime": { + "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "showMissing": { + "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + "location": "query", + "type": "boolean" + }, + "transaction": { + "description": "Reads documents in a transaction.", + "format": "byte", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/{collectionId}", + "response": { + "$ref": "ListDocumentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "listen": { "description": "Listens to changes.", "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:listen", @@ -1247,7 +1319,7 @@ } } }, - "revision": "20220221", + "revision": "20220305", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -1776,6 +1848,20 @@ "description": "A Cloud Firestore Database. Currently only one database is allowed per cloud project; this database must have a `database_id` of '(default)'.", "id": "GoogleFirestoreAdminV1Database", "properties": { + "appEngineIntegrationMode": { + "description": "The App Engine integration mode to use for this database.", + "enum": [ + "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "Not used.", + "If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application \u0026 database, as well as disabling writes to the database.", + "Appengine has no affect on the ability of this database to serve requests." + ], + "type": "string" + }, "concurrencyMode": { "description": "The concurrency control mode to use for this database.", "enum": [ @@ -1796,6 +1882,11 @@ "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", "type": "string" }, + "keyPrefix": { + "description": "Output only. The key_prefix for this database. This key_prefix is used, in combination with the project id (\"~\") to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).", + "readOnly": true, + "type": "string" + }, "locationId": { "description": "The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.", "type": "string" @@ -2757,6 +2848,10 @@ "$ref": "Document", "description": "A query result, not set when reporting partial progress." }, + "done": { + "description": "If present, Firestore has completely finished the request and no more documents will be returned.", + "type": "boolean" + }, "readTime": { "description": "The time at which the document was read. This may be monotonically increasing; in this case, the previous documents in the result stream are guaranteed not to have changed between their `read_time` and this one. If the query returns no results, a response with `read_time` and no `document` will be sent, and this represents the time at which the query was run.", "format": "google-datetime", diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 712e499e8c7..322bf07e6a2 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1236,6 +1236,19 @@ func (s *Filter) MarshalJSON() ([]byte, error) { // only one database is allowed per cloud project; this database must // have a `database_id` of '(default)'. type GoogleFirestoreAdminV1Database struct { + // AppEngineIntegrationMode: The App Engine integration mode to use for + // this database. + // + // Possible values: + // "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED" - Not used. + // "ENABLED" - If an App Engine application exists in the same region + // as this database, App Engine configuration will impact this database. + // This includes disabling of the application & database, as well as + // disabling writes to the database. + // "DISABLED" - Appengine has no affect on the ability of this + // database to serve requests. + AppEngineIntegrationMode string `json:"appEngineIntegrationMode,omitempty"` + // ConcurrencyMode: The concurrency control mode to use for this // database. // @@ -1257,6 +1270,14 @@ type GoogleFirestoreAdminV1Database struct { // the client has an up-to-date value before proceeding. Etag string `json:"etag,omitempty"` + // KeyPrefix: Output only. The key_prefix for this database. This + // key_prefix is used, in combination with the project id ("~") to + // construct the application id that is returned from the Cloud + // Datastore APIs in Google App Engine first generation runtimes. This + // value may be empty in which case the appid to use for URL-encoded + // keys is the project_id (eg: foo instead of v~foo). + KeyPrefix string `json:"keyPrefix,omitempty"` + // LocationId: The location of the database. Available databases are // listed at https://cloud.google.com/firestore/docs/locations. LocationId string `json:"locationId,omitempty"` @@ -1280,18 +1301,19 @@ type GoogleFirestoreAdminV1Database struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConcurrencyMode") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AppEngineIntegrationMode") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConcurrencyMode") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "AppEngineIntegrationMode") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. @@ -2941,6 +2963,10 @@ type RunQueryResponse struct { // Document: A query result, not set when reporting partial progress. Document *Document `json:"document,omitempty"` + // Done: If present, Firestore has completely finished the request and + // no more documents will be returned. + Done bool `json:"done,omitempty"` + // ReadTime: The time at which the document was read. This may be // monotonically increasing; in this case, the previous documents in the // result stream are guaranteed not to have changed between their @@ -7079,6 +7105,286 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Pages(ctx context.Cont } } +// method id "firestore.projects.databases.documents.listDocuments": + +type ProjectsDatabasesDocumentsListDocumentsCall struct { + s *Service + parent string + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListDocuments: Lists documents. +// +// - collectionId: The collection ID, relative to `parent`, to list. For +// example: `chatrooms` or `messages`. +// - parent: The parent resource name. In the format: +// `projects/{project_id}/databases/{database_id}/documents` or +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. For example: +// `projects/my-project/databases/my-database/documents` or +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) ListDocuments(parent string, collectionId string) *ProjectsDatabasesDocumentsListDocumentsCall { + c := &ProjectsDatabasesDocumentsListDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.collectionId = collectionId + return c +} + +// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The +// list of field paths in the mask. See Document.fields for a field path +// syntax reference. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) + return c +} + +// OrderBy sets the optional parameter "orderBy": The order to sort +// results by. For example: `priority desc, name`. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of documents to return. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// `next_page_token` value returned from a previous List request, if +// any. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadTime sets the optional parameter "readTime": Reads documents as +// they were at the given time. This may not be older than 270 seconds. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("readTime", readTime) + return c +} + +// ShowMissing sets the optional parameter "showMissing": If the list +// should show missing documents. A missing document is a document that +// does not exist but has sub-documents. These documents will be +// returned with a key but will not have fields, Document.create_time, +// or Document.update_time set. Requests with `show_missing` may not +// specify `where` or `order_by`. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) + return c +} + +// Transaction sets the optional parameter "transaction": Reads +// documents in a transaction. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("transaction", transaction) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListDocumentsCall { + 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 *ProjectsDatabasesDocumentsListDocumentsCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListDocumentsCall { + 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 *ProjectsDatabasesDocumentsListDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListDocumentsCall { + 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 *ProjectsDatabasesDocumentsListDocumentsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsListDocumentsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + "collectionId": c.collectionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.listDocuments" call. +// Exactly one of *ListDocumentsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDocumentsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDocumentsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists documents.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{collectionId}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.documents.listDocuments", + // "parameterOrder": [ + // "parent", + // "collectionId" + // ], + // "parameters": { + // "collectionId": { + // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "mask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "orderBy": { + // "description": "The order to sort results by. For example: `priority desc, name`.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of documents to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The `next_page_token` value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents$", + // "required": true, + // "type": "string" + // }, + // "readTime": { + // "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "showMissing": { + // "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "location": "query", + // "type": "boolean" + // }, + // "transaction": { + // "description": "Reads documents in a transaction.", + // "format": "byte", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/{collectionId}", + // "response": { + // "$ref": "ListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "firestore.projects.databases.documents.listen": type ProjectsDatabasesDocumentsListenCall struct { diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index 4c7928165cc..0345e1e3a32 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -519,6 +519,78 @@ "https://www.googleapis.com/auth/datastore" ] }, + "listDocuments": { + "description": "Lists documents.", + "flatPath": "v1beta1/projects/{projectsId}/databases/{databasesId}/documents/{collectionId}", + "httpMethod": "GET", + "id": "firestore.projects.databases.documents.listDocuments", + "parameterOrder": [ + "parent", + "collectionId" + ], + "parameters": { + "collectionId": { + "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + "location": "path", + "required": true, + "type": "string" + }, + "mask.fieldPaths": { + "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + "location": "query", + "repeated": true, + "type": "string" + }, + "orderBy": { + "description": "The order to sort results by. For example: `priority desc, name`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of documents to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The `next_page_token` value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+/documents$", + "required": true, + "type": "string" + }, + "readTime": { + "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "showMissing": { + "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + "location": "query", + "type": "boolean" + }, + "transaction": { + "description": "Reads documents in a transaction.", + "format": "byte", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/{collectionId}", + "response": { + "$ref": "ListDocumentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "listen": { "description": "Listens to changes.", "flatPath": "v1beta1/projects/{projectsId}/databases/{databasesId}/documents:listen", @@ -849,7 +921,7 @@ } } }, - "revision": "20220221", + "revision": "20220305", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -2044,6 +2116,10 @@ "$ref": "Document", "description": "A query result, not set when reporting partial progress." }, + "done": { + "description": "If present, Firestore has completely finished the request and no more documents will be returned.", + "type": "boolean" + }, "readTime": { "description": "The time at which the document was read. This may be monotonically increasing; in this case, the previous documents in the result stream are guaranteed not to have changed between their `read_time` and this one. If the query returns no results, a response with `read_time` and no `document` will be sent, and this represents the time at which the query was run.", "format": "google-datetime", diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index bbd19ccf6f1..dfd79693f12 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -2363,6 +2363,10 @@ type RunQueryResponse struct { // Document: A query result, not set when reporting partial progress. Document *Document `json:"document,omitempty"` + // Done: If present, Firestore has completely finished the request and + // no more documents will be returned. + Done bool `json:"done,omitempty"` + // ReadTime: The time at which the document was read. This may be // monotonically increasing; in this case, the previous documents in the // result stream are guaranteed not to have changed between their @@ -4849,6 +4853,286 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Pages(ctx context.Cont } } +// method id "firestore.projects.databases.documents.listDocuments": + +type ProjectsDatabasesDocumentsListDocumentsCall struct { + s *Service + parent string + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListDocuments: Lists documents. +// +// - collectionId: The collection ID, relative to `parent`, to list. For +// example: `chatrooms` or `messages`. +// - parent: The parent resource name. In the format: +// `projects/{project_id}/databases/{database_id}/documents` or +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. For example: +// `projects/my-project/databases/my-database/documents` or +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) ListDocuments(parent string, collectionId string) *ProjectsDatabasesDocumentsListDocumentsCall { + c := &ProjectsDatabasesDocumentsListDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.collectionId = collectionId + return c +} + +// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The +// list of field paths in the mask. See Document.fields for a field path +// syntax reference. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) + return c +} + +// OrderBy sets the optional parameter "orderBy": The order to sort +// results by. For example: `priority desc, name`. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of documents to return. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// `next_page_token` value returned from a previous List request, if +// any. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadTime sets the optional parameter "readTime": Reads documents as +// they were at the given time. This may not be older than 270 seconds. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("readTime", readTime) + return c +} + +// ShowMissing sets the optional parameter "showMissing": If the list +// should show missing documents. A missing document is a document that +// does not exist but has sub-documents. These documents will be +// returned with a key but will not have fields, Document.create_time, +// or Document.update_time set. Requests with `show_missing` may not +// specify `where` or `order_by`. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) + return c +} + +// Transaction sets the optional parameter "transaction": Reads +// documents in a transaction. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall { + c.urlParams_.Set("transaction", transaction) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListDocumentsCall { + 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 *ProjectsDatabasesDocumentsListDocumentsCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListDocumentsCall { + 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 *ProjectsDatabasesDocumentsListDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListDocumentsCall { + 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 *ProjectsDatabasesDocumentsListDocumentsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsListDocumentsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/{collectionId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + "collectionId": c.collectionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.listDocuments" call. +// Exactly one of *ListDocumentsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDocumentsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDocumentsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists documents.", + // "flatPath": "v1beta1/projects/{projectsId}/databases/{databasesId}/documents/{collectionId}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.documents.listDocuments", + // "parameterOrder": [ + // "parent", + // "collectionId" + // ], + // "parameters": { + // "collectionId": { + // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "mask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "orderBy": { + // "description": "The order to sort results by. For example: `priority desc, name`.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of documents to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The `next_page_token` value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents$", + // "required": true, + // "type": "string" + // }, + // "readTime": { + // "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "showMissing": { + // "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "location": "query", + // "type": "boolean" + // }, + // "transaction": { + // "description": "Reads documents in a transaction.", + // "format": "byte", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/{collectionId}", + // "response": { + // "$ref": "ListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "firestore.projects.databases.documents.listen": type ProjectsDatabasesDocumentsListenCall struct { diff --git a/forms/v1/forms-api.json b/forms/v1/forms-api.json new file mode 100644 index 00000000000..9ecc99e59c9 --- /dev/null +++ b/forms/v1/forms-api.json @@ -0,0 +1,1593 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/drive": { + "description": "See, edit, create, and delete all of your Google Drive files" + }, + "https://www.googleapis.com/auth/drive.file": { + "description": "See, edit, create, and delete only the specific Google Drive files you use with this app" + }, + "https://www.googleapis.com/auth/drive.readonly": { + "description": "See and download all your Google Drive files" + } + } + } + }, + "basePath": "", + "baseUrl": "https://forms.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Forms", + "description": "Reads and writes Google Forms and responses.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/forms/api", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "forms:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://forms.mtls.googleapis.com/", + "name": "forms", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "forms": { + "methods": { + "batchUpdate": { + "description": "Change the form with a batch of updates.", + "flatPath": "v1/forms/{formId}:batchUpdate", + "httpMethod": "POST", + "id": "forms.forms.batchUpdate", + "parameterOrder": [ + "formId" + ], + "parameters": { + "formId": { + "description": "Required. The form ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/forms/{formId}:batchUpdate", + "request": { + "$ref": "BatchUpdateFormRequest" + }, + "response": { + "$ref": "BatchUpdateFormResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file" + ] + }, + "create": { + "description": "Create a new form using the title given in the provided form message in the request. *Important:* Only the form.info.title and form.info.document_title fields are copied to the new form. All other fields including the form description, items and settings are disallowed. To create a new form and add items, you must first call forms.create to create an empty form with a title and (optional) document title, and then call forms.update to add the items.", + "flatPath": "v1/forms", + "httpMethod": "POST", + "id": "forms.forms.create", + "parameterOrder": [], + "parameters": {}, + "path": "v1/forms", + "request": { + "$ref": "Form" + }, + "response": { + "$ref": "Form" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file" + ] + }, + "get": { + "description": "Get a form.", + "flatPath": "v1/forms/{formId}", + "httpMethod": "GET", + "id": "forms.forms.get", + "parameterOrder": [ + "formId" + ], + "parameters": { + "formId": { + "description": "Required. The form ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/forms/{formId}", + "response": { + "$ref": "Form" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly" + ] + } + }, + "resources": { + "responses": { + "methods": { + "get": { + "description": "Get one response from the form.", + "flatPath": "v1/forms/{formId}/responses/{responseId}", + "httpMethod": "GET", + "id": "forms.forms.responses.get", + "parameterOrder": [ + "formId", + "responseId" + ], + "parameters": { + "formId": { + "description": "Required. The form ID.", + "location": "path", + "required": true, + "type": "string" + }, + "responseId": { + "description": "Required. The response ID within the form.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/forms/{formId}/responses/{responseId}", + "response": { + "$ref": "FormResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file" + ] + }, + "list": { + "description": "List a form's responses.", + "flatPath": "v1/forms/{formId}/responses", + "httpMethod": "GET", + "id": "forms.forms.responses.list", + "parameterOrder": [ + "formId" + ], + "parameters": { + "filter": { + "description": "Which form responses to return. Currently, the only supported filters are: * timestamp \u003e *N* which means to get all form responses submitted after (but not at) timestamp *N*. * timestamp \u003e= *N* which means to get all form responses submitted at and after timestamp *N*. For both supported filters, timestamp must be formatted in RFC3339 UTC \"Zulu\" format. Examples: \"2014-10-02T15:01:23Z\" and \"2014-10-02T15:01:23.045123456Z\".", + "location": "query", + "type": "string" + }, + "formId": { + "description": "Required. ID of the Form whose responses to list.", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of responses to return. The service may return fewer than this value. If unspecified or zero, at most 5000 responses are returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token returned by a previous list response. If this field is set, the form and the values of the filter must be the same as for the original request.", + "location": "query", + "type": "string" + } + }, + "path": "v1/forms/{formId}/responses", + "response": { + "$ref": "ListFormResponsesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file" + ] + } + } + }, + "watches": { + "methods": { + "create": { + "description": "Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per Watch.EventType. A watch expires seven days after it is created (see Watch.expire_time).", + "flatPath": "v1/forms/{formId}/watches", + "httpMethod": "POST", + "id": "forms.forms.watches.create", + "parameterOrder": [ + "formId" + ], + "parameters": { + "formId": { + "description": "Required. ID of the Form to watch.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/forms/{formId}/watches", + "request": { + "$ref": "CreateWatchRequest" + }, + "response": { + "$ref": "Watch" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "delete": { + "description": "Delete a watch.", + "flatPath": "v1/forms/{formId}/watches/{watchId}", + "httpMethod": "DELETE", + "id": "forms.forms.watches.delete", + "parameterOrder": [ + "formId", + "watchId" + ], + "parameters": { + "formId": { + "description": "Required. The ID of the Form.", + "location": "path", + "required": true, + "type": "string" + }, + "watchId": { + "description": "Required. The ID of the Watch to delete.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/forms/{formId}/watches/{watchId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "list": { + "description": "Return a list of the watches owned by the invoking project. The maximum number of watches is two: For each invoker, the limit is one for each event type per form.", + "flatPath": "v1/forms/{formId}/watches", + "httpMethod": "GET", + "id": "forms.forms.watches.list", + "parameterOrder": [ + "formId" + ], + "parameters": { + "formId": { + "description": "Required. ID of the Form whose watches to list.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/forms/{formId}/watches", + "response": { + "$ref": "ListWatchesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "renew": { + "description": "Renew an existing watch for seven days. The state of the watch after renewal is `ACTIVE`, and the `expire_time` is seven days from the renewal. Renewing a watch in an error state (e.g. `SUSPENDED`) succeeds if the error is no longer present, but fail otherwise. After a watch has expired, RenewWatch returns `NOT_FOUND`.", + "flatPath": "v1/forms/{formId}/watches/{watchId}:renew", + "httpMethod": "POST", + "id": "forms.forms.watches.renew", + "parameterOrder": [ + "formId", + "watchId" + ], + "parameters": { + "formId": { + "description": "Required. The ID of the Form.", + "location": "path", + "required": true, + "type": "string" + }, + "watchId": { + "description": "Required. The ID of the Watch to renew.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/forms/{formId}/watches/{watchId}:renew", + "request": { + "$ref": "RenewWatchRequest" + }, + "response": { + "$ref": "Watch" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly" + ] + } + } + } + } + } + }, + "revision": "20220308", + "rootUrl": "https://forms.googleapis.com/", + "schemas": { + "Answer": { + "description": "The submitted answer for a question.", + "id": "Answer", + "properties": { + "fileUploadAnswers": { + "$ref": "FileUploadAnswers", + "description": "Output only. The answers to a file upload question.", + "readOnly": true + }, + "grade": { + "$ref": "Grade", + "description": "Output only. The grade for the answer if the form was a quiz.", + "readOnly": true + }, + "questionId": { + "description": "Output only. The question's ID. See also Question.question_id.", + "readOnly": true, + "type": "string" + }, + "textAnswers": { + "$ref": "TextAnswers", + "description": "Output only. The specific answers as text.", + "readOnly": true + } + }, + "type": "object" + }, + "BatchUpdateFormRequest": { + "description": "A batch of updates to perform on a form. All the specified updates are made or none of them are.", + "id": "BatchUpdateFormRequest", + "properties": { + "includeFormInResponse": { + "description": "Whether to return an updated version of the model in the response.", + "type": "boolean" + }, + "requests": { + "description": "Required. The update requests of this batch.", + "items": { + "$ref": "Request" + }, + "type": "array" + }, + "writeControl": { + "$ref": "WriteControl", + "description": "Provides control over how write requests are executed." + } + }, + "type": "object" + }, + "BatchUpdateFormResponse": { + "description": "Response to a BatchUpdateFormRequest.", + "id": "BatchUpdateFormResponse", + "properties": { + "form": { + "$ref": "Form", + "description": "Based on the bool request field `include_form_in_response`, a form with all applied mutations/updates is returned or not. This may be later than the revision ID created by these changes." + }, + "replies": { + "description": "The reply of the updates. This maps 1:1 with the update requests, although replies to some requests may be empty.", + "items": { + "$ref": "Response" + }, + "type": "array" + }, + "writeControl": { + "$ref": "WriteControl", + "description": "The updated write control after applying the request." + } + }, + "type": "object" + }, + "ChoiceQuestion": { + "description": "A radio/checkbox/dropdown question.", + "id": "ChoiceQuestion", + "properties": { + "options": { + "description": "Required. List of options that a respondent must choose from.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, + "shuffle": { + "description": "Whether the options should be displayed in random order for different instances of the quiz. This is often used to prevent cheating by respondents who might be looking at another respondent's screen, or to address bias in a survey that might be introduced by always putting the same options first or last.", + "type": "boolean" + }, + "type": { + "description": "Required. The type of choice question.", + "enum": [ + "CHOICE_TYPE_UNSPECIFIED", + "RADIO", + "CHECKBOX", + "DROP_DOWN" + ], + "enumDescriptions": [ + "Default value. Unused.", + "Radio buttons: All choices are shown to the user, who can only pick one of them.", + "Checkboxes: All choices are shown to the user, who can pick any number of them.", + "Drop-down menu: The choices are only shown to the user on demand, otherwise only the current choice is shown. Only one option can be chosen." + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudPubsubTopic": { + "description": "A Pub/Sub topic.", + "id": "CloudPubsubTopic", + "properties": { + "topicName": { + "description": "Required. A fully qualified Pub/Sub topic name to publish the events to. This topic must be owned by the calling project and already exist in Pub/Sub.", + "type": "string" + } + }, + "type": "object" + }, + "CorrectAnswer": { + "description": "A single correct answer for a question. For multiple-valued (`CHECKBOX`) questions, several `CorrectAnswer`s may be needed to represent a single correct response option.", + "id": "CorrectAnswer", + "properties": { + "value": { + "description": "Required. The correct answer value. See the documentation for TextAnswer.value for details on how various value types are formatted.", + "type": "string" + } + }, + "type": "object" + }, + "CorrectAnswers": { + "description": "The answer key for a question.", + "id": "CorrectAnswers", + "properties": { + "answers": { + "description": "A list of correct answers. A quiz response can be automatically graded based on these answers. For single-valued questions, a response is marked correct if it matches any value in this list (in other words, multiple correct answers are possible). For multiple-valued (`CHECKBOX`) questions, a response is marked correct if it contains exactly the values in this list.", + "items": { + "$ref": "CorrectAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "CreateItemRequest": { + "description": "Create an item in a form.", + "id": "CreateItemRequest", + "properties": { + "item": { + "$ref": "Item", + "description": "Required. The item to create." + }, + "location": { + "$ref": "Location", + "description": "Required. Where to place the new item." + } + }, + "type": "object" + }, + "CreateItemResponse": { + "description": "The result of creating an item.", + "id": "CreateItemResponse", + "properties": { + "itemId": { + "description": "The ID of the created item.", + "type": "string" + }, + "questionId": { + "description": "The ID of the question created as part of this item, for a question group it lists IDs of all the questions created for this item.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CreateWatchRequest": { + "description": "Create a new watch.", + "id": "CreateWatchRequest", + "properties": { + "watch": { + "$ref": "Watch", + "description": "Required. The watch object. No ID should be set on this object; use `watch_id` instead." + }, + "watchId": { + "description": "The ID to use for the watch. If specified, the ID must not already be in use. If not specified, an ID is generated. This value should be 4-63 characters, and valid characters are /a-z-/.", + "type": "string" + } + }, + "type": "object" + }, + "DateQuestion": { + "description": "A date question. Date questions default to just month + day.", + "id": "DateQuestion", + "properties": { + "includeTime": { + "description": "Whether to include the time as part of the question.", + "type": "boolean" + }, + "includeYear": { + "description": "Whether to include the year as part of the question.", + "type": "boolean" + } + }, + "type": "object" + }, + "DeleteItemRequest": { + "description": "Delete an item in a form.", + "id": "DeleteItemRequest", + "properties": { + "location": { + "$ref": "Location", + "description": "Required. The location of the item to delete." + } + }, + "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: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "ExtraMaterial": { + "description": "Supplementary material to the feedback.", + "id": "ExtraMaterial", + "properties": { + "link": { + "$ref": "TextLink", + "description": "Text feedback." + }, + "video": { + "$ref": "VideoLink", + "description": "Video feedback." + } + }, + "type": "object" + }, + "Feedback": { + "description": "Feedback for a respondent about their response to a question.", + "id": "Feedback", + "properties": { + "material": { + "description": "Additional information provided as part of the feedback, often used to point the respondent to more reading and resources.", + "items": { + "$ref": "ExtraMaterial" + }, + "type": "array" + }, + "text": { + "description": "Required. The main text of the feedback.", + "type": "string" + } + }, + "type": "object" + }, + "FileUploadAnswer": { + "description": "Info for a single file submitted to a file upload question.", + "id": "FileUploadAnswer", + "properties": { + "fileId": { + "description": "Output only. The ID of the Google Drive file.", + "readOnly": true, + "type": "string" + }, + "fileName": { + "description": "Output only. The file name, as stored in Google Drive on upload.", + "readOnly": true, + "type": "string" + }, + "mimeType": { + "description": "Output only. The MIME type of the file, as stored in Google Drive on upload.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "FileUploadAnswers": { + "description": "All submitted files for a FileUpload question.", + "id": "FileUploadAnswers", + "properties": { + "answers": { + "description": "Output only. All submitted files for a FileUpload question.", + "items": { + "$ref": "FileUploadAnswer" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "FileUploadQuestion": { + "description": "A file upload question. The API currently does not support creating file upload questions.", + "id": "FileUploadQuestion", + "properties": { + "folderId": { + "description": "Required. The ID of the Drive folder where uploaded files are stored.", + "type": "string" + }, + "maxFileSize": { + "description": "Maximum number of bytes allowed for any single file uploaded to this question.", + "format": "int64", + "type": "string" + }, + "maxFiles": { + "description": "Maximum number of files that can be uploaded for this question in a single response.", + "format": "int32", + "type": "integer" + }, + "types": { + "description": "File types accepted by this question.", + "items": { + "enum": [ + "FILE_TYPE_UNSPECIFIED", + "ANY", + "DOCUMENT", + "PRESENTATION", + "SPREADSHEET", + "DRAWING", + "PDF", + "IMAGE", + "VIDEO", + "AUDIO" + ], + "enumDescriptions": [ + "Default value. Unused.", + "No restrictions on type.", + "A Google Docs document.", + "A Google Slides presentation.", + "A Google Sheets spreadsheet.", + "A drawing.", + "A PDF.", + "An image.", + "A video.", + "An audio file." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Form": { + "description": "A Google Forms document. A form is created in Drive, and deleting a form or changing its access protections is done via the [Drive API](https://developers.google.com/drive/api/v3/about-sdk).", + "id": "Form", + "properties": { + "formId": { + "description": "Output only. The form ID.", + "readOnly": true, + "type": "string" + }, + "info": { + "$ref": "Info", + "description": "Required. The title and description of the form." + }, + "items": { + "description": "Required. A list of the form's items, which can include section headers, questions, embedded media, etc.", + "items": { + "$ref": "Item" + }, + "type": "array" + }, + "linkedSheetId": { + "description": "Output only. The ID of the linked Google Sheet which is accumulating responses from this Form (if such a Sheet exists).", + "readOnly": true, + "type": "string" + }, + "responderUri": { + "description": "Output only. The form URI to share with responders. This opens a page that allows the user to submit responses but not edit the questions.", + "readOnly": true, + "type": "string" + }, + "revisionId": { + "description": "Output only. The revision ID of the form. Used in the WriteControl in update requests to identify the revision on which the changes are based. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the form has not changed. Conversely, a changed ID (for the same form and user) usually means the form has been updated; however, a changed ID can also be due to internal factors such as ID format changes.", + "readOnly": true, + "type": "string" + }, + "settings": { + "$ref": "FormSettings", + "description": "The form's settings. This must be updated with UpdateSettingsRequest; it is ignored during `forms.create` and UpdateFormInfoRequest." + } + }, + "type": "object" + }, + "FormResponse": { + "description": "A form response.", + "id": "FormResponse", + "properties": { + "answers": { + "additionalProperties": { + "$ref": "Answer" + }, + "description": "Output only. The actual answers to the questions, keyed by question_id.", + "readOnly": true, + "type": "object" + }, + "createTime": { + "description": "Output only. Timestamp for the first time the response was submitted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "formId": { + "description": "Output only. The form ID.", + "readOnly": true, + "type": "string" + }, + "lastSubmittedTime": { + "description": "Output only. Timestamp for the most recent time the response was submitted. Does not track changes to grades.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "respondentEmail": { + "description": "Output only. The email address (if collected) for the respondent.", + "readOnly": true, + "type": "string" + }, + "responseId": { + "description": "Output only. The response ID.", + "readOnly": true, + "type": "string" + }, + "totalScore": { + "description": "Output only. The total number of points the respondent received for their submission Only set if the form was a quiz and the response was graded. This includes points automatically awarded via autograding adjusted by any manual corrections entered by the form owner.", + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "FormSettings": { + "description": "A form's settings.", + "id": "FormSettings", + "properties": { + "quizSettings": { + "$ref": "QuizSettings", + "description": "Settings related to quiz forms and grading." + } + }, + "type": "object" + }, + "Grade": { + "description": "Grade information associated with a respondent's answer to a question.", + "id": "Grade", + "properties": { + "correct": { + "description": "Output only. Whether the question was answered correctly or not. A zero-point score is not enough to infer incorrectness, since a correctly answered question could be worth zero points.", + "readOnly": true, + "type": "boolean" + }, + "feedback": { + "$ref": "Feedback", + "description": "Output only. Additional feedback given for an answer.", + "readOnly": true + }, + "score": { + "description": "Output only. The numeric score awarded for the answer.", + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "Grading": { + "description": "Grading for a single question", + "id": "Grading", + "properties": { + "correctAnswers": { + "$ref": "CorrectAnswers", + "description": "Required. The answer key for the question. Responses are automatically graded based on this field." + }, + "generalFeedback": { + "$ref": "Feedback", + "description": "The feedback displayed for all answers. This is commonly used for short answer questions when a quiz owner wants to quickly give respondents some sense of whether they answered the question correctly before they've had a chance to officially grade the response. General feedback cannot be set for automatically graded multiple choice questions." + }, + "pointValue": { + "description": "Required. The maximum number of points a respondent can automatically get for a correct answer. This must not be negative.", + "format": "int32", + "type": "integer" + }, + "whenRight": { + "$ref": "Feedback", + "description": "The feedback displayed for correct responses. This feedback can only be set for multiple choice questions that have correct answers provided." + }, + "whenWrong": { + "$ref": "Feedback", + "description": "The feedback displayed for incorrect responses. This feedback can only be set for multiple choice questions that have correct answers provided." + } + }, + "type": "object" + }, + "Grid": { + "description": "A grid of choices (radio or check boxes) with each row constituting a separate question. Each row has the same choices, which are shown as the columns.", + "id": "Grid", + "properties": { + "columns": { + "$ref": "ChoiceQuestion", + "description": "Required. The choices shared by each question in the grid. In other words, the values of the columns. Only `CHECK_BOX` and `RADIO` choices are allowed." + }, + "shuffleQuestions": { + "description": "If `true`, the questions are randomly ordered. In other words, the rows appear in a different order for every respondent.", + "type": "boolean" + } + }, + "type": "object" + }, + "Image": { + "description": "Data representing an image.", + "id": "Image", + "properties": { + "altText": { + "description": "A description of the image that is shown on hover and read by screenreaders.", + "type": "string" + }, + "contentUri": { + "description": "Output only. A URI from which you can download the image; this is valid only for a limited time.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "MediaProperties", + "description": "Properties of an image." + }, + "sourceUri": { + "description": "Input only. The source URI is the URI used to insert the image. The source URI can be empty when fetched.", + "type": "string" + } + }, + "type": "object" + }, + "ImageItem": { + "description": "An item containing an image.", + "id": "ImageItem", + "properties": { + "image": { + "$ref": "Image", + "description": "Required. The image displayed in the item." + } + }, + "type": "object" + }, + "Info": { + "description": "The general information for a form.", + "id": "Info", + "properties": { + "description": { + "description": "The description of the form.", + "type": "string" + }, + "documentTitle": { + "description": "Output only. The title of the document which is visible in Drive. If `Info.title` is empty, `document_title` may appear in its place in the Google Forms UI and be visible to responders. `document_title` can be set on create, but cannot be modified by a batchUpdate request. Please use the [Google Drive API](https://developers.google.com/drive/api/v3/reference/files/update) if you need to programmatically update `document_title`.", + "readOnly": true, + "type": "string" + }, + "title": { + "description": "Required. The title of the form which is visible to responders.", + "type": "string" + } + }, + "type": "object" + }, + "Item": { + "description": "A single item of the form. `kind` defines which kind of item it is.", + "id": "Item", + "properties": { + "description": { + "description": "The description of the item.", + "type": "string" + }, + "imageItem": { + "$ref": "ImageItem", + "description": "Displays an image on the page." + }, + "itemId": { + "description": "The item ID. On creation, it can be provided but the ID must not be already used in the form. If not provided, a new ID is assigned.", + "type": "string" + }, + "pageBreakItem": { + "$ref": "PageBreakItem", + "description": "Starts a new page with a title." + }, + "questionGroupItem": { + "$ref": "QuestionGroupItem", + "description": "Poses one or more questions to the user with a single major prompt." + }, + "questionItem": { + "$ref": "QuestionItem", + "description": "Poses a question to the user." + }, + "textItem": { + "$ref": "TextItem", + "description": "Displays a title and description on the page." + }, + "title": { + "description": "The title of the item.", + "type": "string" + }, + "videoItem": { + "$ref": "VideoItem", + "description": "Displays a video on the page." + } + }, + "type": "object" + }, + "ListFormResponsesResponse": { + "description": "Response to a ListFormResponsesRequest.", + "id": "ListFormResponsesResponse", + "properties": { + "nextPageToken": { + "description": "If set, there are more responses. To get the next page of responses, provide this as `page_token` in a future request.", + "type": "string" + }, + "responses": { + "description": "The returned responses.", + "items": { + "$ref": "FormResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWatchesResponse": { + "description": "The response of a ListWatchesRequest.", + "id": "ListWatchesResponse", + "properties": { + "watches": { + "description": "The returned watches.", + "items": { + "$ref": "Watch" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A specific location in a form.", + "id": "Location", + "properties": { + "index": { + "description": "The index of an item in the form. This must be in the range [0..*N*), where *N* is the number of items in the form.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "MediaProperties": { + "description": "Properties of the media.", + "id": "MediaProperties", + "properties": { + "alignment": { + "description": "Position of the media.", + "enum": [ + "ALIGNMENT_UNSPECIFIED", + "LEFT", + "RIGHT", + "CENTER" + ], + "enumDescriptions": [ + "Default value. Unused.", + "Left align.", + "Right align.", + "Center." + ], + "type": "string" + }, + "width": { + "description": "The width of the media in pixels. When the media is displayed, it is scaled to the smaller of this value or the width of the displayed form. The original aspect ratio of the media is preserved. If a width is not specified when the media is added to the form, it is set to the width of the media source. Width must be between 0 and 740, inclusive. Setting width to 0 or unspecified is only permitted when updating the media source.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "MoveItemRequest": { + "description": "Move an item in a form.", + "id": "MoveItemRequest", + "properties": { + "newLocation": { + "$ref": "Location", + "description": "Required. The new location for the item." + }, + "originalLocation": { + "$ref": "Location", + "description": "Required. The location of the item to move." + } + }, + "type": "object" + }, + "Option": { + "description": "An option for a Choice question.", + "id": "Option", + "properties": { + "goToAction": { + "description": "Section navigation type.", + "enum": [ + "GO_TO_ACTION_UNSPECIFIED", + "NEXT_SECTION", + "RESTART_FORM", + "SUBMIT_FORM" + ], + "enumDescriptions": [ + "Default value. Unused.", + "Go to the next section.", + "Go back to the beginning of the form.", + "Submit form immediately." + ], + "type": "string" + }, + "goToSectionId": { + "description": "Item ID of section header to go to.", + "type": "string" + }, + "image": { + "$ref": "Image", + "description": "Display image as an option." + }, + "isOther": { + "description": "Whether the option is \"other\". Currently only applies to `RADIO` and `CHECKBOX` choice types, but is not allowed in a QuestionGroupItem.", + "type": "boolean" + }, + "value": { + "description": "Required. The choice as presented to the user.", + "type": "string" + } + }, + "type": "object" + }, + "PageBreakItem": { + "description": "A page break. The title and description of this item are shown at the top of the new page.", + "id": "PageBreakItem", + "properties": {}, + "type": "object" + }, + "Question": { + "description": "Any question. The specific type of question is known by its `kind`.", + "id": "Question", + "properties": { + "choiceQuestion": { + "$ref": "ChoiceQuestion", + "description": "A respondent can choose from a pre-defined set of options." + }, + "dateQuestion": { + "$ref": "DateQuestion", + "description": "A respondent can enter a date." + }, + "fileUploadQuestion": { + "$ref": "FileUploadQuestion", + "description": "A respondent can upload one or more files." + }, + "grading": { + "$ref": "Grading", + "description": "Grading setup for the question." + }, + "questionId": { + "description": "Read only. The question ID. On creation, it can be provided but the ID must not be already used in the form. If not provided, a new ID is assigned.", + "type": "string" + }, + "required": { + "description": "Whether the question must be answered in order for a respondent to submit their response.", + "type": "boolean" + }, + "rowQuestion": { + "$ref": "RowQuestion", + "description": "A row of a QuestionGroupItem." + }, + "scaleQuestion": { + "$ref": "ScaleQuestion", + "description": "A respondent can choose a number from a range." + }, + "textQuestion": { + "$ref": "TextQuestion", + "description": "A respondent can enter a free text response." + }, + "timeQuestion": { + "$ref": "TimeQuestion", + "description": "A respondent can enter a time." + } + }, + "type": "object" + }, + "QuestionGroupItem": { + "description": "Defines a question that comprises multiple questions grouped together.", + "id": "QuestionGroupItem", + "properties": { + "grid": { + "$ref": "Grid", + "description": "The question group is a grid with rows of multiple choice questions that share the same options. When `grid` is set, all questions in the group must be of kind `row`." + }, + "image": { + "$ref": "Image", + "description": "The image displayed within the question group above the specific questions." + }, + "questions": { + "description": "Required. A list of questions that belong in this question group. A question must only belong to one group. The `kind` of the group may affect what types of questions are allowed.", + "items": { + "$ref": "Question" + }, + "type": "array" + } + }, + "type": "object" + }, + "QuestionItem": { + "description": "A form item containing a single question.", + "id": "QuestionItem", + "properties": { + "image": { + "$ref": "Image", + "description": "The image displayed within the question." + }, + "question": { + "$ref": "Question", + "description": "Required. The displayed question." + } + }, + "type": "object" + }, + "QuizSettings": { + "description": "Settings related to quiz forms and grading. These must be updated with the UpdateSettingsRequest.", + "id": "QuizSettings", + "properties": { + "isQuiz": { + "description": "Whether this form is a quiz or not. When true, responses are graded based on question Grading. Upon setting to false, all question Grading is deleted.", + "type": "boolean" + } + }, + "type": "object" + }, + "RenewWatchRequest": { + "description": "Renew an existing Watch for seven days.", + "id": "RenewWatchRequest", + "properties": {}, + "type": "object" + }, + "Request": { + "description": "The kinds of update requests that can be made.", + "id": "Request", + "properties": { + "createItem": { + "$ref": "CreateItemRequest", + "description": "Create a new item." + }, + "deleteItem": { + "$ref": "DeleteItemRequest", + "description": "Delete an item." + }, + "moveItem": { + "$ref": "MoveItemRequest", + "description": "Move an item to a specified location." + }, + "updateFormInfo": { + "$ref": "UpdateFormInfoRequest", + "description": "Update Form's Info." + }, + "updateItem": { + "$ref": "UpdateItemRequest", + "description": "Update an item." + }, + "updateSettings": { + "$ref": "UpdateSettingsRequest", + "description": "Updates the Form's settings." + } + }, + "type": "object" + }, + "Response": { + "description": "A single response from an update.", + "id": "Response", + "properties": { + "createItem": { + "$ref": "CreateItemResponse", + "description": "The result of creating an item." + } + }, + "type": "object" + }, + "RowQuestion": { + "description": "Configuration for a question that is part of a question group.", + "id": "RowQuestion", + "properties": { + "title": { + "description": "Required. The title for the single row in the QuestionGroupItem.", + "type": "string" + } + }, + "type": "object" + }, + "ScaleQuestion": { + "description": "A scale question. The user has a range of numeric values to choose from.", + "id": "ScaleQuestion", + "properties": { + "high": { + "description": "Required. The highest possible value for the scale.", + "format": "int32", + "type": "integer" + }, + "highLabel": { + "description": "The label to display describing the highest point on the scale.", + "type": "string" + }, + "low": { + "description": "Required. The lowest possible value for the scale.", + "format": "int32", + "type": "integer" + }, + "lowLabel": { + "description": "The label to display describing the lowest point on the scale.", + "type": "string" + } + }, + "type": "object" + }, + "TextAnswer": { + "description": "An answer to a question represented as text.", + "id": "TextAnswer", + "properties": { + "value": { + "description": "Output only. The answer value. Formatting used for different kinds of question: * ChoiceQuestion * `RADIO` or `DROP_DOWN`: A single string corresponding to the option that was selected. * `CHECKBOX`: Multiple strings corresponding to each option that was selected. * TextQuestion: The text that the user entered. * ScaleQuestion: A string containing the number that was selected. * DateQuestion * Without time or year: MM-DD e.g. \"05-19\" * With year: YYYY-MM-DD e.g. \"1986-05-19\" * With time: MM-DD HH:MM e.g. \"05-19 14:51\" * With year and time: YYYY-MM-DD HH:MM e.g. \"1986-05-19 14:51\" * TimeQuestion: String with time or duration in HH:MM format e.g. \"14:51\" * RowQuestion within QuestionGroupItem: The answer for each row of a QuestionGroupItem is represented as a separate Answer. Each will contain one string for `RADIO`-type choices or multiple strings for `CHECKBOX` choices.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "TextAnswers": { + "description": "A question's answers as text.", + "id": "TextAnswers", + "properties": { + "answers": { + "description": "Output only. Answers to a question. For multiple-value ChoiceQuestions, each answer is a separate value.", + "items": { + "$ref": "TextAnswer" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "TextItem": { + "description": "A text item.", + "id": "TextItem", + "properties": {}, + "type": "object" + }, + "TextLink": { + "description": "Link for text.", + "id": "TextLink", + "properties": { + "displayText": { + "description": "Required. Display text for the URI.", + "type": "string" + }, + "uri": { + "description": "Required. The URI.", + "type": "string" + } + }, + "type": "object" + }, + "TextQuestion": { + "description": "A text-based question.", + "id": "TextQuestion", + "properties": { + "paragraph": { + "description": "Whether the question is a paragraph question or not. If not, the question is a short text question.", + "type": "boolean" + } + }, + "type": "object" + }, + "TimeQuestion": { + "description": "A time question.", + "id": "TimeQuestion", + "properties": { + "duration": { + "description": "`true` if the question is about an elapsed time. Otherwise it is about a time of day.", + "type": "boolean" + } + }, + "type": "object" + }, + "UpdateFormInfoRequest": { + "description": "Update Form's Info.", + "id": "UpdateFormInfoRequest", + "properties": { + "info": { + "$ref": "Info", + "description": "The info to update." + }, + "updateMask": { + "description": "Required. Only values named in this mask are changed. At least one field must be specified. The root `info` is implied and should not be specified. A single `\"*\"` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "UpdateItemRequest": { + "description": "Update an item in a form.", + "id": "UpdateItemRequest", + "properties": { + "item": { + "$ref": "Item", + "description": "Required. New values for the item. Note that item and question IDs are used if they are provided (and are in the field mask). If an ID is blank (and in the field mask) a new ID is generated. This means you can modify an item by getting the form via forms.get, modifying your local copy of that item to be how you want it, and using UpdateItemRequest to write it back, with the IDs being the same (or not in the field mask)." + }, + "location": { + "$ref": "Location", + "description": "Required. The location identifying the item to update." + }, + "updateMask": { + "description": "Required. Only values named in this mask are changed.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "UpdateSettingsRequest": { + "description": "Update Form's FormSettings.", + "id": "UpdateSettingsRequest", + "properties": { + "settings": { + "$ref": "FormSettings", + "description": "Required. The settings to update with." + }, + "updateMask": { + "description": "Required. Only values named in this mask are changed. At least one field must be specified. The root `settings` is implied and should not be specified. A single `\"*\"` can be used as short-hand for updating every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Video": { + "description": "Data representing a video.", + "id": "Video", + "properties": { + "properties": { + "$ref": "MediaProperties", + "description": "Properties of a video." + }, + "youtubeUri": { + "description": "Required. A YouTube URI.", + "type": "string" + } + }, + "type": "object" + }, + "VideoItem": { + "description": "An item containing a video.", + "id": "VideoItem", + "properties": { + "caption": { + "description": "The text displayed below the video.", + "type": "string" + }, + "video": { + "$ref": "Video", + "description": "Required. The video displayed in the item." + } + }, + "type": "object" + }, + "VideoLink": { + "description": "Link to a video.", + "id": "VideoLink", + "properties": { + "displayText": { + "description": "Required. The display text for the link.", + "type": "string" + }, + "youtubeUri": { + "description": "The URI of a YouTube video.", + "type": "string" + } + }, + "type": "object" + }, + "Watch": { + "description": "A watch for events for a form. When the designated event happens, a notification will be published to the specified target. The notification's attributes will include a `formId` key that has the ID of the watched form and an `eventType` key that has the string of the type. Messages are sent with at-least-once delivery and are only dropped in extraordinary circumstances. Typically all notifications should be reliably delivered within a few seconds; however, in some situations notifications may be delayed. A watch expires seven days after it is created unless it is renewed with watches.renew", + "id": "Watch", + "properties": { + "createTime": { + "description": "Output only. Timestamp of when this was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "errorType": { + "description": "Output only. The most recent error type for an attempted delivery. To begin watching the form again a call can be made to watches.renew which also clears this error information.", + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "PROJECT_NOT_AUTHORIZED", + "NO_USER_ACCESS", + "OTHER_ERRORS" + ], + "enumDescriptions": [ + "Unspecified error type.", + "The cloud project does not have access to the form being watched. This occurs if the user has revoked the authorization for your project to access their form(s). Watches with this error will not be retried. To attempt to begin watching the form again a call can be made to watches.renew", + "The user that granted access no longer has access to the form being watched. Watches with this error will not be retried. To attempt to begin watching the form again a call can be made to watches.renew", + "Another type of error has occurred. Whether notifications will continue depends on the watch state." + ], + "readOnly": true, + "type": "string" + }, + "eventType": { + "description": "Required. Which event type to watch for.", + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "SCHEMA", + "RESPONSES" + ], + "enumDescriptions": [ + "Unspecified event type. This value should not be used.", + "The schema event type. A watch with this event type will be notified about changes to form content and settings.", + "The responses event type. A watch with this event type will be notified when form responses are submitted." + ], + "type": "string" + }, + "expireTime": { + "description": "Output only. Timestamp for when this will expire. Each watches.renew call resets this to seven days in the future.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "id": { + "description": "Output only. The ID of this watch. See notes on CreateWatchRequest.watch_id.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the watch. Additional details about suspended watches can be found by checking the `error_type`.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "SUSPENDED" + ], + "enumDescriptions": [ + "Unspecified state.", + "Watch is active.", + "The watch is suspended due to an error that may be resolved. The watch will continue to exist until it expires. To attempt to reactivate the watch a call can be made to watches.renew" + ], + "readOnly": true, + "type": "string" + }, + "target": { + "$ref": "WatchTarget", + "description": "Required. Where to send the notification." + } + }, + "type": "object" + }, + "WatchTarget": { + "description": "The target for notification delivery.", + "id": "WatchTarget", + "properties": { + "topic": { + "$ref": "CloudPubsubTopic", + "description": "A Pub/Sub topic. To receive notifications, the topic must grant publish privileges to the Forms service account `serviceAccount:forms-notifications@system.gserviceaccount.com`. Only the project that owns a topic may create a watch with it. Pub/Sub delivery guarantees should be considered." + } + }, + "type": "object" + }, + "WriteControl": { + "description": "Provides control over how write requests are executed.", + "id": "WriteControl", + "properties": { + "requiredRevisionId": { + "description": "The revision ID of the form that the write request is applied to. If this is not the latest revision of the form, the request is not processed and returns a 400 bad request error.", + "type": "string" + }, + "targetRevisionId": { + "description": "The target revision ID of the form that the write request is applied to. If changes have occurred after this revision, the changes in this update request are transformed against those changes. This results in a new revision of the form that incorporates both the changes in the request and the intervening changes, with the server resolving conflicting changes. The target revision ID may only be used to write to recent versions of a form. If the target revision is too far behind the latest revision, the request is not processed and returns a 400 (Bad Request Error). The request may be retried after reading the latest version of the form. In most cases a target revision ID remains valid for several minutes after it is read, but for frequently-edited forms this window may be shorter.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Google Forms API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/forms/v1/forms-gen.go b/forms/v1/forms-gen.go new file mode 100644 index 00000000000..e9c027d1930 --- /dev/null +++ b/forms/v1/forms-gen.go @@ -0,0 +1,3726 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package forms provides access to the Google Forms API. +// +// For product documentation, see: https://developers.google.com/forms/api +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/forms/v1" +// ... +// ctx := context.Background() +// formsService, err := forms.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// formsService, err := forms.NewService(ctx, option.WithScopes(forms.DriveReadonlyScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// formsService, err := forms.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// formsService, err := forms.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package forms // import "google.golang.org/api/forms/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// 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 _ = internaloption.WithDefaultEndpoint + +const apiId = "forms:v1" +const apiName = "forms" +const apiVersion = "v1" +const basePath = "https://forms.googleapis.com/" +const mtlsBasePath = "https://forms.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, create, and delete all of your Google Drive files + DriveScope = "https://www.googleapis.com/auth/drive" + + // See, edit, create, and delete only the specific Google Drive files + // you use with this app + DriveFileScope = "https://www.googleapis.com/auth/drive.file" + + // See and download all your Google Drive files + DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Forms = NewFormsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Forms *FormsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewFormsService(s *Service) *FormsService { + rs := &FormsService{s: s} + rs.Responses = NewFormsResponsesService(s) + rs.Watches = NewFormsWatchesService(s) + return rs +} + +type FormsService struct { + s *Service + + Responses *FormsResponsesService + + Watches *FormsWatchesService +} + +func NewFormsResponsesService(s *Service) *FormsResponsesService { + rs := &FormsResponsesService{s: s} + return rs +} + +type FormsResponsesService struct { + s *Service +} + +func NewFormsWatchesService(s *Service) *FormsWatchesService { + rs := &FormsWatchesService{s: s} + return rs +} + +type FormsWatchesService struct { + s *Service +} + +// Answer: The submitted answer for a question. +type Answer struct { + // FileUploadAnswers: Output only. The answers to a file upload + // question. + FileUploadAnswers *FileUploadAnswers `json:"fileUploadAnswers,omitempty"` + + // Grade: Output only. The grade for the answer if the form was a quiz. + Grade *Grade `json:"grade,omitempty"` + + // QuestionId: Output only. The question's ID. See also + // Question.question_id. + QuestionId string `json:"questionId,omitempty"` + + // TextAnswers: Output only. The specific answers as text. + TextAnswers *TextAnswers `json:"textAnswers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileUploadAnswers") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FileUploadAnswers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Answer) MarshalJSON() ([]byte, error) { + type NoMethod Answer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchUpdateFormRequest: A batch of updates to perform on a form. All +// the specified updates are made or none of them are. +type BatchUpdateFormRequest struct { + // IncludeFormInResponse: Whether to return an updated version of the + // model in the response. + IncludeFormInResponse bool `json:"includeFormInResponse,omitempty"` + + // Requests: Required. The update requests of this batch. + Requests []*Request `json:"requests,omitempty"` + + // WriteControl: Provides control over how write requests are executed. + WriteControl *WriteControl `json:"writeControl,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "IncludeFormInResponse") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IncludeFormInResponse") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BatchUpdateFormRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchUpdateFormRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchUpdateFormResponse: Response to a BatchUpdateFormRequest. +type BatchUpdateFormResponse struct { + // Form: Based on the bool request field `include_form_in_response`, a + // form with all applied mutations/updates is returned or not. This may + // be later than the revision ID created by these changes. + Form *Form `json:"form,omitempty"` + + // Replies: The reply of the updates. This maps 1:1 with the update + // requests, although replies to some requests may be empty. + Replies []*Response `json:"replies,omitempty"` + + // WriteControl: The updated write control after applying the request. + WriteControl *WriteControl `json:"writeControl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Form") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Form") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchUpdateFormResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchUpdateFormResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ChoiceQuestion: A radio/checkbox/dropdown question. +type ChoiceQuestion struct { + // Options: Required. List of options that a respondent must choose + // from. + Options []*Option `json:"options,omitempty"` + + // Shuffle: Whether the options should be displayed in random order for + // different instances of the quiz. This is often used to prevent + // cheating by respondents who might be looking at another respondent's + // screen, or to address bias in a survey that might be introduced by + // always putting the same options first or last. + Shuffle bool `json:"shuffle,omitempty"` + + // Type: Required. The type of choice question. + // + // Possible values: + // "CHOICE_TYPE_UNSPECIFIED" - Default value. Unused. + // "RADIO" - Radio buttons: All choices are shown to the user, who can + // only pick one of them. + // "CHECKBOX" - Checkboxes: All choices are shown to the user, who can + // pick any number of them. + // "DROP_DOWN" - Drop-down menu: The choices are only shown to the + // user on demand, otherwise only the current choice is shown. Only one + // option can be chosen. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Options") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Options") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChoiceQuestion) MarshalJSON() ([]byte, error) { + type NoMethod ChoiceQuestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudPubsubTopic: A Pub/Sub topic. +type CloudPubsubTopic struct { + // TopicName: Required. A fully qualified Pub/Sub topic name to publish + // the events to. This topic must be owned by the calling project and + // already exist in Pub/Sub. + TopicName string `json:"topicName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TopicName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TopicName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudPubsubTopic) MarshalJSON() ([]byte, error) { + type NoMethod CloudPubsubTopic + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CorrectAnswer: A single correct answer for a question. For +// multiple-valued (`CHECKBOX`) questions, several `CorrectAnswer`s may +// be needed to represent a single correct response option. +type CorrectAnswer struct { + // Value: Required. The correct answer value. See the documentation for + // TextAnswer.value for details on how various value types are + // formatted. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CorrectAnswer) MarshalJSON() ([]byte, error) { + type NoMethod CorrectAnswer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CorrectAnswers: The answer key for a question. +type CorrectAnswers struct { + // Answers: A list of correct answers. A quiz response can be + // automatically graded based on these answers. For single-valued + // questions, a response is marked correct if it matches any value in + // this list (in other words, multiple correct answers are possible). + // For multiple-valued (`CHECKBOX`) questions, a response is marked + // correct if it contains exactly the values in this list. + Answers []*CorrectAnswer `json:"answers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Answers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CorrectAnswers) MarshalJSON() ([]byte, error) { + type NoMethod CorrectAnswers + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateItemRequest: Create an item in a form. +type CreateItemRequest struct { + // Item: Required. The item to create. + Item *Item `json:"item,omitempty"` + + // Location: Required. Where to place the new item. + Location *Location `json:"location,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Item") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Item") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateItemRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreateItemRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateItemResponse: The result of creating an item. +type CreateItemResponse struct { + // ItemId: The ID of the created item. + ItemId string `json:"itemId,omitempty"` + + // QuestionId: The ID of the question created as part of this item, for + // a question group it lists IDs of all the questions created for this + // item. + QuestionId []string `json:"questionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ItemId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ItemId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateItemResponse) MarshalJSON() ([]byte, error) { + type NoMethod CreateItemResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateWatchRequest: Create a new watch. +type CreateWatchRequest struct { + // Watch: Required. The watch object. No ID should be set on this + // object; use `watch_id` instead. + Watch *Watch `json:"watch,omitempty"` + + // WatchId: The ID to use for the watch. If specified, the ID must not + // already be in use. If not specified, an ID is generated. This value + // should be 4-63 characters, and valid characters are /a-z-/. + WatchId string `json:"watchId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Watch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Watch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateWatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreateWatchRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DateQuestion: A date question. Date questions default to just month + +// day. +type DateQuestion struct { + // IncludeTime: Whether to include the time as part of the question. + IncludeTime bool `json:"includeTime,omitempty"` + + // IncludeYear: Whether to include the year as part of the question. + IncludeYear bool `json:"includeYear,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IncludeTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IncludeTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DateQuestion) MarshalJSON() ([]byte, error) { + type NoMethod DateQuestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeleteItemRequest: Delete an item in a form. +type DeleteItemRequest struct { + // Location: Required. The location of the item to delete. + Location *Location `json:"location,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *DeleteItemRequest) MarshalJSON() ([]byte, error) { + type NoMethod DeleteItemRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } The JSON representation for `Empty` is +// empty JSON object `{}`. +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// ExtraMaterial: Supplementary material to the feedback. +type ExtraMaterial struct { + // Link: Text feedback. + Link *TextLink `json:"link,omitempty"` + + // Video: Video feedback. + Video *VideoLink `json:"video,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Link") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Link") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExtraMaterial) MarshalJSON() ([]byte, error) { + type NoMethod ExtraMaterial + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Feedback: Feedback for a respondent about their response to a +// question. +type Feedback struct { + // Material: Additional information provided as part of the feedback, + // often used to point the respondent to more reading and resources. + Material []*ExtraMaterial `json:"material,omitempty"` + + // Text: Required. The main text of the feedback. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Material") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Material") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Feedback) MarshalJSON() ([]byte, error) { + type NoMethod Feedback + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FileUploadAnswer: Info for a single file submitted to a file upload +// question. +type FileUploadAnswer struct { + // FileId: Output only. The ID of the Google Drive file. + FileId string `json:"fileId,omitempty"` + + // FileName: Output only. The file name, as stored in Google Drive on + // upload. + FileName string `json:"fileName,omitempty"` + + // MimeType: Output only. The MIME type of the file, as stored in Google + // Drive on upload. + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FileId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileUploadAnswer) MarshalJSON() ([]byte, error) { + type NoMethod FileUploadAnswer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FileUploadAnswers: All submitted files for a FileUpload question. +type FileUploadAnswers struct { + // Answers: Output only. All submitted files for a FileUpload question. + Answers []*FileUploadAnswer `json:"answers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Answers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileUploadAnswers) MarshalJSON() ([]byte, error) { + type NoMethod FileUploadAnswers + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FileUploadQuestion: A file upload question. The API currently does +// not support creating file upload questions. +type FileUploadQuestion struct { + // FolderId: Required. The ID of the Drive folder where uploaded files + // are stored. + FolderId string `json:"folderId,omitempty"` + + // MaxFileSize: Maximum number of bytes allowed for any single file + // uploaded to this question. + MaxFileSize int64 `json:"maxFileSize,omitempty,string"` + + // MaxFiles: Maximum number of files that can be uploaded for this + // question in a single response. + MaxFiles int64 `json:"maxFiles,omitempty"` + + // Types: File types accepted by this question. + // + // Possible values: + // "FILE_TYPE_UNSPECIFIED" - Default value. Unused. + // "ANY" - No restrictions on type. + // "DOCUMENT" - A Google Docs document. + // "PRESENTATION" - A Google Slides presentation. + // "SPREADSHEET" - A Google Sheets spreadsheet. + // "DRAWING" - A drawing. + // "PDF" - A PDF. + // "IMAGE" - An image. + // "VIDEO" - A video. + // "AUDIO" - An audio file. + Types []string `json:"types,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FolderId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FolderId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileUploadQuestion) MarshalJSON() ([]byte, error) { + type NoMethod FileUploadQuestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Form: A Google Forms document. A form is created in Drive, and +// deleting a form or changing its access protections is done via the +// Drive API (https://developers.google.com/drive/api/v3/about-sdk). +type Form struct { + // FormId: Output only. The form ID. + FormId string `json:"formId,omitempty"` + + // Info: Required. The title and description of the form. + Info *Info `json:"info,omitempty"` + + // Items: Required. A list of the form's items, which can include + // section headers, questions, embedded media, etc. + Items []*Item `json:"items,omitempty"` + + // LinkedSheetId: Output only. The ID of the linked Google Sheet which + // is accumulating responses from this Form (if such a Sheet exists). + LinkedSheetId string `json:"linkedSheetId,omitempty"` + + // ResponderUri: Output only. The form URI to share with responders. + // This opens a page that allows the user to submit responses but not + // edit the questions. + ResponderUri string `json:"responderUri,omitempty"` + + // RevisionId: Output only. The revision ID of the form. Used in the + // WriteControl in update requests to identify the revision on which the + // changes are based. The format of the revision ID may change over + // time, so it should be treated opaquely. A returned revision ID is + // only guaranteed to be valid for 24 hours after it has been returned + // and cannot be shared across users. If the revision ID is unchanged + // between calls, then the form has not changed. Conversely, a changed + // ID (for the same form and user) usually means the form has been + // updated; however, a changed ID can also be due to internal factors + // such as ID format changes. + RevisionId string `json:"revisionId,omitempty"` + + // Settings: The form's settings. This must be updated with + // UpdateSettingsRequest; it is ignored during `forms.create` and + // UpdateFormInfoRequest. + Settings *FormSettings `json:"settings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FormId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FormId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Form) MarshalJSON() ([]byte, error) { + type NoMethod Form + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FormResponse: A form response. +type FormResponse struct { + // Answers: Output only. The actual answers to the questions, keyed by + // question_id. + Answers map[string]Answer `json:"answers,omitempty"` + + // CreateTime: Output only. Timestamp for the first time the response + // was submitted. + CreateTime string `json:"createTime,omitempty"` + + // FormId: Output only. The form ID. + FormId string `json:"formId,omitempty"` + + // LastSubmittedTime: Output only. Timestamp for the most recent time + // the response was submitted. Does not track changes to grades. + LastSubmittedTime string `json:"lastSubmittedTime,omitempty"` + + // RespondentEmail: Output only. The email address (if collected) for + // the respondent. + RespondentEmail string `json:"respondentEmail,omitempty"` + + // ResponseId: Output only. The response ID. + ResponseId string `json:"responseId,omitempty"` + + // TotalScore: Output only. The total number of points the respondent + // received for their submission Only set if the form was a quiz and the + // response was graded. This includes points automatically awarded via + // autograding adjusted by any manual corrections entered by the form + // owner. + TotalScore float64 `json:"totalScore,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Answers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FormResponse) MarshalJSON() ([]byte, error) { + type NoMethod FormResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *FormResponse) UnmarshalJSON(data []byte) error { + type NoMethod FormResponse + var s1 struct { + TotalScore gensupport.JSONFloat64 `json:"totalScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.TotalScore = float64(s1.TotalScore) + return nil +} + +// FormSettings: A form's settings. +type FormSettings struct { + // QuizSettings: Settings related to quiz forms and grading. + QuizSettings *QuizSettings `json:"quizSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QuizSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "QuizSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FormSettings) MarshalJSON() ([]byte, error) { + type NoMethod FormSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Grade: Grade information associated with a respondent's answer to a +// question. +type Grade struct { + // Correct: Output only. Whether the question was answered correctly or + // not. A zero-point score is not enough to infer incorrectness, since a + // correctly answered question could be worth zero points. + Correct bool `json:"correct,omitempty"` + + // Feedback: Output only. Additional feedback given for an answer. + Feedback *Feedback `json:"feedback,omitempty"` + + // Score: Output only. The numeric score awarded for the answer. + Score float64 `json:"score,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Correct") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Correct") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Grade) MarshalJSON() ([]byte, error) { + type NoMethod Grade + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *Grade) UnmarshalJSON(data []byte) error { + type NoMethod Grade + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// Grading: Grading for a single question +type Grading struct { + // CorrectAnswers: Required. The answer key for the question. Responses + // are automatically graded based on this field. + CorrectAnswers *CorrectAnswers `json:"correctAnswers,omitempty"` + + // GeneralFeedback: The feedback displayed for all answers. This is + // commonly used for short answer questions when a quiz owner wants to + // quickly give respondents some sense of whether they answered the + // question correctly before they've had a chance to officially grade + // the response. General feedback cannot be set for automatically graded + // multiple choice questions. + GeneralFeedback *Feedback `json:"generalFeedback,omitempty"` + + // PointValue: Required. The maximum number of points a respondent can + // automatically get for a correct answer. This must not be negative. + PointValue int64 `json:"pointValue,omitempty"` + + // WhenRight: The feedback displayed for correct responses. This + // feedback can only be set for multiple choice questions that have + // correct answers provided. + WhenRight *Feedback `json:"whenRight,omitempty"` + + // WhenWrong: The feedback displayed for incorrect responses. This + // feedback can only be set for multiple choice questions that have + // correct answers provided. + WhenWrong *Feedback `json:"whenWrong,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CorrectAnswers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CorrectAnswers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Grading) MarshalJSON() ([]byte, error) { + type NoMethod Grading + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Grid: A grid of choices (radio or check boxes) with each row +// constituting a separate question. Each row has the same choices, +// which are shown as the columns. +type Grid struct { + // Columns: Required. The choices shared by each question in the grid. + // In other words, the values of the columns. Only `CHECK_BOX` and + // `RADIO` choices are allowed. + Columns *ChoiceQuestion `json:"columns,omitempty"` + + // ShuffleQuestions: If `true`, the questions are randomly ordered. In + // other words, the rows appear in a different order for every + // respondent. + ShuffleQuestions bool `json:"shuffleQuestions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Columns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Columns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Grid) MarshalJSON() ([]byte, error) { + type NoMethod Grid + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Image: Data representing an image. +type Image struct { + // AltText: A description of the image that is shown on hover and read + // by screenreaders. + AltText string `json:"altText,omitempty"` + + // ContentUri: Output only. A URI from which you can download the image; + // this is valid only for a limited time. + ContentUri string `json:"contentUri,omitempty"` + + // Properties: Properties of an image. + Properties *MediaProperties `json:"properties,omitempty"` + + // SourceUri: Input only. The source URI is the URI used to insert the + // image. The source URI can be empty when fetched. + SourceUri string `json:"sourceUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AltText") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AltText") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Image) MarshalJSON() ([]byte, error) { + type NoMethod Image + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageItem: An item containing an image. +type ImageItem struct { + // Image: Required. The image displayed in the item. + Image *Image `json:"image,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Image") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Image") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImageItem) MarshalJSON() ([]byte, error) { + type NoMethod ImageItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Info: The general information for a form. +type Info struct { + // Description: The description of the form. + Description string `json:"description,omitempty"` + + // DocumentTitle: Output only. The title of the document which is + // visible in Drive. If `Info.title` is empty, `document_title` may + // appear in its place in the Google Forms UI and be visible to + // responders. `document_title` can be set on create, but cannot be + // modified by a batchUpdate request. Please use the Google Drive API + // (https://developers.google.com/drive/api/v3/reference/files/update) + // if you need to programmatically update `document_title`. + DocumentTitle string `json:"documentTitle,omitempty"` + + // Title: Required. The title of the form which is visible to + // responders. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *Info) MarshalJSON() ([]byte, error) { + type NoMethod Info + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Item: A single item of the form. `kind` defines which kind of item it +// is. +type Item struct { + // Description: The description of the item. + Description string `json:"description,omitempty"` + + // ImageItem: Displays an image on the page. + ImageItem *ImageItem `json:"imageItem,omitempty"` + + // ItemId: The item ID. On creation, it can be provided but the ID must + // not be already used in the form. If not provided, a new ID is + // assigned. + ItemId string `json:"itemId,omitempty"` + + // PageBreakItem: Starts a new page with a title. + PageBreakItem *PageBreakItem `json:"pageBreakItem,omitempty"` + + // QuestionGroupItem: Poses one or more questions to the user with a + // single major prompt. + QuestionGroupItem *QuestionGroupItem `json:"questionGroupItem,omitempty"` + + // QuestionItem: Poses a question to the user. + QuestionItem *QuestionItem `json:"questionItem,omitempty"` + + // TextItem: Displays a title and description on the page. + TextItem *TextItem `json:"textItem,omitempty"` + + // Title: The title of the item. + Title string `json:"title,omitempty"` + + // VideoItem: Displays a video on the page. + VideoItem *VideoItem `json:"videoItem,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *Item) MarshalJSON() ([]byte, error) { + type NoMethod Item + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListFormResponsesResponse: Response to a ListFormResponsesRequest. +type ListFormResponsesResponse struct { + // NextPageToken: If set, there are more responses. To get the next page + // of responses, provide this as `page_token` in a future request. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Responses: The returned responses. + Responses []*FormResponse `json:"responses,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *ListFormResponsesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListFormResponsesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWatchesResponse: The response of a ListWatchesRequest. +type ListWatchesResponse struct { + // Watches: The returned watches. + Watches []*Watch `json:"watches,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Watches") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Watches") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWatchesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWatchesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A specific location in a form. +type Location struct { + // Index: The index of an item in the form. This must be in the range + // [0..*N*), where *N* is the number of items in the form. + Index int64 `json:"index,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Index") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Index") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MediaProperties: Properties of the media. +type MediaProperties struct { + // Alignment: Position of the media. + // + // Possible values: + // "ALIGNMENT_UNSPECIFIED" - Default value. Unused. + // "LEFT" - Left align. + // "RIGHT" - Right align. + // "CENTER" - Center. + Alignment string `json:"alignment,omitempty"` + + // Width: The width of the media in pixels. When the media is displayed, + // it is scaled to the smaller of this value or the width of the + // displayed form. The original aspect ratio of the media is preserved. + // If a width is not specified when the media is added to the form, it + // is set to the width of the media source. Width must be between 0 and + // 740, inclusive. Setting width to 0 or unspecified is only permitted + // when updating the media source. + Width int64 `json:"width,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alignment") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alignment") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MediaProperties) MarshalJSON() ([]byte, error) { + type NoMethod MediaProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MoveItemRequest: Move an item in a form. +type MoveItemRequest struct { + // NewLocation: Required. The new location for the item. + NewLocation *Location `json:"newLocation,omitempty"` + + // OriginalLocation: Required. The location of the item to move. + OriginalLocation *Location `json:"originalLocation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewLocation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NewLocation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MoveItemRequest) MarshalJSON() ([]byte, error) { + type NoMethod MoveItemRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Option: An option for a Choice question. +type Option struct { + // GoToAction: Section navigation type. + // + // Possible values: + // "GO_TO_ACTION_UNSPECIFIED" - Default value. Unused. + // "NEXT_SECTION" - Go to the next section. + // "RESTART_FORM" - Go back to the beginning of the form. + // "SUBMIT_FORM" - Submit form immediately. + GoToAction string `json:"goToAction,omitempty"` + + // GoToSectionId: Item ID of section header to go to. + GoToSectionId string `json:"goToSectionId,omitempty"` + + // Image: Display image as an option. + Image *Image `json:"image,omitempty"` + + // IsOther: Whether the option is "other". Currently only applies to + // `RADIO` and `CHECKBOX` choice types, but is not allowed in a + // QuestionGroupItem. + IsOther bool `json:"isOther,omitempty"` + + // Value: Required. The choice as presented to the user. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GoToAction") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GoToAction") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Option) MarshalJSON() ([]byte, error) { + type NoMethod Option + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PageBreakItem: A page break. The title and description of this item +// are shown at the top of the new page. +type PageBreakItem struct { +} + +// Question: Any question. The specific type of question is known by its +// `kind`. +type Question struct { + // ChoiceQuestion: A respondent can choose from a pre-defined set of + // options. + ChoiceQuestion *ChoiceQuestion `json:"choiceQuestion,omitempty"` + + // DateQuestion: A respondent can enter a date. + DateQuestion *DateQuestion `json:"dateQuestion,omitempty"` + + // FileUploadQuestion: A respondent can upload one or more files. + FileUploadQuestion *FileUploadQuestion `json:"fileUploadQuestion,omitempty"` + + // Grading: Grading setup for the question. + Grading *Grading `json:"grading,omitempty"` + + // QuestionId: Read only. The question ID. On creation, it can be + // provided but the ID must not be already used in the form. If not + // provided, a new ID is assigned. + QuestionId string `json:"questionId,omitempty"` + + // Required: Whether the question must be answered in order for a + // respondent to submit their response. + Required bool `json:"required,omitempty"` + + // RowQuestion: A row of a QuestionGroupItem. + RowQuestion *RowQuestion `json:"rowQuestion,omitempty"` + + // ScaleQuestion: A respondent can choose a number from a range. + ScaleQuestion *ScaleQuestion `json:"scaleQuestion,omitempty"` + + // TextQuestion: A respondent can enter a free text response. + TextQuestion *TextQuestion `json:"textQuestion,omitempty"` + + // TimeQuestion: A respondent can enter a time. + TimeQuestion *TimeQuestion `json:"timeQuestion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChoiceQuestion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChoiceQuestion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Question) MarshalJSON() ([]byte, error) { + type NoMethod Question + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuestionGroupItem: Defines a question that comprises multiple +// questions grouped together. +type QuestionGroupItem struct { + // Grid: The question group is a grid with rows of multiple choice + // questions that share the same options. When `grid` is set, all + // questions in the group must be of kind `row`. + Grid *Grid `json:"grid,omitempty"` + + // Image: The image displayed within the question group above the + // specific questions. + Image *Image `json:"image,omitempty"` + + // Questions: Required. A list of questions that belong in this question + // group. A question must only belong to one group. The `kind` of the + // group may affect what types of questions are allowed. + Questions []*Question `json:"questions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Grid") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Grid") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QuestionGroupItem) MarshalJSON() ([]byte, error) { + type NoMethod QuestionGroupItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuestionItem: A form item containing a single question. +type QuestionItem struct { + // Image: The image displayed within the question. + Image *Image `json:"image,omitempty"` + + // Question: Required. The displayed question. + Question *Question `json:"question,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Image") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Image") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QuestionItem) MarshalJSON() ([]byte, error) { + type NoMethod QuestionItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QuizSettings: Settings related to quiz forms and grading. These must +// be updated with the UpdateSettingsRequest. +type QuizSettings struct { + // IsQuiz: Whether this form is a quiz or not. When true, responses are + // graded based on question Grading. Upon setting to false, all question + // Grading is deleted. + IsQuiz bool `json:"isQuiz,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IsQuiz") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IsQuiz") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QuizSettings) MarshalJSON() ([]byte, error) { + type NoMethod QuizSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RenewWatchRequest: Renew an existing Watch for seven days. +type RenewWatchRequest struct { +} + +// Request: The kinds of update requests that can be made. +type Request struct { + // CreateItem: Create a new item. + CreateItem *CreateItemRequest `json:"createItem,omitempty"` + + // DeleteItem: Delete an item. + DeleteItem *DeleteItemRequest `json:"deleteItem,omitempty"` + + // MoveItem: Move an item to a specified location. + MoveItem *MoveItemRequest `json:"moveItem,omitempty"` + + // UpdateFormInfo: Update Form's Info. + UpdateFormInfo *UpdateFormInfoRequest `json:"updateFormInfo,omitempty"` + + // UpdateItem: Update an item. + UpdateItem *UpdateItemRequest `json:"updateItem,omitempty"` + + // UpdateSettings: Updates the Form's settings. + UpdateSettings *UpdateSettingsRequest `json:"updateSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateItem") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateItem") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Request) MarshalJSON() ([]byte, error) { + type NoMethod Request + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Response: A single response from an update. +type Response struct { + // CreateItem: The result of creating an item. + CreateItem *CreateItemResponse `json:"createItem,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateItem") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateItem") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Response) MarshalJSON() ([]byte, error) { + type NoMethod Response + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RowQuestion: Configuration for a question that is part of a question +// group. +type RowQuestion struct { + // Title: Required. The title for the single row in the + // QuestionGroupItem. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Title") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RowQuestion) MarshalJSON() ([]byte, error) { + type NoMethod RowQuestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ScaleQuestion: A scale question. The user has a range of numeric +// values to choose from. +type ScaleQuestion struct { + // High: Required. The highest possible value for the scale. + High int64 `json:"high,omitempty"` + + // HighLabel: The label to display describing the highest point on the + // scale. + HighLabel string `json:"highLabel,omitempty"` + + // Low: Required. The lowest possible value for the scale. + Low int64 `json:"low,omitempty"` + + // LowLabel: The label to display describing the lowest point on the + // scale. + LowLabel string `json:"lowLabel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "High") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "High") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ScaleQuestion) MarshalJSON() ([]byte, error) { + type NoMethod ScaleQuestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TextAnswer: An answer to a question represented as text. +type TextAnswer struct { + // Value: Output only. The answer value. Formatting used for different + // kinds of question: * ChoiceQuestion * `RADIO` or `DROP_DOWN`: A + // single string corresponding to the option that was selected. * + // `CHECKBOX`: Multiple strings corresponding to each option that was + // selected. * TextQuestion: The text that the user entered. * + // ScaleQuestion: A string containing the number that was selected. * + // DateQuestion * Without time or year: MM-DD e.g. "05-19" * With year: + // YYYY-MM-DD e.g. "1986-05-19" * With time: MM-DD HH:MM e.g. "05-19 + // 14:51" * With year and time: YYYY-MM-DD HH:MM e.g. "1986-05-19 14:51" + // * TimeQuestion: String with time or duration in HH:MM format e.g. + // "14:51" * RowQuestion within QuestionGroupItem: The answer for each + // row of a QuestionGroupItem is represented as a separate Answer. Each + // will contain one string for `RADIO`-type choices or multiple strings + // for `CHECKBOX` choices. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TextAnswer) MarshalJSON() ([]byte, error) { + type NoMethod TextAnswer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TextAnswers: A question's answers as text. +type TextAnswers struct { + // Answers: Output only. Answers to a question. For multiple-value + // ChoiceQuestions, each answer is a separate value. + Answers []*TextAnswer `json:"answers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Answers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TextAnswers) MarshalJSON() ([]byte, error) { + type NoMethod TextAnswers + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TextItem: A text item. +type TextItem struct { +} + +// TextLink: Link for text. +type TextLink struct { + // DisplayText: Required. Display text for the URI. + DisplayText string `json:"displayText,omitempty"` + + // Uri: Required. The URI. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayText") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayText") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TextLink) MarshalJSON() ([]byte, error) { + type NoMethod TextLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TextQuestion: A text-based question. +type TextQuestion struct { + // Paragraph: Whether the question is a paragraph question or not. If + // not, the question is a short text question. + Paragraph bool `json:"paragraph,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Paragraph") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Paragraph") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TextQuestion) MarshalJSON() ([]byte, error) { + type NoMethod TextQuestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TimeQuestion: A time question. +type TimeQuestion struct { + // Duration: `true` if the question is about an elapsed time. Otherwise + // it is about a time of day. + Duration bool `json:"duration,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Duration") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Duration") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TimeQuestion) MarshalJSON() ([]byte, error) { + type NoMethod TimeQuestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdateFormInfoRequest: Update Form's Info. +type UpdateFormInfoRequest struct { + // Info: The info to update. + Info *Info `json:"info,omitempty"` + + // UpdateMask: Required. Only values named in this mask are changed. At + // least one field must be specified. The root `info` is implied and + // should not be specified. A single "*" can be used as short-hand for + // updating every field. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Info") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Info") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateFormInfoRequest) MarshalJSON() ([]byte, error) { + type NoMethod UpdateFormInfoRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdateItemRequest: Update an item in a form. +type UpdateItemRequest struct { + // Item: Required. New values for the item. Note that item and question + // IDs are used if they are provided (and are in the field mask). If an + // ID is blank (and in the field mask) a new ID is generated. This means + // you can modify an item by getting the form via forms.get, modifying + // your local copy of that item to be how you want it, and using + // UpdateItemRequest to write it back, with the IDs being the same (or + // not in the field mask). + Item *Item `json:"item,omitempty"` + + // Location: Required. The location identifying the item to update. + Location *Location `json:"location,omitempty"` + + // UpdateMask: Required. Only values named in this mask are changed. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Item") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Item") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateItemRequest) MarshalJSON() ([]byte, error) { + type NoMethod UpdateItemRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdateSettingsRequest: Update Form's FormSettings. +type UpdateSettingsRequest struct { + // Settings: Required. The settings to update with. + Settings *FormSettings `json:"settings,omitempty"` + + // UpdateMask: Required. Only values named in this mask are changed. At + // least one field must be specified. The root `settings` is implied and + // should not be specified. A single "*" can be used as short-hand for + // updating every field. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Settings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Settings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateSettingsRequest) MarshalJSON() ([]byte, error) { + type NoMethod UpdateSettingsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Video: Data representing a video. +type Video struct { + // Properties: Properties of a video. + Properties *MediaProperties `json:"properties,omitempty"` + + // YoutubeUri: Required. A YouTube URI. + YoutubeUri string `json:"youtubeUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Properties") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Properties") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Video) MarshalJSON() ([]byte, error) { + type NoMethod Video + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VideoItem: An item containing a video. +type VideoItem struct { + // Caption: The text displayed below the video. + Caption string `json:"caption,omitempty"` + + // Video: Required. The video displayed in the item. + Video *Video `json:"video,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Caption") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Caption") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VideoItem) MarshalJSON() ([]byte, error) { + type NoMethod VideoItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VideoLink: Link to a video. +type VideoLink struct { + // DisplayText: Required. The display text for the link. + DisplayText string `json:"displayText,omitempty"` + + // YoutubeUri: The URI of a YouTube video. + YoutubeUri string `json:"youtubeUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayText") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayText") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VideoLink) MarshalJSON() ([]byte, error) { + type NoMethod VideoLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Watch: A watch for events for a form. When the designated event +// happens, a notification will be published to the specified target. +// The notification's attributes will include a `formId` key that has +// the ID of the watched form and an `eventType` key that has the string +// of the type. Messages are sent with at-least-once delivery and are +// only dropped in extraordinary circumstances. Typically all +// notifications should be reliably delivered within a few seconds; +// however, in some situations notifications may be delayed. A watch +// expires seven days after it is created unless it is renewed with +// watches.renew +type Watch struct { + // CreateTime: Output only. Timestamp of when this was created. + CreateTime string `json:"createTime,omitempty"` + + // ErrorType: Output only. The most recent error type for an attempted + // delivery. To begin watching the form again a call can be made to + // watches.renew which also clears this error information. + // + // Possible values: + // "ERROR_TYPE_UNSPECIFIED" - Unspecified error type. + // "PROJECT_NOT_AUTHORIZED" - The cloud project does not have access + // to the form being watched. This occurs if the user has revoked the + // authorization for your project to access their form(s). Watches with + // this error will not be retried. To attempt to begin watching the form + // again a call can be made to watches.renew + // "NO_USER_ACCESS" - The user that granted access no longer has + // access to the form being watched. Watches with this error will not be + // retried. To attempt to begin watching the form again a call can be + // made to watches.renew + // "OTHER_ERRORS" - Another type of error has occurred. Whether + // notifications will continue depends on the watch state. + ErrorType string `json:"errorType,omitempty"` + + // EventType: Required. Which event type to watch for. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - Unspecified event type. This value + // should not be used. + // "SCHEMA" - The schema event type. A watch with this event type will + // be notified about changes to form content and settings. + // "RESPONSES" - The responses event type. A watch with this event + // type will be notified when form responses are submitted. + EventType string `json:"eventType,omitempty"` + + // ExpireTime: Output only. Timestamp for when this will expire. Each + // watches.renew call resets this to seven days in the future. + ExpireTime string `json:"expireTime,omitempty"` + + // Id: Output only. The ID of this watch. See notes on + // CreateWatchRequest.watch_id. + Id string `json:"id,omitempty"` + + // State: Output only. The current state of the watch. Additional + // details about suspended watches can be found by checking the + // `error_type`. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - Watch is active. + // "SUSPENDED" - The watch is suspended due to an error that may be + // resolved. The watch will continue to exist until it expires. To + // attempt to reactivate the watch a call can be made to watches.renew + State string `json:"state,omitempty"` + + // Target: Required. Where to send the notification. + Target *WatchTarget `json:"target,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Watch) MarshalJSON() ([]byte, error) { + type NoMethod Watch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WatchTarget: The target for notification delivery. +type WatchTarget struct { + // Topic: A Pub/Sub topic. To receive notifications, the topic must + // grant publish privileges to the Forms service account + // `serviceAccount:forms-notifications@system.gserviceaccount.com`. Only + // the project that owns a topic may create a watch with it. Pub/Sub + // delivery guarantees should be considered. + Topic *CloudPubsubTopic `json:"topic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Topic") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Topic") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WatchTarget) MarshalJSON() ([]byte, error) { + type NoMethod WatchTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WriteControl: Provides control over how write requests are executed. +type WriteControl struct { + // RequiredRevisionId: The revision ID of the form that the write + // request is applied to. If this is not the latest revision of the + // form, the request is not processed and returns a 400 bad request + // error. + RequiredRevisionId string `json:"requiredRevisionId,omitempty"` + + // TargetRevisionId: The target revision ID of the form that the write + // request is applied to. If changes have occurred after this revision, + // the changes in this update request are transformed against those + // changes. This results in a new revision of the form that incorporates + // both the changes in the request and the intervening changes, with the + // server resolving conflicting changes. The target revision ID may only + // be used to write to recent versions of a form. If the target revision + // is too far behind the latest revision, the request is not processed + // and returns a 400 (Bad Request Error). The request may be retried + // after reading the latest version of the form. In most cases a target + // revision ID remains valid for several minutes after it is read, but + // for frequently-edited forms this window may be shorter. + TargetRevisionId string `json:"targetRevisionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequiredRevisionId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequiredRevisionId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WriteControl) MarshalJSON() ([]byte, error) { + type NoMethod WriteControl + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "forms.forms.batchUpdate": + +type FormsBatchUpdateCall struct { + s *Service + formId string + batchupdateformrequest *BatchUpdateFormRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Change the form with a batch of updates. +// +// - formId: The form ID. +func (r *FormsService) BatchUpdate(formId string, batchupdateformrequest *BatchUpdateFormRequest) *FormsBatchUpdateCall { + c := &FormsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + c.batchupdateformrequest = batchupdateformrequest + 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 *FormsBatchUpdateCall) Fields(s ...googleapi.Field) *FormsBatchUpdateCall { + 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 *FormsBatchUpdateCall) Context(ctx context.Context) *FormsBatchUpdateCall { + 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 *FormsBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsBatchUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.batchupdateformrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}:batchUpdate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.batchUpdate" call. +// Exactly one of *BatchUpdateFormResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BatchUpdateFormResponse.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 *FormsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateFormResponse, 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 := &BatchUpdateFormResponse{ + 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": "Change the form with a batch of updates.", + // "flatPath": "v1/forms/{formId}:batchUpdate", + // "httpMethod": "POST", + // "id": "forms.forms.batchUpdate", + // "parameterOrder": [ + // "formId" + // ], + // "parameters": { + // "formId": { + // "description": "Required. The form ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}:batchUpdate", + // "request": { + // "$ref": "BatchUpdateFormRequest" + // }, + // "response": { + // "$ref": "BatchUpdateFormResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file" + // ] + // } + +} + +// method id "forms.forms.create": + +type FormsCreateCall struct { + s *Service + form *Form + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new form using the title given in the provided form +// message in the request. *Important:* Only the form.info.title and +// form.info.document_title fields are copied to the new form. All other +// fields including the form description, items and settings are +// disallowed. To create a new form and add items, you must first call +// forms.create to create an empty form with a title and (optional) +// document title, and then call forms.update to add the items. +func (r *FormsService) Create(form *Form) *FormsCreateCall { + c := &FormsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.form = form + 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 *FormsCreateCall) Fields(s ...googleapi.Field) *FormsCreateCall { + 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 *FormsCreateCall) Context(ctx context.Context) *FormsCreateCall { + 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 *FormsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.form) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.create" call. +// Exactly one of *Form or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Form.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 *FormsCreateCall) Do(opts ...googleapi.CallOption) (*Form, 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 := &Form{ + 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": "Create a new form using the title given in the provided form message in the request. *Important:* Only the form.info.title and form.info.document_title fields are copied to the new form. All other fields including the form description, items and settings are disallowed. To create a new form and add items, you must first call forms.create to create an empty form with a title and (optional) document title, and then call forms.update to add the items.", + // "flatPath": "v1/forms", + // "httpMethod": "POST", + // "id": "forms.forms.create", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/forms", + // "request": { + // "$ref": "Form" + // }, + // "response": { + // "$ref": "Form" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file" + // ] + // } + +} + +// method id "forms.forms.get": + +type FormsGetCall struct { + s *Service + formId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a form. +// +// - formId: The form ID. +func (r *FormsService) Get(formId string) *FormsGetCall { + c := &FormsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + 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 *FormsGetCall) Fields(s ...googleapi.Field) *FormsGetCall { + 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 *FormsGetCall) IfNoneMatch(entityTag string) *FormsGetCall { + 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 *FormsGetCall) Context(ctx context.Context) *FormsGetCall { + 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 *FormsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.get" call. +// Exactly one of *Form or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Form.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 *FormsGetCall) Do(opts ...googleapi.CallOption) (*Form, 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 := &Form{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get a form.", + // "flatPath": "v1/forms/{formId}", + // "httpMethod": "GET", + // "id": "forms.forms.get", + // "parameterOrder": [ + // "formId" + // ], + // "parameters": { + // "formId": { + // "description": "Required. The form ID.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}", + // "response": { + // "$ref": "Form" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.readonly" + // ] + // } + +} + +// method id "forms.forms.responses.get": + +type FormsResponsesGetCall struct { + s *Service + formId string + responseId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get one response from the form. +// +// - formId: The form ID. +// - responseId: The response ID within the form. +func (r *FormsResponsesService) Get(formId string, responseId string) *FormsResponsesGetCall { + c := &FormsResponsesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + c.responseId = responseId + 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 *FormsResponsesGetCall) Fields(s ...googleapi.Field) *FormsResponsesGetCall { + 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 *FormsResponsesGetCall) IfNoneMatch(entityTag string) *FormsResponsesGetCall { + 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 *FormsResponsesGetCall) Context(ctx context.Context) *FormsResponsesGetCall { + 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 *FormsResponsesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsResponsesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}/responses/{responseId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + "responseId": c.responseId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.responses.get" call. +// Exactly one of *FormResponse or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *FormResponse.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 *FormsResponsesGetCall) Do(opts ...googleapi.CallOption) (*FormResponse, 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 := &FormResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get one response from the form.", + // "flatPath": "v1/forms/{formId}/responses/{responseId}", + // "httpMethod": "GET", + // "id": "forms.forms.responses.get", + // "parameterOrder": [ + // "formId", + // "responseId" + // ], + // "parameters": { + // "formId": { + // "description": "Required. The form ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responseId": { + // "description": "Required. The response ID within the form.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}/responses/{responseId}", + // "response": { + // "$ref": "FormResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file" + // ] + // } + +} + +// method id "forms.forms.responses.list": + +type FormsResponsesListCall struct { + s *Service + formId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List a form's responses. +// +// - formId: ID of the Form whose responses to list. +func (r *FormsResponsesService) List(formId string) *FormsResponsesListCall { + c := &FormsResponsesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + return c +} + +// Filter sets the optional parameter "filter": Which form responses to +// return. Currently, the only supported filters are: * timestamp > *N* +// which means to get all form responses submitted after (but not at) +// timestamp *N*. * timestamp >= *N* which means to get all form +// responses submitted at and after timestamp *N*. For both supported +// filters, timestamp must be formatted in RFC3339 UTC "Zulu" format. +// Examples: "2014-10-02T15:01:23Z" and +// "2014-10-02T15:01:23.045123456Z". +func (c *FormsResponsesListCall) Filter(filter string) *FormsResponsesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of responses to return. The service may return fewer than this value. +// If unspecified or zero, at most 5000 responses are returned. +func (c *FormsResponsesListCall) PageSize(pageSize int64) *FormsResponsesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// returned by a previous list response. If this field is set, the form +// and the values of the filter must be the same as for the original +// request. +func (c *FormsResponsesListCall) PageToken(pageToken string) *FormsResponsesListCall { + 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 *FormsResponsesListCall) Fields(s ...googleapi.Field) *FormsResponsesListCall { + 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 *FormsResponsesListCall) IfNoneMatch(entityTag string) *FormsResponsesListCall { + 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 *FormsResponsesListCall) Context(ctx context.Context) *FormsResponsesListCall { + 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 *FormsResponsesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsResponsesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}/responses") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.responses.list" call. +// Exactly one of *ListFormResponsesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListFormResponsesResponse.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 *FormsResponsesListCall) Do(opts ...googleapi.CallOption) (*ListFormResponsesResponse, 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 := &ListFormResponsesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List a form's responses.", + // "flatPath": "v1/forms/{formId}/responses", + // "httpMethod": "GET", + // "id": "forms.forms.responses.list", + // "parameterOrder": [ + // "formId" + // ], + // "parameters": { + // "filter": { + // "description": "Which form responses to return. Currently, the only supported filters are: * timestamp \u003e *N* which means to get all form responses submitted after (but not at) timestamp *N*. * timestamp \u003e= *N* which means to get all form responses submitted at and after timestamp *N*. For both supported filters, timestamp must be formatted in RFC3339 UTC \"Zulu\" format. Examples: \"2014-10-02T15:01:23Z\" and \"2014-10-02T15:01:23.045123456Z\".", + // "location": "query", + // "type": "string" + // }, + // "formId": { + // "description": "Required. ID of the Form whose responses to list.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of responses to return. The service may return fewer than this value. If unspecified or zero, at most 5000 responses are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token returned by a previous list response. If this field is set, the form and the values of the filter must be the same as for the original request.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}/responses", + // "response": { + // "$ref": "ListFormResponsesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file" + // ] + // } + +} + +// 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 *FormsResponsesListCall) Pages(ctx context.Context, f func(*ListFormResponsesResponse) 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 "forms.forms.watches.create": + +type FormsWatchesCreateCall struct { + s *Service + formId string + createwatchrequest *CreateWatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new watch. If a watch ID is provided, it must be +// unused. For each invoking project, the per form limit is one watch +// per Watch.EventType. A watch expires seven days after it is created +// (see Watch.expire_time). +// +// - formId: ID of the Form to watch. +func (r *FormsWatchesService) Create(formId string, createwatchrequest *CreateWatchRequest) *FormsWatchesCreateCall { + c := &FormsWatchesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + c.createwatchrequest = createwatchrequest + 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 *FormsWatchesCreateCall) Fields(s ...googleapi.Field) *FormsWatchesCreateCall { + 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 *FormsWatchesCreateCall) Context(ctx context.Context) *FormsWatchesCreateCall { + 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 *FormsWatchesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsWatchesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.createwatchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}/watches") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.watches.create" call. +// Exactly one of *Watch or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Watch.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 *FormsWatchesCreateCall) Do(opts ...googleapi.CallOption) (*Watch, 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 := &Watch{ + 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": "Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per Watch.EventType. A watch expires seven days after it is created (see Watch.expire_time).", + // "flatPath": "v1/forms/{formId}/watches", + // "httpMethod": "POST", + // "id": "forms.forms.watches.create", + // "parameterOrder": [ + // "formId" + // ], + // "parameters": { + // "formId": { + // "description": "Required. ID of the Form to watch.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}/watches", + // "request": { + // "$ref": "CreateWatchRequest" + // }, + // "response": { + // "$ref": "Watch" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.readonly" + // ] + // } + +} + +// method id "forms.forms.watches.delete": + +type FormsWatchesDeleteCall struct { + s *Service + formId string + watchId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a watch. +// +// - formId: The ID of the Form. +// - watchId: The ID of the Watch to delete. +func (r *FormsWatchesService) Delete(formId string, watchId string) *FormsWatchesDeleteCall { + c := &FormsWatchesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + c.watchId = watchId + 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 *FormsWatchesDeleteCall) Fields(s ...googleapi.Field) *FormsWatchesDeleteCall { + 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 *FormsWatchesDeleteCall) Context(ctx context.Context) *FormsWatchesDeleteCall { + 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 *FormsWatchesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsWatchesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}/watches/{watchId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + "watchId": c.watchId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.watches.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 *FormsWatchesDeleteCall) 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": "Delete a watch.", + // "flatPath": "v1/forms/{formId}/watches/{watchId}", + // "httpMethod": "DELETE", + // "id": "forms.forms.watches.delete", + // "parameterOrder": [ + // "formId", + // "watchId" + // ], + // "parameters": { + // "formId": { + // "description": "Required. The ID of the Form.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "watchId": { + // "description": "Required. The ID of the Watch to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}/watches/{watchId}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.readonly" + // ] + // } + +} + +// method id "forms.forms.watches.list": + +type FormsWatchesListCall struct { + s *Service + formId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Return a list of the watches owned by the invoking project. The +// maximum number of watches is two: For each invoker, the limit is one +// for each event type per form. +// +// - formId: ID of the Form whose watches to list. +func (r *FormsWatchesService) List(formId string) *FormsWatchesListCall { + c := &FormsWatchesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + 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 *FormsWatchesListCall) Fields(s ...googleapi.Field) *FormsWatchesListCall { + 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 *FormsWatchesListCall) IfNoneMatch(entityTag string) *FormsWatchesListCall { + 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 *FormsWatchesListCall) Context(ctx context.Context) *FormsWatchesListCall { + 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 *FormsWatchesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsWatchesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}/watches") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.watches.list" call. +// Exactly one of *ListWatchesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListWatchesResponse.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 *FormsWatchesListCall) Do(opts ...googleapi.CallOption) (*ListWatchesResponse, 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 := &ListWatchesResponse{ + 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": "Return a list of the watches owned by the invoking project. The maximum number of watches is two: For each invoker, the limit is one for each event type per form.", + // "flatPath": "v1/forms/{formId}/watches", + // "httpMethod": "GET", + // "id": "forms.forms.watches.list", + // "parameterOrder": [ + // "formId" + // ], + // "parameters": { + // "formId": { + // "description": "Required. ID of the Form whose watches to list.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}/watches", + // "response": { + // "$ref": "ListWatchesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.readonly" + // ] + // } + +} + +// method id "forms.forms.watches.renew": + +type FormsWatchesRenewCall struct { + s *Service + formId string + watchId string + renewwatchrequest *RenewWatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Renew: Renew an existing watch for seven days. The state of the watch +// after renewal is `ACTIVE`, and the `expire_time` is seven days from +// the renewal. Renewing a watch in an error state (e.g. `SUSPENDED`) +// succeeds if the error is no longer present, but fail otherwise. After +// a watch has expired, RenewWatch returns `NOT_FOUND`. +// +// - formId: The ID of the Form. +// - watchId: The ID of the Watch to renew. +func (r *FormsWatchesService) Renew(formId string, watchId string, renewwatchrequest *RenewWatchRequest) *FormsWatchesRenewCall { + c := &FormsWatchesRenewCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.formId = formId + c.watchId = watchId + c.renewwatchrequest = renewwatchrequest + 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 *FormsWatchesRenewCall) Fields(s ...googleapi.Field) *FormsWatchesRenewCall { + 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 *FormsWatchesRenewCall) Context(ctx context.Context) *FormsWatchesRenewCall { + 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 *FormsWatchesRenewCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FormsWatchesRenewCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.renewwatchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/forms/{formId}/watches/{watchId}:renew") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "formId": c.formId, + "watchId": c.watchId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "forms.forms.watches.renew" call. +// Exactly one of *Watch or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Watch.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 *FormsWatchesRenewCall) Do(opts ...googleapi.CallOption) (*Watch, 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 := &Watch{ + 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": "Renew an existing watch for seven days. The state of the watch after renewal is `ACTIVE`, and the `expire_time` is seven days from the renewal. Renewing a watch in an error state (e.g. `SUSPENDED`) succeeds if the error is no longer present, but fail otherwise. After a watch has expired, RenewWatch returns `NOT_FOUND`.", + // "flatPath": "v1/forms/{formId}/watches/{watchId}:renew", + // "httpMethod": "POST", + // "id": "forms.forms.watches.renew", + // "parameterOrder": [ + // "formId", + // "watchId" + // ], + // "parameters": { + // "formId": { + // "description": "Required. The ID of the Form.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "watchId": { + // "description": "Required. The ID of the Watch to renew.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/forms/{formId}/watches/{watchId}:renew", + // "request": { + // "$ref": "RenewWatchRequest" + // }, + // "response": { + // "$ref": "Watch" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.readonly" + // ] + // } + +} diff --git a/gmail/v1/gmail-api.json b/gmail/v1/gmail-api.json index c5c394251ef..336e2a7891b 100644 --- a/gmail/v1/gmail-api.json +++ b/gmail/v1/gmail-api.json @@ -2430,7 +2430,7 @@ "threads": { "methods": { "delete": { - "description": "Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer `threads.trash` instead.", + "description": "Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone. Prefer `threads.trash` instead.", "flatPath": "gmail/v1/users/{userId}/threads/{id}", "httpMethod": "DELETE", "id": "gmail.users.threads.delete", @@ -2612,7 +2612,7 @@ ] }, "trash": { - "description": "Moves the specified thread to the trash.", + "description": "Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash.", "flatPath": "gmail/v1/users/{userId}/threads/{id}/trash", "httpMethod": "POST", "id": "gmail.users.threads.trash", @@ -2645,7 +2645,7 @@ ] }, "untrash": { - "description": "Removes the specified thread from the trash.", + "description": "Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash.", "flatPath": "gmail/v1/users/{userId}/threads/{id}/untrash", "httpMethod": "POST", "id": "gmail.users.threads.untrash", @@ -2682,7 +2682,7 @@ } } }, - "revision": "20211108", + "revision": "20220307", "rootUrl": "https://gmail.googleapis.com/", "schemas": { "AutoForwarding": { @@ -3492,14 +3492,14 @@ "id": "ModifyMessageRequest", "properties": { "addLabelIds": { - "description": "A list of IDs of labels to add to this message.", + "description": "A list of IDs of labels to add to this message. You can add up to 100 labels with each update.", "items": { "type": "string" }, "type": "array" }, "removeLabelIds": { - "description": "A list IDs of labels to remove from this message.", + "description": "A list IDs of labels to remove from this message. You can remove up to 100 labels with each update.", "items": { "type": "string" }, @@ -3512,14 +3512,14 @@ "id": "ModifyThreadRequest", "properties": { "addLabelIds": { - "description": "A list of IDs of labels to add to this thread.", + "description": "A list of IDs of labels to add to this thread. You can add up to 100 labels with each update.", "items": { "type": "string" }, "type": "array" }, "removeLabelIds": { - "description": "A list of IDs of labels to remove from this thread.", + "description": "A list of IDs of labels to remove from this thread. You can remove up to 100 labels with each update.", "items": { "type": "string" }, diff --git a/gmail/v1/gmail-gen.go b/gmail/v1/gmail-gen.go index cf2846a744e..86d472b1c87 100644 --- a/gmail/v1/gmail-gen.go +++ b/gmail/v1/gmail-gen.go @@ -1690,10 +1690,12 @@ func (s *MessagePartHeader) MarshalJSON() ([]byte, error) { } type ModifyMessageRequest struct { - // AddLabelIds: A list of IDs of labels to add to this message. + // AddLabelIds: A list of IDs of labels to add to this message. You can + // add up to 100 labels with each update. AddLabelIds []string `json:"addLabelIds,omitempty"` - // RemoveLabelIds: A list IDs of labels to remove from this message. + // RemoveLabelIds: A list IDs of labels to remove from this message. You + // can remove up to 100 labels with each update. RemoveLabelIds []string `json:"removeLabelIds,omitempty"` // ForceSendFields is a list of field names (e.g. "AddLabelIds") to @@ -1720,10 +1722,12 @@ func (s *ModifyMessageRequest) MarshalJSON() ([]byte, error) { } type ModifyThreadRequest struct { - // AddLabelIds: A list of IDs of labels to add to this thread. + // AddLabelIds: A list of IDs of labels to add to this thread. You can + // add up to 100 labels with each update. AddLabelIds []string `json:"addLabelIds,omitempty"` // RemoveLabelIds: A list of IDs of labels to remove from this thread. + // You can remove up to 100 labels with each update. RemoveLabelIds []string `json:"removeLabelIds,omitempty"` // ForceSendFields is a list of field names (e.g. "AddLabelIds") to @@ -12301,8 +12305,9 @@ type UsersThreadsDeleteCall struct { header_ http.Header } -// Delete: Immediately and permanently deletes the specified thread. -// This operation cannot be undone. Prefer `threads.trash` instead. +// Delete: Immediately and permanently deletes the specified thread. Any +// messages that belong to the thread are also deleted. This operation +// cannot be undone. Prefer `threads.trash` instead. // // - id: ID of the Thread to delete. // - userId: The user's email address. The special value `me` can be @@ -12376,7 +12381,7 @@ func (c *UsersThreadsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer `threads.trash` instead.", + // "description": "Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone. Prefer `threads.trash` instead.", // "flatPath": "gmail/v1/users/{userId}/threads/{id}", // "httpMethod": "DELETE", // "id": "gmail.users.threads.delete", @@ -13023,7 +13028,8 @@ type UsersThreadsTrashCall struct { header_ http.Header } -// Trash: Moves the specified thread to the trash. +// Trash: Moves the specified thread to the trash. Any messages that +// belong to the thread are also moved to the trash. // // - id: The ID of the thread to Trash. // - userId: The user's email address. The special value `me` can be @@ -13122,7 +13128,7 @@ func (c *UsersThreadsTrashCall) Do(opts ...googleapi.CallOption) (*Thread, error } return ret, nil // { - // "description": "Moves the specified thread to the trash.", + // "description": "Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash.", // "flatPath": "gmail/v1/users/{userId}/threads/{id}/trash", // "httpMethod": "POST", // "id": "gmail.users.threads.trash", @@ -13168,7 +13174,8 @@ type UsersThreadsUntrashCall struct { header_ http.Header } -// Untrash: Removes the specified thread from the trash. +// Untrash: Removes the specified thread from the trash. Any messages +// that belong to the thread are also removed from the trash. // // - id: The ID of the thread to remove from Trash. // - userId: The user's email address. The special value `me` can be @@ -13267,7 +13274,7 @@ func (c *UsersThreadsUntrashCall) Do(opts ...googleapi.CallOption) (*Thread, err } return ret, nil // { - // "description": "Removes the specified thread from the trash.", + // "description": "Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash.", // "flatPath": "gmail/v1/users/{userId}/threads/{id}/untrash", // "httpMethod": "POST", // "id": "gmail.users.threads.untrash", diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index 67baf27a808..b74304391f7 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -4053,7 +4053,7 @@ } } }, - "revision": "20220115", + "revision": "20220224", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -4950,6 +4950,14 @@ "description": "Request to export resources.", "id": "ExportResourcesRequest", "properties": { + "_since": { + "description": "If provided, only resources updated after this time are exported. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time must be specified to the second and include a time zone.", + "type": "string" + }, + "_type": { + "description": "String of comma-delimited FHIR resource types. If provided, only resources of the specified resource type(s) are exported.", + "type": "string" + }, "bigqueryDestination": { "$ref": "GoogleCloudHealthcareV1FhirBigQueryDestination", "description": "The BigQuery output destination. The Cloud Healthcare Service Agent requires two IAM roles on the BigQuery location: `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. The output is one BigQuery table per resource type. Unlike when setting `BigQueryDestination` for `StreamConfig`, `ExportResources` does not create BigQuery views." diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index 73e6bfd7bf3..f6ef8001a44 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -2068,6 +2068,16 @@ type ExportMessagesResponse struct { // ExportResourcesRequest: Request to export resources. type ExportResourcesRequest struct { + // Since: If provided, only resources updated after this time are + // exported. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For + // example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. + // The time must be specified to the second and include a time zone. + Since string `json:"_since,omitempty"` + + // Type: String of comma-delimited FHIR resource types. If provided, + // only resources of the specified resource type(s) are exported. + Type string `json:"_type,omitempty"` + // BigqueryDestination: The BigQuery output destination. The Cloud // Healthcare Service Agent requires two IAM roles on the BigQuery // location: `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. @@ -2084,21 +2094,20 @@ type ExportResourcesRequest struct { // resource. GcsDestination *GoogleCloudHealthcareV1FhirGcsDestination `json:"gcsDestination,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigqueryDestination") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Since") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigqueryDestination") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Since") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if 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/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 74fc4c40421..56701803a5c 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4865,7 +4865,7 @@ } } }, - "revision": "20220223", + "revision": "20220224", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -5565,6 +5565,10 @@ "$ref": "ImageConfig", "description": "Configures de-identification of image pixels wherever they are found in the source_dataset." }, + "operationMetadata": { + "$ref": "DeidentifyOperationMetadata", + "description": "Details about the work the de-identify operation performed." + }, "text": { "$ref": "TextConfig", "description": "Configures de-identification of text wherever it is found in the source_dataset." @@ -5625,6 +5629,17 @@ }, "type": "object" }, + "DeidentifyOperationMetadata": { + "description": "Details about the work the de-identify operation performed.", + "id": "DeidentifyOperationMetadata", + "properties": { + "fhirOutput": { + "$ref": "FhirOutput", + "description": "Details about the FHIR store to write the output to." + } + }, + "type": "object" + }, "DeidentifySummary": { "description": "Contains a detailed summary of the Deidentify operation.", "id": "DeidentifySummary", @@ -6083,6 +6098,17 @@ }, "type": "object" }, + "FhirOutput": { + "description": "Details about the FHIR store to write the output to.", + "id": "FhirOutput", + "properties": { + "fhirStore": { + "description": "Name of the output FHIR store, which must already exist. You must grant the healthcare.fhirResources.update permission on the destination store to your project's **Cloud Healthcare Service Agent** [service account](https://cloud.google.com/healthcare/docs/how-tos/permissions-healthcare-api-gcp-products#the_cloud_healthcare_service_agent). The destination store must set `enable_update_create` to true. The destination store must use FHIR version R4. Writing these resources will consume FHIR operations quota from the project containing the source data. De-identify operation metadata is only generated for DICOM de-identification operations.", + "type": "string" + } + }, + "type": "object" + }, "FhirStore": { "description": "Represents a FHIR store.", "id": "FhirStore", @@ -7395,12 +7421,14 @@ "enum": [ "PARSER_VERSION_UNSPECIFIED", "V1", - "V2" + "V2", + "V3" ], "enumDescriptions": [ "Unspecified parser version, equivalent to V1.", "The `parsed_data` includes every given non-empty message field except the Field Separator (MSH-1) field. As a result, the parsed MSH segment starts with the MSH-2 field and the field numbers are off-by-one with respect to the HL7 standard.", - "The `parsed_data` includes every given non-empty message field." + "The `parsed_data` includes every given non-empty message field.", + "This version is the same as V2, with the following change. The `parsed_data` contains unescaped escaped field separators, component separators, sub-component separators, repetition separators, escape characters, and truncation characters. If `schema` is specified, the schematized parser uses improved parsing heuristics compared to previous versions." ], "type": "string" } diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 384df4a295d..d9916363936 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -1709,6 +1709,10 @@ type DeidentifyConfig struct { // found in the source_dataset. Image *ImageConfig `json:"image,omitempty"` + // OperationMetadata: Details about the work the de-identify operation + // performed. + OperationMetadata *DeidentifyOperationMetadata `json:"operationMetadata,omitempty"` + // Text: Configures de-identification of text wherever it is found in // the source_dataset. Text *TextConfig `json:"text,omitempty"` @@ -1859,6 +1863,35 @@ func (s *DeidentifyFhirStoreRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeidentifyOperationMetadata: Details about the work the de-identify +// operation performed. +type DeidentifyOperationMetadata struct { + // FhirOutput: Details about the FHIR store to write the output to. + FhirOutput *FhirOutput `json:"fhirOutput,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FhirOutput") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FhirOutput") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeidentifyOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeidentifyOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeidentifySummary: Contains a detailed summary of the Deidentify // operation. type DeidentifySummary struct { @@ -2779,6 +2812,43 @@ func (s *FhirFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FhirOutput: Details about the FHIR store to write the output to. +type FhirOutput struct { + // FhirStore: Name of the output FHIR store, which must already exist. + // You must grant the healthcare.fhirResources.update permission on the + // destination store to your project's **Cloud Healthcare Service + // Agent** service account + // (https://cloud.google.com/healthcare/docs/how-tos/permissions-healthcare-api-gcp-products#the_cloud_healthcare_service_agent). + // The destination store must set `enable_update_create` to true. The + // destination store must use FHIR version R4. Writing these resources + // will consume FHIR operations quota from the project containing the + // source data. De-identify operation metadata is only generated for + // DICOM de-identification operations. + FhirStore string `json:"fhirStore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FhirStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FhirStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FhirOutput) MarshalJSON() ([]byte, error) { + type NoMethod FhirOutput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FhirStore: Represents a FHIR store. type FhirStore struct { // DefaultSearchHandlingStrict: If true, overrides the default search @@ -5474,6 +5544,12 @@ type ParserConfig struct { // are off-by-one with respect to the HL7 standard. // "V2" - The `parsed_data` includes every given non-empty message // field. + // "V3" - This version is the same as V2, with the following change. + // The `parsed_data` contains unescaped escaped field separators, + // component separators, sub-component separators, repetition + // separators, escape characters, and truncation characters. If `schema` + // is specified, the schematized parser uses improved parsing heuristics + // compared to previous versions. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowNullHeader") to diff --git a/jobs/v4/jobs-api.json b/jobs/v4/jobs-api.json index da3938611ab..b1062dfa8be 100644 --- a/jobs/v4/jobs-api.json +++ b/jobs/v4/jobs-api.json @@ -903,7 +903,7 @@ } } }, - "revision": "20211025", + "revision": "20220303", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -2060,7 +2060,7 @@ "type": "array" }, "companyDisplayNames": { - "description": "This filter specifies the exact company Company.display_name of the jobs to search against. If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", + "description": "This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, if the value being searched for is wrapped in SUBSTRING_MATCH([value]), the company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", "items": { "type": "string" }, @@ -2641,7 +2641,7 @@ "type": "array" }, "regionCode": { - "description": "Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland.", + "description": "Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland.", "type": "string" }, "revision": { @@ -2760,7 +2760,7 @@ "type": "boolean" }, "histogramQueries": { - "description": "An expression specifies a histogram request against matching jobs. Expression syntax is an aggregation function call with histogram facets and other options. Available aggregation function calls are: * `count(string_histogram_facet)`: Count the number of matching entities, for each distinct attribute value. * `count(numeric_histogram_facet, list of buckets)`: Count the number of matching entities within each bucket. Data types: * Histogram facet: facet names with format `a-zA-Z+`. * String: string like \"any string with backslash escape for quote(\\\").\" * Number: whole number and floating point number like 10, -1 and -0.01. * List: list of elements with comma(,) separator surrounded by square brackets, for example, [1, 2, 3] and [\"one\", \"two\", \"three\"]. Built-in constants: * MIN (minimum number similar to java Double.MIN_VALUE) * MAX (maximum number similar to java Double.MAX_VALUE) Built-in functions: * bucket(start, end[, label]): bucket built-in function creates a bucket with range of start, end). Note that the end is exclusive, for example, bucket(1, MAX, \"positive number\") or bucket(1, 10). Job histogram facets: * company_display_name: histogram by [Job.company_display_name. * employment_type: histogram by Job.employment_types, for example, \"FULL_TIME\", \"PART_TIME\". * company_size: histogram by CompanySize, for example, \"SMALL\", \"MEDIUM\", \"BIG\". * publish_time_in_day: histogram by the Job.posting_publish_time in days. Must specify list of numeric buckets in spec. * publish_time_in_month: histogram by the Job.posting_publish_time in months. Must specify list of numeric buckets in spec. * publish_time_in_year: histogram by the Job.posting_publish_time in years. Must specify list of numeric buckets in spec. * degree_types: histogram by the Job.degree_types, for example, \"Bachelors\", \"Masters\". * job_level: histogram by the Job.job_level, for example, \"Entry Level\". * country: histogram by the country code of jobs, for example, \"US\", \"FR\". * admin1: histogram by the admin1 code of jobs, which is a global placeholder referring to the state, province, or the particular term a country uses to define the geographic structure below the country level, for example, \"CA\", \"IL\". * city: histogram by a combination of the \"city name, admin1 code\". For example, \"Mountain View, CA\", \"New York, NY\". * admin1_country: histogram by a combination of the \"admin1 code, country\", for example, \"CA, US\", \"IL, US\". * city_coordinate: histogram by the city center's GPS coordinates (latitude and longitude), for example, 37.4038522,-122.0987765. Since the coordinates of a city center can change, customers may need to refresh them periodically. * locale: histogram by the Job.language_code, for example, \"en-US\", \"fr-FR\". * language: histogram by the language subtag of the Job.language_code, for example, \"en\", \"fr\". * category: histogram by the JobCategory, for example, \"COMPUTER_AND_IT\", \"HEALTHCARE\". * base_compensation_unit: histogram by the CompensationInfo.CompensationUnit of base salary, for example, \"WEEKLY\", \"MONTHLY\". * base_compensation: histogram by the base salary. Must specify list of numeric buckets to group results by. * annualized_base_compensation: histogram by the base annualized salary. Must specify list of numeric buckets to group results by. * annualized_total_compensation: histogram by the total annualized salary. Must specify list of numeric buckets to group results by. * string_custom_attribute: histogram by string Job.custom_attributes. Values can be accessed via square bracket notations like string_custom_attribute[\"key1\"]. * numeric_custom_attribute: histogram by numeric Job.custom_attributes. Values can be accessed via square bracket notations like numeric_custom_attribute[\"key1\"]. Must specify list of numeric buckets to group results by. Example expressions: * `count(admin1)` * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), bucket(100000, MAX)])` * `count(string_custom_attribute[\"some-string-custom-attribute\"])` * `count(numeric_custom_attribute[\"some-numeric-custom-attribute\"], [bucket(MIN, 0, \"negative\"), bucket(0, MAX, \"non-negative\")])`", + "description": "An expression specifies a histogram request against matching jobs. Expression syntax is an aggregation function call with histogram facets and other options. Available aggregation function calls are: * `count(string_histogram_facet)`: Count the number of matching entities, for each distinct attribute value. * `count(numeric_histogram_facet, list of buckets)`: Count the number of matching entities within each bucket. A maximum of 200 histogram buckets are supported. Data types: * Histogram facet: facet names with format `a-zA-Z+`. * String: string like \"any string with backslash escape for quote(\\\").\" * Number: whole number and floating point number like 10, -1 and -0.01. * List: list of elements with comma(,) separator surrounded by square brackets, for example, [1, 2, 3] and [\"one\", \"two\", \"three\"]. Built-in constants: * MIN (minimum number similar to java Double.MIN_VALUE) * MAX (maximum number similar to java Double.MAX_VALUE) Built-in functions: * bucket(start, end[, label]): bucket built-in function creates a bucket with range of start, end). Note that the end is exclusive, for example, bucket(1, MAX, \"positive number\") or bucket(1, 10). Job histogram facets: * company_display_name: histogram by [Job.company_display_name. * employment_type: histogram by Job.employment_types, for example, \"FULL_TIME\", \"PART_TIME\". * company_size: histogram by CompanySize, for example, \"SMALL\", \"MEDIUM\", \"BIG\". * publish_time_in_day: histogram by the Job.posting_publish_time in days. Must specify list of numeric buckets in spec. * publish_time_in_month: histogram by the Job.posting_publish_time in months. Must specify list of numeric buckets in spec. * publish_time_in_year: histogram by the Job.posting_publish_time in years. Must specify list of numeric buckets in spec. * degree_types: histogram by the Job.degree_types, for example, \"Bachelors\", \"Masters\". * job_level: histogram by the Job.job_level, for example, \"Entry Level\". * country: histogram by the country code of jobs, for example, \"US\", \"FR\". * admin1: histogram by the admin1 code of jobs, which is a global placeholder referring to the state, province, or the particular term a country uses to define the geographic structure below the country level, for example, \"CA\", \"IL\". * city: histogram by a combination of the \"city name, admin1 code\". For example, \"Mountain View, CA\", \"New York, NY\". * admin1_country: histogram by a combination of the \"admin1 code, country\", for example, \"CA, US\", \"IL, US\". * city_coordinate: histogram by the city center's GPS coordinates (latitude and longitude), for example, 37.4038522,-122.0987765. Since the coordinates of a city center can change, customers may need to refresh them periodically. * locale: histogram by the Job.language_code, for example, \"en-US\", \"fr-FR\". * language: histogram by the language subtag of the Job.language_code, for example, \"en\", \"fr\". * category: histogram by the JobCategory, for example, \"COMPUTER_AND_IT\", \"HEALTHCARE\". * base_compensation_unit: histogram by the CompensationInfo.CompensationUnit of base salary, for example, \"WEEKLY\", \"MONTHLY\". * base_compensation: histogram by the base salary. Must specify list of numeric buckets to group results by. * annualized_base_compensation: histogram by the base annualized salary. Must specify list of numeric buckets to group results by. * annualized_total_compensation: histogram by the total annualized salary. Must specify list of numeric buckets to group results by. * string_custom_attribute: histogram by string Job.custom_attributes. Values can be accessed via square bracket notations like string_custom_attribute[\"key1\"]. * numeric_custom_attribute: histogram by numeric Job.custom_attributes. Values can be accessed via square bracket notations like numeric_custom_attribute[\"key1\"]. Must specify list of numeric buckets to group results by. Example expressions: * `count(admin1)` * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), bucket(100000, MAX)])` * `count(string_custom_attribute[\"some-string-custom-attribute\"])` * `count(numeric_custom_attribute[\"some-numeric-custom-attribute\"], [bucket(MIN, 0, \"negative\"), bucket(0, MAX, \"non-negative\")])`", "items": { "$ref": "HistogramQuery" }, diff --git a/jobs/v4/jobs-gen.go b/jobs/v4/jobs-gen.go index 1f999a6f4bf..eb142753918 100644 --- a/jobs/v4/jobs-gen.go +++ b/jobs/v4/jobs-gen.go @@ -1995,12 +1995,17 @@ type JobQuery struct { // company filters are allowed. Companies []string `json:"companies,omitempty"` - // CompanyDisplayNames: This filter specifies the exact company - // Company.display_name of the jobs to search against. If a value isn't - // specified, jobs within the search results are associated with any - // company. If multiple values are specified, jobs within the search - // results may be associated with any of the specified companies. At - // most 20 company display name filters are allowed. + // CompanyDisplayNames: This filter specifies the company + // Company.display_name of the jobs to search against. The company name + // must match the value exactly. Alternatively, if the value being + // searched for is wrapped in SUBSTRING_MATCH([value]), the company name + // must contain a case insensitive substring match of the value. Using + // this function may increase latency. Sample Value: + // SUBSTRING_MATCH(google) If a value isn't specified, jobs within the + // search results are associated with any company. If multiple values + // are specified, jobs within the search results may be associated with + // any of the specified companies. At most 20 company display name + // filters are allowed. CompanyDisplayNames []string `json:"companyDisplayNames,omitempty"` // CompensationFilter: This search filter is applied only to @@ -2948,8 +2953,8 @@ type PostalAddress struct { // RegionCode: Required. CLDR region code of the country/region of the // address. This is never inferred and it is up to the user to ensure - // the value is correct. See http://cldr.unicode.org/ and - // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + // the value is correct. See https://cldr.unicode.org/ and + // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html // for details. Example: "CH" for Switzerland. RegionCode string `json:"regionCode,omitempty"` @@ -3208,18 +3213,19 @@ type SearchJobsRequest struct { // calls are: * `count(string_histogram_facet)`: Count the number of // matching entities, for each distinct attribute value. * // `count(numeric_histogram_facet, list of buckets)`: Count the number - // of matching entities within each bucket. Data types: * Histogram - // facet: facet names with format `a-zA-Z+`. * String: string like "any - // string with backslash escape for quote(\")." * Number: whole number - // and floating point number like 10, -1 and -0.01. * List: list of - // elements with comma(,) separator surrounded by square brackets, for - // example, [1, 2, 3] and ["one", "two", "three"]. Built-in constants: * - // MIN (minimum number similar to java Double.MIN_VALUE) * MAX (maximum - // number similar to java Double.MAX_VALUE) Built-in functions: * - // bucket(start, end[, label]): bucket built-in function creates a - // bucket with range of start, end). Note that the end is exclusive, for - // example, bucket(1, MAX, "positive number") or bucket(1, 10). Job - // histogram facets: * company_display_name: histogram by + // of matching entities within each bucket. A maximum of 200 histogram + // buckets are supported. Data types: * Histogram facet: facet names + // with format `a-zA-Z+`. * String: string like "any string with + // backslash escape for quote(\")." * Number: whole number and floating + // point number like 10, -1 and -0.01. * List: list of elements with + // comma(,) separator surrounded by square brackets, for example, [1, 2, + // 3] and ["one", "two", "three"]. Built-in constants: * MIN (minimum + // number similar to java Double.MIN_VALUE) * MAX (maximum number + // similar to java Double.MAX_VALUE) Built-in functions: * bucket(start, + // end[, label]): bucket built-in function creates a bucket with range + // of start, end). Note that the end is exclusive, for example, + // bucket(1, MAX, "positive number") or bucket(1, 10). Job histogram + // facets: * company_display_name: histogram by // [Job.company_display_name. * employment_type: histogram by // Job.employment_types, for example, "FULL_TIME", "PART_TIME". * // company_size: histogram by CompanySize, for example, "SMALL", diff --git a/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json b/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json new file mode 100644 index 00000000000..434f640feca --- /dev/null +++ b/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json @@ -0,0 +1,1453 @@ +{ + "basePath": "", + "baseUrl": "https://playdeveloperreporting.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Playdeveloperreporting", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/play/developer/reporting", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "playdeveloperreporting:v1alpha1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://playdeveloperreporting.mtls.googleapis.com/", + "name": "playdeveloperreporting", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "anomalies": { + "methods": { + "list": { + "description": "Lists anomalies in any of the datasets.", + "flatPath": "v1alpha1/apps/{appsId}/anomalies", + "httpMethod": "GET", + "id": "playdeveloperreporting.anomalies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering criteria for anomalies. For basic filter guidance, please check: https://google.aip.dev/160. **Supported functions:** * `activeBetween(startTime, endTime)`: If specified, only list anomalies that were active in between `startTime` (inclusive) and `endTime` (exclusive). Both parameters are expected to conform to an RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC offsets are supported. Both `startTime` and `endTime` accept the special value `UNBOUNDED`, to signify intervals with no lower or upper bound, respectively. Examples: * `activeBetween(\"2021-04-21T11:30:00Z\", \"2021-07-21T00:00:00Z\")` * `activeBetween(UNBOUNDED, \"2021-11-21T00:00:00-04:00\")` * `activeBetween(\"2021-07-21T00:00:00-04:00\", UNBOUNDED)`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 10 anomalies will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListErrorReports` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent app for which anomalies were detected. Format: apps/{app}", + "location": "path", + "pattern": "^apps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/anomalies", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse" + } + } + } + }, + "vitals": { + "resources": { + "anrrate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/anrRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.anrrate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/anrRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/anrRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.anrrate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/anrRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse" + } + } + } + }, + "crashrate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/crashRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.crashrate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/crashRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/crashRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.crashrate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/crashRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse" + } + } + } + }, + "errors": { + "resources": { + "counts": { + "methods": { + "get": { + "description": "Describes the properties of the metrics set.", + "flatPath": "v1alpha1/apps/{appsId}/errorCountMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.errors.counts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the errors metric set. Format: apps/{app}/errorCountMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/errorCountMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metrics set.", + "flatPath": "v1alpha1/apps/{appsId}/errorCountMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.errors.counts.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/errorCountMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/errorCountMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse" + } + } + } + }, + "issues": { + "methods": { + "search": { + "description": "Searches all error issues in which reports have been grouped.", + "flatPath": "v1alpha1/apps/{appsId}/errorIssues:search", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.errors.issues.search", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A selection predicate to retrieve only a subset of the issues. Counts in the returned error issues will only reflect occurrences that matched the filter. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error issues that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error issues that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error issues that occurred in the requested devices. Example: `deviceModel = \"walleye\" OR deviceModel = \"marlin\"`. * `deviceType`: Matches error issues that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error issues of the requested types only. Valid candidates: `CRASH`, `ANR`. Example: `errorIssueType = CRASH OR errorIssueType = ANR`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR errorIssueType = ANR` is not a valid filter. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", + "location": "query", + "type": "string" + }, + "interval.endTime.day": { + "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.hours": { + "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.minutes": { + "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.month": { + "description": "Required. Month of year. Must be from 1 to 12.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.nanos": { + "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.seconds": { + "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.timeZone.id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "location": "query", + "type": "string" + }, + "interval.endTime.timeZone.version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "location": "query", + "type": "string" + }, + "interval.endTime.utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "location": "query", + "type": "string" + }, + "interval.endTime.year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.day": { + "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.hours": { + "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.minutes": { + "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.month": { + "description": "Required. Month of year. Must be from 1 to 12.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.nanos": { + "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.seconds": { + "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.timeZone.id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "location": "query", + "type": "string" + }, + "interval.startTime.timeZone.version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "location": "query", + "type": "string" + }, + "interval.startTime.utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "location": "query", + "type": "string" + }, + "interval.startTime.year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageSize": { + "description": "The maximum number of error issues to return. The service may return fewer than this value. If unspecified, at most 50 error issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource of the error issues, indicating the application for which they were received. Format: apps/{app}", + "location": "path", + "pattern": "^apps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/errorIssues:search", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse" + } + } + } + }, + "reports": { + "methods": { + "search": { + "description": "Searches all error reports received for an app.", + "flatPath": "v1alpha1/apps/{appsId}/errorReports:search", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.errors.reports.search", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A selection predicate to retrieve only a subset of the reports. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error reports that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error reports that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error reports that occurred in the requested devices. Example: `deviceModel = \"walleye\" OR deviceModel = \"marlin\"`. * `deviceType`: Matches error reports that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error reports of the requested types only. Valid candidates: `JAVA_CRASH`, `NATIVE_CRASH`, `ANR`. Example: `errorIssueType = JAVA_CRASH OR errorIssueType = NATIVE_CRASH`. * `errorIssueId`: Matches error reports belonging to the requested error issue ids only. Example: `errorIssueId = 1234 OR errorIssueId = 4567`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR versionCode = ANR`. The filter expression `versionCode = 123 OR errorIssueType = ANR` is not valid. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", + "location": "query", + "type": "string" + }, + "interval.endTime.day": { + "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.hours": { + "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.minutes": { + "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.month": { + "description": "Required. Month of year. Must be from 1 to 12.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.nanos": { + "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.seconds": { + "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.endTime.timeZone.id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "location": "query", + "type": "string" + }, + "interval.endTime.timeZone.version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "location": "query", + "type": "string" + }, + "interval.endTime.utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "location": "query", + "type": "string" + }, + "interval.endTime.year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.day": { + "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.hours": { + "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.minutes": { + "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.month": { + "description": "Required. Month of year. Must be from 1 to 12.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.nanos": { + "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.seconds": { + "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "interval.startTime.timeZone.id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "location": "query", + "type": "string" + }, + "interval.startTime.timeZone.version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "location": "query", + "type": "string" + }, + "interval.startTime.utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "location": "query", + "type": "string" + }, + "interval.startTime.year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageSize": { + "description": "The maximum number of reports to return. The service may return fewer than this value. If unspecified, at most 50 reports will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `SearchErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchErrorReports` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource of the reports, indicating the application for which they were received. Format: apps/{app}", + "location": "path", + "pattern": "^apps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/errorReports:search", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse" + } + } + } + } + } + }, + "excessivewakeuprate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/excessiveWakeupRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.excessivewakeuprate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/excessiveWakeupRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.excessivewakeuprate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse" + } + } + } + }, + "stuckbackgroundwakelockrate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1alpha1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse" + } + } + } + } + } + } + }, + "revision": "20220308", + "rootUrl": "https://playdeveloperreporting.googleapis.com/", + "schemas": { + "GooglePlayDeveloperReportingV1alpha1Anomaly": { + "description": "Represents an anomaly detected in a dataset. Our anomaly detection systems flag datapoints in a time series that fall outside of and expected range derived from historical data. Although those expected ranges have an upper and a lower bound, we only flag anomalies when the data has become unexpectedly _worse_, which usually corresponds to the case where the metric crosses the upper bound. Multiple contiguous datapoints in a timeline outside of the expected range will be grouped into a single anomaly. Therefore, an anomaly represents effectively a segment of a metric's timeline. The information stored in the `timeline_spec`, `dimensions` and `metric` can be used to fetch a full timeline with extended ragne for context. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1alpha1Anomaly", + "properties": { + "dimensions": { + "description": "Combination of dimensions in which the anomaly was detected.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1DimensionValue" + }, + "type": "array" + }, + "metric": { + "$ref": "GooglePlayDeveloperReportingV1alpha1MetricValue", + "description": "Metric where the anomaly was detected, together with the anomalous value." + }, + "metricSet": { + "description": "Metric set resource where the anomaly was detected.", + "type": "string" + }, + "name": { + "description": "Name of the anomaly. Format: apps/{app}/anomalies/{anomaly}", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", + "description": "Timeline specification that covers the anomaly period." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet": { + "description": "Singleton resource representing the set of ANR (Application not responding) metrics. This metric set contains ANRs data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. If your app exhibits an ANR rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about crashes, another stability metric.", + "id": "GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/anrRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet": { + "description": "Singleton resource representing the set of crashrate metrics. This metric set contains crashes data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. If your app exhibits a crash rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about ANRs, another stability metric.", + "id": "GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/crashRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1DimensionValue": { + "description": "Represents the value of a single dimension.", + "id": "GooglePlayDeveloperReportingV1alpha1DimensionValue", + "properties": { + "dimension": { + "description": "Name of the dimension.", + "type": "string" + }, + "int64Value": { + "description": "Actual value, represented as an int64.", + "format": "int64", + "type": "string" + }, + "stringValue": { + "description": "Actual value, represented as a string.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet": { + "description": "Singleton resource representing the set of error report metrics. This metric set contains unnormalized error report counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors.counts contains normalized metrics about Crashes, another stability metric. * vitals.errors.counts contains normalized metrics about ANRs, another stability metric.", + "id": "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/errorCountMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1ErrorIssue": { + "description": "A group of related ErrorReports received for an app. Similar error reports are grouped together into issues with a likely identical root cause. **Please note:** this resource is currently in Alpha. There could be changes to the issue grouping that would result in similar but more recent error reports being assigned to different issues. This could also cause some issues disappearing entirely and being replaced by new ones. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1alpha1ErrorIssue", + "properties": { + "cause": { + "description": "Cause of the issue. Depending on the type this can be either: * APPLICATION_NOT_RESPONDING: the type of ANR that occurred, e.g., 'Input dispatching timed out'. * CRASH: for Java unhandled exception errors, the type of the innermost exception that was thrown, e.g., IllegalArgumentException. For signals in native code, the signal that was raised, e.g. SIGSEGV.", + "type": "string" + }, + "location": { + "description": "Location where the issue happened. Depending on the type this can be either: * APPLICATION_NOT_RESPONDING: the name of the activity or service that stopped responding. * CRASH: the likely method name that caused the error.", + "type": "string" + }, + "name": { + "description": "The resource name of the issue. Format: apps/{app}/errorIssues/{issue}", + "type": "string" + }, + "type": { + "description": "Type of the errors grouped in this issue.", + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "APPLICATION_NOT_RESPONDING", + "CRASH" + ], + "enumDescriptions": [ + "Unspecified error type.", + "Application Not Responding (ANR) error. To learn more about this type of errors visit the corresponding Android Developers documentation.", + "Crash caused by an unhandled exception in Java (or Kotlin or any other JVM language) or a signal in native code such as SIGSEGV." + ], + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1ErrorReport": { + "description": "An error report received for an app. There reports are produced by the Android platform code when a (potentially fatal) error condition is detected. Identical reports from many users will be deduplicated and coalesced into a single ErrorReport. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1alpha1ErrorReport", + "properties": { + "issue": { + "description": "The issue this report was associated with. **Please note:** this resource is currently in Alpha. There could be changes to the issue grouping that would result in similar but more recent error reports being assigned to a different issue.", + "type": "string" + }, + "name": { + "description": "The resource name of the report. Format: apps/{app}/errorReports/{report}", + "type": "string" + }, + "reportText": { + "description": "Textual representation of the error report. These textual reports are produced by the platform. The reports are then sanitized and filtered to remove any potentially sensitive information. Although their format is fairly stable, they are not entirely meant for machine consumption and we cannot guarantee that there won't be subtle changes to the formatting that may break systems trying to parse information out of the reports.", + "type": "string" + }, + "type": { + "description": "Type of the error for which this report was generated.", + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "APPLICATION_NOT_RESPONDING", + "CRASH" + ], + "enumDescriptions": [ + "Unspecified error type.", + "Application Not Responding (ANR) error. To learn more about this type of errors visit the corresponding Android Developers documentation.", + "Crash caused by an unhandled exception in Java (or Kotlin or any other JVM language) or a signal in native code such as SIGSEGV." + ], + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet": { + "description": "Singleton resource representing the set of Excessive Weakeups metrics. This metric set contains AlarmManager wakeup counts data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. If your app exhibits an excessive wakeup rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1FreshnessInfo": { + "description": "Represents the latest available time that can be requested in a TimelineSpec. Different aggregation periods have different freshness. For example, `DAILY` aggregation may lag behind `HOURLY` in cases where such aggregation is computed only once at the end of the day.", + "id": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", + "properties": { + "freshnesses": { + "description": "Information about data freshness for every supported aggregation period. This field has set semantics, keyed by the `aggregation_period` field.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness": { + "description": "Information about data freshness for a single aggregation period.", + "id": "GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness", + "properties": { + "aggregationPeriod": { + "description": "Aggregation period for which data is available.", + "enum": [ + "AGGREGATION_PERIOD_UNSPECIFIED", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified granularity.", + "Data is aggregated in hourly intervals.", + "Data is aggregated in daily intervals." + ], + "type": "string" + }, + "latestEndTime": { + "$ref": "GoogleTypeDateTime", + "description": "Latest end time for which data is available, for the aggregation period. The time is specified in the metric set's default timezone. *Note:* time ranges in TimelineSpec are represented as `start_time, end_time)`. For example, if the latest available timeline data point for a `DAILY` aggregation period is `2021-06-23 00:00:00 America/Los_Angeles`, the value of this field would be `2021-06-24 00:00:00 America/Los_Angeles` so it can be easily reused in [TimelineSpec.end_time." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse": { + "description": "Response with a list of anomalies in datasets.", + "id": "GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse", + "properties": { + "anomalies": { + "description": "Anomalies that were found.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1Anomaly" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1MetricValue": { + "description": "Represents the value of a metric.", + "id": "GooglePlayDeveloperReportingV1alpha1MetricValue", + "properties": { + "decimalValue": { + "$ref": "GoogleTypeDecimal", + "description": "Actual value, represented as a decimal number." + }, + "metric": { + "description": "Name of the metric.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1MetricsRow": { + "description": "Represents a row of dimensions and metrics.", + "id": "GooglePlayDeveloperReportingV1alpha1MetricsRow", + "properties": { + "aggregationPeriod": { + "description": "Granularity of the aggregation period of the row.", + "enum": [ + "AGGREGATION_PERIOD_UNSPECIFIED", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified granularity.", + "Data is aggregated in hourly intervals.", + "Data is aggregated in daily intervals." + ], + "type": "string" + }, + "dimensions": { + "description": "Dimension columns in the row.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1DimensionValue" + }, + "type": "array" + }, + "metrics": { + "description": "Metric columns in the row.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1MetricValue" + }, + "type": "array" + }, + "startTime": { + "$ref": "GoogleTypeDateTime", + "description": "Starting date (and time for hourly aggregation) of the period covered by this row." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest": { + "description": "Request message for QueryAnrRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. If your app exhibits an ANR rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse": { + "description": "Response message for QueryAnrRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest": { + "description": "Request message for QueryCrashRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. If your app exhibits a crash rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse": { + "description": "Response message for QueryCrashRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest": { + "description": "Request message for QueryErrorCountMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name.", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse": { + "description": "Error counts query response.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest": { + "description": "Request message for QueryExcessiveWakeupRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. If your app exhibits an excessive wakeup rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse": { + "description": "Response message for QueryExcessiveWakeupRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest": { + "description": "Request message for QueryStuckBackgroundWakelockRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. If your app exhibits a stuck background wakelock rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse": { + "description": "Response message for QueryStuckBackgroundWakelockRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse": { + "description": "Response with a paginated list of issues that matched the request.", + "id": "GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse", + "properties": { + "errorIssues": { + "description": "ErrorIssues that were found.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1ErrorIssue" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse": { + "description": "Response with a paginated list of error reports matching the search query.", + "id": "GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse", + "properties": { + "errorReports": { + "description": "Error reports that were found.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1alpha1ErrorReport" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Page token to fetch the next page of reports.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet": { + "description": "Singleton resource representing the set of Stuck Background Wakelocks metrics. This metric set contains PowerManager wakelock duration data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. If your app exhibits a stuck background wakelocks rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if their app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1alpha1TimelineSpec": { + "description": "Specification of the time-related aggregation parameters of a timeline. Timelines have an aggregation period (`DAILY`, `HOURLY`, etc) which defines how events are aggregated in metrics. The points in a timeline are defined by the starting DateTime of the aggregation period. The duration is implicit in the AggregationPeriod. Hourly aggregation periods, when supported by a metric set, are always specified in UTC to avoid ambiguities around daylight saving time transitions, where an hour is skipped when adopting DST, and repeated when abandoning DST. For example, the timestamp '2021-11-07 01:00:00 America/Los_Angeles' is ambiguous since it can correspond to '2021-11-07 08:00:00 UTC' or '2021-11-07 09:00:00 UTC'. Daily aggregation periods require specifying a timezone which will determine the precise instants of the start and the end of the day. Not all metric sets support all timezones, so make sure to check which timezones are supported by the metric set you want to query.", + "id": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", + "properties": { + "aggregationPeriod": { + "description": "Type of the aggregation period of the datapoints in the timeline. Intervals are identified by the date and time at the start of the interval.", + "enum": [ + "AGGREGATION_PERIOD_UNSPECIFIED", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified granularity.", + "Data is aggregated in hourly intervals.", + "Data is aggregated in daily intervals." + ], + "type": "string" + }, + "endTime": { + "$ref": "GoogleTypeDateTime", + "description": "Ending datapoint of the timeline (exclusive). See start_time for restrictions. The timezone of the end point must match the timezone of the start point." + }, + "startTime": { + "$ref": "GoogleTypeDateTime", + "description": "Starting datapoint of the timeline (inclusive). Must be aligned to the aggregation period as follows: * HOURLY: the 'minutes', 'seconds' and 'nanos' fields must be unset. The time_zone can be left unset (defaults to UTC) or set explicitly to \"UTC\". Setting any other utc_offset or timezone id will result in a validation error. * DAILY: the 'hours', 'minutes', 'seconds' and 'nanos' fields must be unset. Different metric sets support different timezones. It can be left unset to use the default timezone specified by the metric set. The timezone of the end point must match the timezone of the start point." + } + }, + "type": "object" + }, + "GoogleTypeDateTime": { + "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is considered not to have a specific year. month and day must have valid, non-zero values. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", + "id": "GoogleTypeDateTime", + "properties": { + "day": { + "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + "format": "int32", + "type": "integer" + }, + "hours": { + "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Required. Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + }, + "timeZone": { + "$ref": "GoogleTypeTimeZone", + "description": "Time zone." + }, + "utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "type": "string" + }, + "year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleTypeDecimal": { + "description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", + "id": "GoogleTypeDecimal", + "properties": { + "value": { + "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -\u003e `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeTimeZone": { + "description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", + "id": "GoogleTypeTimeZone", + "properties": { + "id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "type": "string" + }, + "version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Google Play Developer Reporting API", + "version": "v1alpha1", + "version_module": true +} \ No newline at end of file diff --git a/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go new file mode 100644 index 00000000000..a5a8e827640 --- /dev/null +++ b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go @@ -0,0 +1,4691 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package playdeveloperreporting provides access to the Google Play Developer Reporting API. +// +// For product documentation, see: https://developers.google.com/play/developer/reporting +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/playdeveloperreporting/v1alpha1" +// ... +// ctx := context.Background() +// playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package playdeveloperreporting // import "google.golang.org/api/playdeveloperreporting/v1alpha1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// 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 _ = internaloption.WithDefaultEndpoint + +const apiId = "playdeveloperreporting:v1alpha1" +const apiName = "playdeveloperreporting" +const apiVersion = "v1alpha1" +const basePath = "https://playdeveloperreporting.googleapis.com/" +const mtlsBasePath = "https://playdeveloperreporting.mtls.googleapis.com/" + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Anomalies = NewAnomaliesService(s) + s.Vitals = NewVitalsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Anomalies *AnomaliesService + + Vitals *VitalsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewAnomaliesService(s *Service) *AnomaliesService { + rs := &AnomaliesService{s: s} + return rs +} + +type AnomaliesService struct { + s *Service +} + +func NewVitalsService(s *Service) *VitalsService { + rs := &VitalsService{s: s} + rs.Anrrate = NewVitalsAnrrateService(s) + rs.Crashrate = NewVitalsCrashrateService(s) + rs.Errors = NewVitalsErrorsService(s) + rs.Excessivewakeuprate = NewVitalsExcessivewakeuprateService(s) + rs.Stuckbackgroundwakelockrate = NewVitalsStuckbackgroundwakelockrateService(s) + return rs +} + +type VitalsService struct { + s *Service + + Anrrate *VitalsAnrrateService + + Crashrate *VitalsCrashrateService + + Errors *VitalsErrorsService + + Excessivewakeuprate *VitalsExcessivewakeuprateService + + Stuckbackgroundwakelockrate *VitalsStuckbackgroundwakelockrateService +} + +func NewVitalsAnrrateService(s *Service) *VitalsAnrrateService { + rs := &VitalsAnrrateService{s: s} + return rs +} + +type VitalsAnrrateService struct { + s *Service +} + +func NewVitalsCrashrateService(s *Service) *VitalsCrashrateService { + rs := &VitalsCrashrateService{s: s} + return rs +} + +type VitalsCrashrateService struct { + s *Service +} + +func NewVitalsErrorsService(s *Service) *VitalsErrorsService { + rs := &VitalsErrorsService{s: s} + rs.Counts = NewVitalsErrorsCountsService(s) + rs.Issues = NewVitalsErrorsIssuesService(s) + rs.Reports = NewVitalsErrorsReportsService(s) + return rs +} + +type VitalsErrorsService struct { + s *Service + + Counts *VitalsErrorsCountsService + + Issues *VitalsErrorsIssuesService + + Reports *VitalsErrorsReportsService +} + +func NewVitalsErrorsCountsService(s *Service) *VitalsErrorsCountsService { + rs := &VitalsErrorsCountsService{s: s} + return rs +} + +type VitalsErrorsCountsService struct { + s *Service +} + +func NewVitalsErrorsIssuesService(s *Service) *VitalsErrorsIssuesService { + rs := &VitalsErrorsIssuesService{s: s} + return rs +} + +type VitalsErrorsIssuesService struct { + s *Service +} + +func NewVitalsErrorsReportsService(s *Service) *VitalsErrorsReportsService { + rs := &VitalsErrorsReportsService{s: s} + return rs +} + +type VitalsErrorsReportsService struct { + s *Service +} + +func NewVitalsExcessivewakeuprateService(s *Service) *VitalsExcessivewakeuprateService { + rs := &VitalsExcessivewakeuprateService{s: s} + return rs +} + +type VitalsExcessivewakeuprateService struct { + s *Service +} + +func NewVitalsStuckbackgroundwakelockrateService(s *Service) *VitalsStuckbackgroundwakelockrateService { + rs := &VitalsStuckbackgroundwakelockrateService{s: s} + return rs +} + +type VitalsStuckbackgroundwakelockrateService struct { + s *Service +} + +// GooglePlayDeveloperReportingV1alpha1Anomaly: Represents an anomaly +// detected in a dataset. Our anomaly detection systems flag datapoints +// in a time series that fall outside of and expected range derived from +// historical data. Although those expected ranges have an upper and a +// lower bound, we only flag anomalies when the data has become +// unexpectedly _worse_, which usually corresponds to the case where the +// metric crosses the upper bound. Multiple contiguous datapoints in a +// timeline outside of the expected range will be grouped into a single +// anomaly. Therefore, an anomaly represents effectively a segment of a +// metric's timeline. The information stored in the `timeline_spec`, +// `dimensions` and `metric` can be used to fetch a full timeline with +// extended ragne for context. **Required permissions**: to access this +// resource, the calling user needs the _View app information +// (read-only)_ permission for the app. +type GooglePlayDeveloperReportingV1alpha1Anomaly struct { + // Dimensions: Combination of dimensions in which the anomaly was + // detected. + Dimensions []*GooglePlayDeveloperReportingV1alpha1DimensionValue `json:"dimensions,omitempty"` + + // Metric: Metric where the anomaly was detected, together with the + // anomalous value. + Metric *GooglePlayDeveloperReportingV1alpha1MetricValue `json:"metric,omitempty"` + + // MetricSet: Metric set resource where the anomaly was detected. + MetricSet string `json:"metricSet,omitempty"` + + // Name: Name of the anomaly. Format: apps/{app}/anomalies/{anomaly} + Name string `json:"name,omitempty"` + + // TimelineSpec: Timeline specification that covers the anomaly period. + TimelineSpec *GooglePlayDeveloperReportingV1alpha1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1Anomaly) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1Anomaly + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet: Singleton +// resource representing the set of ANR (Application not responding) +// metrics. This metric set contains ANRs data combined with usage data +// to produce a normalized metric independent of user counts. +// **Supported aggregation periods:** * DAILY: metrics are aggregated in +// calendar date intervals. Due to historical constraints, the only +// supported timezone is `America/Los_Angeles`. **Supported metrics:** * +// `anrRate` (`google.type.Decimal`): Percentage of distinct users in +// the aggregation period that experienced at least one ANR. If your app +// exhibits an ANR rate equal to or higher than the threshold, it's in +// the bottom 25% of the top 1,000 apps on Google Play (by number of +// installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling +// average value of `anrRate` in the last 7 days. The daily values are +// weighted by the count of distinct users for the day. * +// `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average +// value of `anrRate` in the last 28 days. The daily values are weighted +// by the count of distinct users for the day. * `distinctUsers` +// (`google.type.Decimal`): Count of distinct users in the aggregation +// period that were used as normalization value for the `anrRate` +// metric. A user is counted in this metric if they used the app in the +// foreground during the aggregation period. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. **Supported dimensions:** * `apiLevel` (string): the +// API level of Android that was running on the user's device. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the +// user's device model. * `deviceType` (string): the type (also known as +// form factor) of the user's device. * `countryCode` (string): the +// country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. **Related metric sets:** * vitals.errors contains +// unnormalized version (absolute counts) of crashes. * vitals.errors +// contains normalized metrics about crashes, another stability metric. +type GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1alpha1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: apps/{app}/anrRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet: Singleton +// resource representing the set of crashrate metrics. This metric set +// contains crashes data combined with usage data to produce a +// normalized metric independent of user counts. **Supported aggregation +// periods:** * DAILY: metrics are aggregated in calendar date +// intervals. Due to historical constraints, the only supported timezone +// is `America/Los_Angeles`. **Supported metrics:** * `crashRate` +// (`google.type.Decimal`): Percentage of distinct users in the +// aggregation period that experienced at least one crash. If your app +// exhibits a crash rate equal to or higher than the threshold, it's in +// the bottom 25% of the top 1,000 apps on Google Play (by number of +// installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): +// Rolling average value of `crashRate` in the last 7 days. The daily +// values are weighted by the count of distinct users for the day. * +// `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average +// value of `crashRate` in the last 28 days. The daily values are +// weighted by the count of distinct users for the day. * +// `distinctUsers` (`google.type.Decimal`): Count of distinct users in +// the aggregation period that were used as normalization value for the +// `crashRate` metric. A user is counted in this metric if they used the +// app in the foreground during the aggregation period. Care must be +// taken not to aggregate this count further, as it may result in users +// being counted multiple times. **Supported dimensions:** * `apiLevel` +// (string): the API level of Android that was running on the user's +// device. * `versionCode` (int64): version of the app that was running +// on the user's device. * `deviceModel` (string): unique identifier of +// the user's device model. * `deviceType` (string): the type (also +// known as form factor) of the user's device. * `countryCode` (string): +// the country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. **Related metric sets:** * vitals.errors contains +// unnormalized version (absolute counts) of crashes. * vitals.errors +// contains normalized metrics about ANRs, another stability metric. +type GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1alpha1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: apps/{app}/crashRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1DimensionValue: Represents the +// value of a single dimension. +type GooglePlayDeveloperReportingV1alpha1DimensionValue struct { + // Dimension: Name of the dimension. + Dimension string `json:"dimension,omitempty"` + + // Int64Value: Actual value, represented as an int64. + Int64Value int64 `json:"int64Value,omitempty,string"` + + // StringValue: Actual value, represented as a string. + StringValue string `json:"stringValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimension") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimension") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1DimensionValue) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1DimensionValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet: Singleton +// resource representing the set of error report metrics. This metric +// set contains unnormalized error report counts. **Supported +// aggregation periods:** * DAILY: metrics are aggregated in calendar +// date intervals. The default and only supported timezone is +// `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` +// (`google.type.Decimal`): Absolute count of individual error reports +// that have been received for an app. * `distinctUsers` +// (`google.type.Decimal`): Count of distinct users for which reports +// have been received. Care must be taken not to aggregate this count +// further, as it may result in users being counted multiple times. +// **Supported dimensions:** * `apiLevel` (string): the API level of +// Android that was running on the user's device. * `versionCode` +// (int64): version of the app that was running on the user's device. * +// `deviceModel` (string): unique identifier of the user's device model. +// * `deviceType` (string): identifier of the device's form factor, +// e.g., PHONE. * `reportType` (string): the type of error. The value +// should correspond to one of the possible values in ErrorType. * +// `issueId` (string): the id an error was assigned to. The value should +// correspond to the `{issue}` component of the issue name. **Required +// permissions**: to access this resource, the calling user needs the +// _View app information (read-only)_ permission for the app. **Related +// metric sets:** * vitals.errors.counts contains normalized metrics +// about Crashes, another stability metric. * vitals.errors.counts +// contains normalized metrics about ANRs, another stability metric. +type GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1alpha1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: apps/{app}/errorCountMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1ErrorIssue: A group of related +// ErrorReports received for an app. Similar error reports are grouped +// together into issues with a likely identical root cause. **Please +// note:** this resource is currently in Alpha. There could be changes +// to the issue grouping that would result in similar but more recent +// error reports being assigned to different issues. This could also +// cause some issues disappearing entirely and being replaced by new +// ones. **Required permissions**: to access this resource, the calling +// user needs the _View app information (read-only)_ permission for the +// app. +type GooglePlayDeveloperReportingV1alpha1ErrorIssue struct { + // Cause: Cause of the issue. Depending on the type this can be either: + // * APPLICATION_NOT_RESPONDING: the type of ANR that occurred, e.g., + // 'Input dispatching timed out'. * CRASH: for Java unhandled exception + // errors, the type of the innermost exception that was thrown, e.g., + // IllegalArgumentException. For signals in native code, the signal that + // was raised, e.g. SIGSEGV. + Cause string `json:"cause,omitempty"` + + // Location: Location where the issue happened. Depending on the type + // this can be either: * APPLICATION_NOT_RESPONDING: the name of the + // activity or service that stopped responding. * CRASH: the likely + // method name that caused the error. + Location string `json:"location,omitempty"` + + // Name: The resource name of the issue. Format: + // apps/{app}/errorIssues/{issue} + Name string `json:"name,omitempty"` + + // Type: Type of the errors grouped in this issue. + // + // Possible values: + // "ERROR_TYPE_UNSPECIFIED" - Unspecified error type. + // "APPLICATION_NOT_RESPONDING" - Application Not Responding (ANR) + // error. To learn more about this type of errors visit the + // corresponding Android Developers documentation. + // "CRASH" - Crash caused by an unhandled exception in Java (or Kotlin + // or any other JVM language) or a signal in native code such as + // SIGSEGV. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cause") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cause") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1ErrorIssue) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1ErrorIssue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1ErrorReport: An error report +// received for an app. There reports are produced by the Android +// platform code when a (potentially fatal) error condition is detected. +// Identical reports from many users will be deduplicated and coalesced +// into a single ErrorReport. **Required permissions**: to access this +// resource, the calling user needs the _View app information +// (read-only)_ permission for the app. +type GooglePlayDeveloperReportingV1alpha1ErrorReport struct { + // Issue: The issue this report was associated with. **Please note:** + // this resource is currently in Alpha. There could be changes to the + // issue grouping that would result in similar but more recent error + // reports being assigned to a different issue. + Issue string `json:"issue,omitempty"` + + // Name: The resource name of the report. Format: + // apps/{app}/errorReports/{report} + Name string `json:"name,omitempty"` + + // ReportText: Textual representation of the error report. These textual + // reports are produced by the platform. The reports are then sanitized + // and filtered to remove any potentially sensitive information. + // Although their format is fairly stable, they are not entirely meant + // for machine consumption and we cannot guarantee that there won't be + // subtle changes to the formatting that may break systems trying to + // parse information out of the reports. + ReportText string `json:"reportText,omitempty"` + + // Type: Type of the error for which this report was generated. + // + // Possible values: + // "ERROR_TYPE_UNSPECIFIED" - Unspecified error type. + // "APPLICATION_NOT_RESPONDING" - Application Not Responding (ANR) + // error. To learn more about this type of errors visit the + // corresponding Android Developers documentation. + // "CRASH" - Crash caused by an unhandled exception in Java (or Kotlin + // or any other JVM language) or a signal in native code such as + // SIGSEGV. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Issue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Issue") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1ErrorReport) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1ErrorReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet: +// Singleton resource representing the set of Excessive Weakeups +// metrics. This metric set contains AlarmManager wakeup counts data +// combined with process state data to produce a normalized metric +// independent of user counts. **Supported aggregation periods:** * +// DAILY: metrics are aggregated in calendar date intervals. Due to +// historical constraints, the only supported timezone is +// `America/Los_Angeles`. **Supported metrics:** * `excessiveWakeupRate` +// (`google.type.Decimal`): Percentage of distinct users in the +// aggregation period that had more than 10 wakeups per hour. If your +// app exhibits an excessive wakeup rate equal to or higher than the +// threshold, it's in the bottom 25% of the top 1,000 apps on Google +// Play (by number of installs). * `excessiveWakeupRate7dUserWeighted` +// (`google.type.Decimal`): Rolling average value of +// `excessiveWakeupRate` in the last 7 days. The daily values are +// weighted by the count of distinct users for the day. * +// `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling +// average value of `excessiveWakeupRate` in the last 28 days. The daily +// values are weighted by the count of distinct users for the day. * +// `distinctUsers` (`google.type.Decimal`): Count of distinct users in +// the aggregation period that were used as normalization value for the +// `excessiveWakeupRate` metric. A user is counted in this metric if +// they app was doing any work on the device, i.e., not just active +// foreground usage but also background work. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. **Supported dimensions:** * `apiLevel` (string): the +// API level of Android that was running on the user's device. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the +// user's device model. * `deviceType` (string): the type (also known as +// form factor) of the user's device. * `countryCode` (string): the +// country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. +type GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1alpha1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: + // apps/{app}/excessiveWakeupRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1FreshnessInfo: Represents the +// latest available time that can be requested in a TimelineSpec. +// Different aggregation periods have different freshness. For example, +// `DAILY` aggregation may lag behind `HOURLY` in cases where such +// aggregation is computed only once at the end of the day. +type GooglePlayDeveloperReportingV1alpha1FreshnessInfo struct { + // Freshnesses: Information about data freshness for every supported + // aggregation period. This field has set semantics, keyed by the + // `aggregation_period` field. + Freshnesses []*GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness `json:"freshnesses,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Freshnesses") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Freshnesses") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1FreshnessInfo) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1FreshnessInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness: +// Information about data freshness for a single aggregation period. +type GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness struct { + // AggregationPeriod: Aggregation period for which data is available. + // + // Possible values: + // "AGGREGATION_PERIOD_UNSPECIFIED" - Unspecified granularity. + // "HOURLY" - Data is aggregated in hourly intervals. + // "DAILY" - Data is aggregated in daily intervals. + AggregationPeriod string `json:"aggregationPeriod,omitempty"` + + // LatestEndTime: Latest end time for which data is available, for the + // aggregation period. The time is specified in the metric set's default + // timezone. *Note:* time ranges in TimelineSpec are represented as + // `start_time, end_time)`. For example, if the latest available + // timeline data point for a `DAILY` aggregation period is `2021-06-23 + // 00:00:00 America/Los_Angeles`, the value of this field would be + // `2021-06-24 00:00:00 America/Los_Angeles` so it can be easily reused + // in [TimelineSpec.end_time. + LatestEndTime *GoogleTypeDateTime `json:"latestEndTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationPeriod") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationPeriod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse: Response +// with a list of anomalies in datasets. +type GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse struct { + // Anomalies: Anomalies that were found. + Anomalies []*GooglePlayDeveloperReportingV1alpha1Anomaly `json:"anomalies,omitempty"` + + // NextPageToken: Continuation token to fetch the next page of data. + 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. "Anomalies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Anomalies") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1MetricValue: Represents the value +// of a metric. +type GooglePlayDeveloperReportingV1alpha1MetricValue struct { + // DecimalValue: Actual value, represented as a decimal number. + DecimalValue *GoogleTypeDecimal `json:"decimalValue,omitempty"` + + // Metric: Name of the metric. + Metric string `json:"metric,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DecimalValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DecimalValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1MetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1MetricValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1MetricsRow: Represents a row of +// dimensions and metrics. +type GooglePlayDeveloperReportingV1alpha1MetricsRow struct { + // AggregationPeriod: Granularity of the aggregation period of the row. + // + // Possible values: + // "AGGREGATION_PERIOD_UNSPECIFIED" - Unspecified granularity. + // "HOURLY" - Data is aggregated in hourly intervals. + // "DAILY" - Data is aggregated in daily intervals. + AggregationPeriod string `json:"aggregationPeriod,omitempty"` + + // Dimensions: Dimension columns in the row. + Dimensions []*GooglePlayDeveloperReportingV1alpha1DimensionValue `json:"dimensions,omitempty"` + + // Metrics: Metric columns in the row. + Metrics []*GooglePlayDeveloperReportingV1alpha1MetricValue `json:"metrics,omitempty"` + + // StartTime: Starting date (and time for hourly aggregation) of the + // period covered by this row. + StartTime *GoogleTypeDateTime `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationPeriod") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationPeriod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1MetricsRow) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1MetricsRow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest: +// Request message for QueryAnrRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the metrics by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * `anrRate` + // (`google.type.Decimal`): Percentage of distinct users in the + // aggregation period that experienced at least one ANR. If your app + // exhibits an ANR rate equal to or higher than the threshold, it's in + // the bottom 25% of the top 1,000 apps on Google Play (by number of + // installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `anrRate` in the last 7 days. The daily values are + // weighted by the count of distinct users for the day. * + // `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average + // value of `anrRate` in the last 28 days. The daily values are weighted + // by the count of distinct users for the day. * `distinctUsers` + // (`google.type.Decimal`): Count of distinct users in the aggregation + // period that were used as normalization value for the `anrRate` + // metric. A user is counted in this metric if they used the app in the + // foreground during the aggregation period. Care must be taken not to + // aggregate this count further, as it may result in users being counted + // multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100,000; values + // above 100,000 will be coerced to 100,000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the default + // and only supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1alpha1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse: +// Response message for QueryAnrRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1alpha1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest: +// Request message for QueryCrashRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the metrics by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * `crashRate` + // (`google.type.Decimal`): Percentage of distinct users in the + // aggregation period that experienced at least one crash. If your app + // exhibits a crash rate equal to or higher than the threshold, it's in + // the bottom 25% of the top 1,000 apps on Google Play (by number of + // installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): + // Rolling average value of `crashRate` in the last 7 days. The daily + // values are weighted by the count of distinct users for the day. * + // `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average + // value of `crashRate` in the last 28 days. The daily values are + // weighted by the count of distinct users for the day. * + // `distinctUsers` (`google.type.Decimal`): Count of distinct users in + // the aggregation period that were used as normalization value for the + // `crashRate` metric. A user is counted in this metric if they used the + // app in the foreground during the aggregation period. Care must be + // taken not to aggregate this count further, as it may result in users + // being counted multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100,000; values + // above 100,000 will be coerced to 100,000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the default + // and only supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1alpha1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse: +// Response message for QueryCrashRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1alpha1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest: +// Request message for QueryErrorCountMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest struct { + // Dimensions: Dimensions to slice the data by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): identifier of the device's form factor, e.g., + // PHONE. * `reportType` (string): the type of error. The value should + // correspond to one of the possible values in ErrorType. * `issueId` + // (string): the id an error was assigned to. The value should + // correspond to the `{issue}` component of the issue name. + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * + // `errorReportCount` (`google.type.Decimal`): Absolute count of + // individual error reports that have been received for an app. * + // `distinctUsers` (`google.type.Decimal`): Count of distinct users for + // which reports have been received. Care must be taken not to aggregate + // this count further, as it may result in users being counted multiple + // times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100000; values above + // 100000 will be coerced to 100000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. The default and only supported timezone is + // `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1alpha1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse: +// Error counts query response. +type GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows. + Rows []*GooglePlayDeveloperReportingV1alpha1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetR +// equest: Request message for QueryExcessiveWakeupRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the data by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * + // `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct + // users in the aggregation period that had more than 10 wakeups per + // hour. If your app exhibits an excessive wakeup rate equal to or + // higher than the threshold, it's in the bottom 25% of the top 1,000 + // apps on Google Play (by number of installs). * + // `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `excessiveWakeupRate` in the last 7 days. The daily + // values are weighted by the count of distinct users for the day. * + // `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `excessiveWakeupRate` in the last 28 days. The daily + // values are weighted by the count of distinct users for the day. * + // `distinctUsers` (`google.type.Decimal`): Count of distinct users in + // the aggregation period that were used as normalization value for the + // `excessiveWakeupRate` metric. A user is counted in this metric if + // they app was doing any work on the device, i.e., not just active + // foreground usage but also background work. Care must be taken not to + // aggregate this count further, as it may result in users being counted + // multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100000; values above + // 100000 will be coerced to 100000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the only + // supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1alpha1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetR +// esponse: Response message for QueryExcessiveWakeupRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1alpha1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMe +// tricSetRequest: Request message for +// QueryStuckBackgroundWakelockRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the data by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * + // `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct + // users in the aggregation period that had a wakelock held in the + // background for longer than 1 hour. If your app exhibits a stuck + // background wakelock rate equal to or higher than the threshold, it's + // in the bottom 25% of the top 1,000 apps on Google Play (by number of + // installs). * `stuckBgWakelockRate7dUserWeighted` + // (`google.type.Decimal`): Rolling average value of + // `stuckBgWakelockRate` in the last 7 days. The daily values are + // weighted by the count of distinct users for the day. * + // `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `stuckBgWakelockRate` in the last 28 days. The daily + // values are weighted by the count of distinct users for the day. * + // `distinctUsers` (`google.type.Decimal`): Count of distinct users in + // the aggregation period that were used as normalization value for the + // `stuckBgWakelockRate` metric. A user is counted in this metric if + // they app was doing any work on the device, i.e., not just active + // foreground usage but also background work. Care must be taken not to + // aggregate this count further, as it may result in users being counted + // multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100000; values above + // 100000 will be coerced to 100000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the only + // supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1alpha1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMe +// tricSetResponse: Response message for +// QueryStuckBackgroundWakelockRateMetricSet. +type GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1alpha1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse: +// Response with a paginated list of issues that matched the request. +type GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse struct { + // ErrorIssues: ErrorIssues that were found. + ErrorIssues []*GooglePlayDeveloperReportingV1alpha1ErrorIssue `json:"errorIssues,omitempty"` + + // NextPageToken: Continuation token to fetch the next page of data. + 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. "ErrorIssues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorIssues") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse: +// Response with a paginated list of error reports matching the search +// query. +type GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse struct { + // ErrorReports: Error reports that were found. + ErrorReports []*GooglePlayDeveloperReportingV1alpha1ErrorReport `json:"errorReports,omitempty"` + + // NextPageToken: Page token to fetch the next page of reports. + 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. "ErrorReports") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorReports") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricS +// et: Singleton resource representing the set of Stuck Background +// Wakelocks metrics. This metric set contains PowerManager wakelock +// duration data combined with process state data to produce a +// normalized metric independent of user counts. **Supported aggregation +// periods:** * DAILY: metrics are aggregated in calendar date +// intervals. Due to historical constraints, the only supported timezone +// is `America/Los_Angeles`. **Supported metrics:** * +// `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct +// users in the aggregation period that had a wakelock held in the +// background for longer than 1 hour. If your app exhibits a stuck +// background wakelocks rate equal to or higher than the threshold, it's +// in the bottom 25% of the top 1,000 apps on Google Play (by number of +// installs). * `stuckBgWakelockRate7dUserWeighted` +// (`google.type.Decimal`): Rolling average value of +// `stuckBgWakelockRate` in the last 7 days. The daily values are +// weighted by the count of distinct users for the day. * +// `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling +// average value of `stuckBgWakelockRate` in the last 28 days. The daily +// values are weighted by the count of distinct users for the day. * +// `distinctUsers` (`google.type.Decimal`): Count of distinct users in +// the aggregation period that were used as normalization value for the +// `stuckBgWakelockRate` metric. A user is counted in this metric if +// their app was doing any work on the device, i.e., not just active +// foreground usage but also background work. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. **Supported dimensions:** * `apiLevel` (string): the +// API level of Android that was running on the user's device. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the +// user's device model. * `deviceType` (string): the type (also known as +// form factor) of the user's device. * `countryCode` (string): the +// country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. +type GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1alpha1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: + // apps/{app}/stuckBackgroundWakelockRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1alpha1TimelineSpec: Specification of +// the time-related aggregation parameters of a timeline. Timelines have +// an aggregation period (`DAILY`, `HOURLY`, etc) which defines how +// events are aggregated in metrics. The points in a timeline are +// defined by the starting DateTime of the aggregation period. The +// duration is implicit in the AggregationPeriod. Hourly aggregation +// periods, when supported by a metric set, are always specified in UTC +// to avoid ambiguities around daylight saving time transitions, where +// an hour is skipped when adopting DST, and repeated when abandoning +// DST. For example, the timestamp '2021-11-07 01:00:00 +// America/Los_Angeles' is ambiguous since it can correspond to +// '2021-11-07 08:00:00 UTC' or '2021-11-07 09:00:00 UTC'. Daily +// aggregation periods require specifying a timezone which will +// determine the precise instants of the start and the end of the day. +// Not all metric sets support all timezones, so make sure to check +// which timezones are supported by the metric set you want to query. +type GooglePlayDeveloperReportingV1alpha1TimelineSpec struct { + // AggregationPeriod: Type of the aggregation period of the datapoints + // in the timeline. Intervals are identified by the date and time at the + // start of the interval. + // + // Possible values: + // "AGGREGATION_PERIOD_UNSPECIFIED" - Unspecified granularity. + // "HOURLY" - Data is aggregated in hourly intervals. + // "DAILY" - Data is aggregated in daily intervals. + AggregationPeriod string `json:"aggregationPeriod,omitempty"` + + // EndTime: Ending datapoint of the timeline (exclusive). See start_time + // for restrictions. The timezone of the end point must match the + // timezone of the start point. + EndTime *GoogleTypeDateTime `json:"endTime,omitempty"` + + // StartTime: Starting datapoint of the timeline (inclusive). Must be + // aligned to the aggregation period as follows: * HOURLY: the + // 'minutes', 'seconds' and 'nanos' fields must be unset. The time_zone + // can be left unset (defaults to UTC) or set explicitly to "UTC". + // Setting any other utc_offset or timezone id will result in a + // validation error. * DAILY: the 'hours', 'minutes', 'seconds' and + // 'nanos' fields must be unset. Different metric sets support different + // timezones. It can be left unset to use the default timezone specified + // by the metric set. The timezone of the end point must match the + // timezone of the start point. + StartTime *GoogleTypeDateTime `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationPeriod") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationPeriod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1alpha1TimelineSpec) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1alpha1TimelineSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDateTime: Represents civil time (or occasionally physical +// time). This type can represent a civil time in one of a few possible +// ways: * When utc_offset is set and time_zone is unset: a civil time +// on a calendar day with a particular offset from UTC. * When time_zone +// is set and utc_offset is unset: a civil time on a calendar day in a +// particular time zone. * When neither time_zone nor utc_offset is set: +// a civil time on a calendar day in local time. The date is relative to +// the Proleptic Gregorian Calendar. If year is 0, the DateTime is +// considered not to have a specific year. month and day must have +// valid, non-zero values. This type may also be used to represent a +// physical time if all the date and time fields are set and either case +// of the `time_offset` oneof is set. Consider using `Timestamp` message +// for physical time instead. If your use case also would like to store +// the user's timezone, that can be done in another field. This type is +// more flexible than some applications may want. Make sure to document +// and validate your application's limitations. +type GoogleTypeDateTime struct { + // Day: Required. Day of month. Must be from 1 to 31 and valid for the + // year and month. + Day int64 `json:"day,omitempty"` + + // Hours: Required. Hours of day in 24 hour format. Should be from 0 to + // 23. An API may choose to allow the value "24:00:00" for scenarios + // like business closing time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Required. Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + + // Month: Required. Month of year. Must be from 1 to 12. + Month int64 `json:"month,omitempty"` + + // Nanos: Required. Fractions of seconds in nanoseconds. Must be from 0 + // to 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Required. Seconds of minutes of the time. Must normally be + // from 0 to 59. An API may allow the value 60 if it allows + // leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // TimeZone: Time zone. + TimeZone *GoogleTypeTimeZone `json:"timeZone,omitempty"` + + // UtcOffset: UTC offset. Must be whole seconds, between -18 hours and + // +18 hours. For example, a UTC offset of -4:00 would be represented as + // { seconds: -14400 }. + UtcOffset string `json:"utcOffset,omitempty"` + + // Year: Optional. Year of date. Must be from 1 to 9999, or 0 if + // specifying a datetime without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDateTime) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDateTime + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDecimal: A representation of a decimal value, such as 2.5. +// Clients may convert values into language-native decimal formats, such +// as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: +// https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html +// [decimal.Decimal]: https://docs.python.org/3/library/decimal.html +type GoogleTypeDecimal struct { + // Value: The decimal value, as a string. The string representation + // consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), + // followed by a sequence of zero or more decimal digits ("the + // integer"), optionally followed by a fraction, optionally followed by + // an exponent. The fraction consists of a decimal point followed by + // zero or more decimal digits. The string must contain at least one + // digit in either the integer or the fraction. The number formed by the + // sign, the integer and the fraction is referred to as the significand. + // The exponent consists of the character `e` (`U+0065`) or `E` + // (`U+0045`) followed by one or more decimal digits. Services + // **should** normalize decimal values before storing them by: - + // Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - + // Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - + // Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - + // Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + // Services **may** perform additional normalization based on its own + // needs and the internal decimal implementation selected, such as + // shifting the decimal point and exponent value together (example: + // `2.5e-1` <-> `0.25`). Additionally, services **may** preserve + // trailing zeroes in the fraction to indicate increased precision, but + // are not required to do so. Note that only the `.` character is + // supported to divide the integer and the fraction; `,` **should not** + // be supported regardless of locale. Additionally, thousand separators + // **should not** be supported. If a service does support them, values + // **must** be normalized. The ENBF grammar is: DecimalString = [Sign] + // Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | + // [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { + // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services + // **should** clearly document the range of supported values, the + // maximum supported precision (total number of digits), and, if + // applicable, the scale (number of digits after the decimal point), as + // well as how it behaves when receiving out-of-bounds values. Services + // **may** choose to accept values passed as input even when the value + // has a higher precision or scale than the service supports, and + // **should** round the value to fit the supported scale. Alternatively, + // the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` + // in gRPC) if precision would be lost. Services **should** error with + // `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service + // receives a value outside of the supported range. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDecimal) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDecimal + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone +// Database (https://www.iana.org/time-zones). +type GoogleTypeTimeZone struct { + // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + Id string `json:"id,omitempty"` + + // Version: Optional. IANA Time Zone Database version number, e.g. + // "2019a". + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleTypeTimeZone) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeTimeZone + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "playdeveloperreporting.anomalies.list": + +type AnomaliesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists anomalies in any of the datasets. +// +// - parent: Parent app for which anomalies were detected. Format: +// apps/{app}. +func (r *AnomaliesService) List(parent string) *AnomaliesListCall { + c := &AnomaliesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering criteria for +// anomalies. For basic filter guidance, please check: +// https://google.aip.dev/160. **Supported functions:** * +// `activeBetween(startTime, endTime)`: If specified, only list +// anomalies that were active in between `startTime` (inclusive) and +// `endTime` (exclusive). Both parameters are expected to conform to an +// RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC +// offsets are supported. Both `startTime` and `endTime` accept the +// special value `UNBOUNDED`, to signify intervals with no lower or +// upper bound, respectively. Examples: * +// `activeBetween("2021-04-21T11:30:00Z", "2021-07-21T00:00:00Z")` * +// `activeBetween(UNBOUNDED, "2021-11-21T00:00:00-04:00")` * +// `activeBetween("2021-07-21T00:00:00-04:00", UNBOUNDED)` +func (c *AnomaliesListCall) Filter(filter string) *AnomaliesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum size of the +// returned data. If unspecified, at most 10 anomalies will be returned. +// The maximum value is 100; values above 100 will be coerced to 100. +func (c *AnomaliesListCall) PageSize(pageSize int64) *AnomaliesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListErrorReports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListErrorReports` must match the call that provided the +// page token. +func (c *AnomaliesListCall) PageToken(pageToken string) *AnomaliesListCall { + 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 *AnomaliesListCall) Fields(s ...googleapi.Field) *AnomaliesListCall { + 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 *AnomaliesListCall) IfNoneMatch(entityTag string) *AnomaliesListCall { + 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 *AnomaliesListCall) Context(ctx context.Context) *AnomaliesListCall { + 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 *AnomaliesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AnomaliesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/anomalies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.anomalies.list" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse.ServerRespo +// nse.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 *AnomaliesListCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse, 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 := &GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse{ + 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 anomalies in any of the datasets.", + // "flatPath": "v1alpha1/apps/{appsId}/anomalies", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.anomalies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering criteria for anomalies. For basic filter guidance, please check: https://google.aip.dev/160. **Supported functions:** * `activeBetween(startTime, endTime)`: If specified, only list anomalies that were active in between `startTime` (inclusive) and `endTime` (exclusive). Both parameters are expected to conform to an RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC offsets are supported. Both `startTime` and `endTime` accept the special value `UNBOUNDED`, to signify intervals with no lower or upper bound, respectively. Examples: * `activeBetween(\"2021-04-21T11:30:00Z\", \"2021-07-21T00:00:00Z\")` * `activeBetween(UNBOUNDED, \"2021-11-21T00:00:00-04:00\")` * `activeBetween(\"2021-07-21T00:00:00-04:00\", UNBOUNDED)`", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum size of the returned data. If unspecified, at most 10 anomalies will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListErrorReports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent app for which anomalies were detected. Format: apps/{app}", + // "location": "path", + // "pattern": "^apps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+parent}/anomalies", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse" + // } + // } + +} + +// 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 *AnomaliesListCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse) 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 "playdeveloperreporting.vitals.anrrate.get": + +type VitalsAnrrateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: apps/{app}/anrRateMetricSet. +func (r *VitalsAnrrateService) Get(name string) *VitalsAnrrateGetCall { + c := &VitalsAnrrateGetCall{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 *VitalsAnrrateGetCall) Fields(s ...googleapi.Field) *VitalsAnrrateGetCall { + 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 *VitalsAnrrateGetCall) IfNoneMatch(entityTag string) *VitalsAnrrateGetCall { + 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 *VitalsAnrrateGetCall) Context(ctx context.Context) *VitalsAnrrateGetCall { + 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 *VitalsAnrrateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsAnrrateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.anrrate.get" call. +// Exactly one of *GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet.ServerResponse.H +// eader 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 *VitalsAnrrateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet, 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 := &GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/anrRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.anrrate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/anrRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.anrrate.query": + +type VitalsAnrrateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: apps/{app}/anrRateMetricSet. +func (r *VitalsAnrrateService) Query(name string, googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest) *VitalsAnrrateQueryCall { + c := &VitalsAnrrateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest = googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest + 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 *VitalsAnrrateQueryCall) Fields(s ...googleapi.Field) *VitalsAnrrateQueryCall { + 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 *VitalsAnrrateQueryCall) Context(ctx context.Context) *VitalsAnrrateQueryCall { + 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 *VitalsAnrrateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsAnrrateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.anrrate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse.Ser +// verResponse.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 *VitalsAnrrateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/anrRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.anrrate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/anrRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsAnrrateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest.PageToken = pt }(c.googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest.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.googleplaydeveloperreportingv1alpha1queryanrratemetricsetrequest.PageToken = x.NextPageToken + } +} + +// method id "playdeveloperreporting.vitals.crashrate.get": + +type VitalsCrashrateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: apps/{app}/crashRateMetricSet. +func (r *VitalsCrashrateService) Get(name string) *VitalsCrashrateGetCall { + c := &VitalsCrashrateGetCall{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 *VitalsCrashrateGetCall) Fields(s ...googleapi.Field) *VitalsCrashrateGetCall { + 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 *VitalsCrashrateGetCall) IfNoneMatch(entityTag string) *VitalsCrashrateGetCall { + 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 *VitalsCrashrateGetCall) Context(ctx context.Context) *VitalsCrashrateGetCall { + 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 *VitalsCrashrateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsCrashrateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.crashrate.get" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet.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 *VitalsCrashrateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet, 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 := &GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/crashRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.crashrate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/crashRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.crashrate.query": + +type VitalsCrashrateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: apps/{app}/crashRateMetricSet. +func (r *VitalsCrashrateService) Query(name string, googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest) *VitalsCrashrateQueryCall { + c := &VitalsCrashrateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest = googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest + 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 *VitalsCrashrateQueryCall) Fields(s ...googleapi.Field) *VitalsCrashrateQueryCall { + 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 *VitalsCrashrateQueryCall) Context(ctx context.Context) *VitalsCrashrateQueryCall { + 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 *VitalsCrashrateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsCrashrateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.crashrate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse.S +// erverResponse.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 *VitalsCrashrateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/crashRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.crashrate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/crashRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsCrashrateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest.PageToken = pt }(c.googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest.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.googleplaydeveloperreportingv1alpha1querycrashratemetricsetrequest.PageToken = x.NextPageToken + } +} + +// method id "playdeveloperreporting.vitals.errors.counts.get": + +type VitalsErrorsCountsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metrics set. +// +// - name: Name of the errors metric set. Format: +// apps/{app}/errorCountMetricSet. +func (r *VitalsErrorsCountsService) Get(name string) *VitalsErrorsCountsGetCall { + c := &VitalsErrorsCountsGetCall{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 *VitalsErrorsCountsGetCall) Fields(s ...googleapi.Field) *VitalsErrorsCountsGetCall { + 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 *VitalsErrorsCountsGetCall) IfNoneMatch(entityTag string) *VitalsErrorsCountsGetCall { + 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 *VitalsErrorsCountsGetCall) Context(ctx context.Context) *VitalsErrorsCountsGetCall { + 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 *VitalsErrorsCountsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsErrorsCountsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.errors.counts.get" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet.ServerRespons +// e.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 *VitalsErrorsCountsGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet, 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 := &GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet{ + 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": "Describes the properties of the metrics set.", + // "flatPath": "v1alpha1/apps/{appsId}/errorCountMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.errors.counts.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the errors metric set. Format: apps/{app}/errorCountMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/errorCountMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.errors.counts.query": + +type VitalsErrorsCountsQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metrics set. +// +// - name: The resource name. Format: apps/{app}/errorCountMetricSet. +func (r *VitalsErrorsCountsService) Query(name string, googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest) *VitalsErrorsCountsQueryCall { + c := &VitalsErrorsCountsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest = googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest + 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 *VitalsErrorsCountsQueryCall) Fields(s ...googleapi.Field) *VitalsErrorsCountsQueryCall { + 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 *VitalsErrorsCountsQueryCall) Context(ctx context.Context) *VitalsErrorsCountsQueryCall { + 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 *VitalsErrorsCountsQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsErrorsCountsQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.errors.counts.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse. +// 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 *VitalsErrorsCountsQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse{ + 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": "Queries the metrics in the metrics set.", + // "flatPath": "v1alpha1/apps/{appsId}/errorCountMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.errors.counts.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/errorCountMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/errorCountMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse" + // } + // } + +} + +// 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 *VitalsErrorsCountsQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest.PageToken = pt }(c.googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest.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.googleplaydeveloperreportingv1alpha1queryerrorcountmetricsetrequest.PageToken = x.NextPageToken + } +} + +// method id "playdeveloperreporting.vitals.errors.issues.search": + +type VitalsErrorsIssuesSearchCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Search: Searches all error issues in which reports have been grouped. +// +// - parent: Parent resource of the error issues, indicating the +// application for which they were received. Format: apps/{app}. +func (r *VitalsErrorsIssuesService) Search(parent string) *VitalsErrorsIssuesSearchCall { + c := &VitalsErrorsIssuesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A selection predicate to +// retrieve only a subset of the issues. Counts in the returned error +// issues will only reflect occurrences that matched the filter. For +// filtering basics, please check AIP-160 (https://google.aip.dev/160). +// ** Supported field names:** * `apiLevel`: Matches error issues that +// occurred in the requested Android versions (specified as the numeric +// API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * +// `versionCode`: Matches error issues that occurred in the requested +// app version codes only. Example: `versionCode = 123 OR versionCode = +// 456`. * `deviceModel`: Matches error issues that occurred in the +// requested devices. Example: `deviceModel = "walleye" OR deviceModel = +// "marlin". * `deviceType`: Matches error issues that occurred in the +// requested device types. Example: `deviceType = "PHONE". * +// `errorIssueType`: Matches error issues of the requested types only. +// Valid candidates: `CRASH`, `ANR`. Example: `errorIssueType = CRASH OR +// errorIssueType = ANR`. ** Supported operators:** * Comparison +// operators: The only supported comparison operator is equality. The +// filtered field must appear on the left hand side of the comparison. * +// Logical Operators: Logical operators `AND` and `OR` can be used to +// build complex filters following a conjunctive normal form (CNF), +// i.e., conjunctions of disjunctions. The `OR` operator takes +// precedence over `AND` so the use of parenthesis is not necessary when +// building CNF. The `OR` operator is only supported to build +// disjunctions that apply to the same field, e.g., `versionCode = 123 +// OR errorIssueType = ANR` is not a valid filter. ** Examples ** Some +// valid filtering expressions: * `versionCode = 123 AND errorIssueType +// = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = +// CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = +// CRASH)` +func (c *VitalsErrorsIssuesSearchCall) Filter(filter string) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IntervalEndTimeDay sets the optional parameter +// "interval.endTime.day": Required. Day of month. Must be from 1 to 31 +// and valid for the year and month. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeDay(intervalEndTimeDay int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.day", fmt.Sprint(intervalEndTimeDay)) + return c +} + +// IntervalEndTimeHours sets the optional parameter +// "interval.endTime.hours": Required. Hours of day in 24 hour format. +// Should be from 0 to 23. An API may choose to allow the value +// "24:00:00" for scenarios like business closing time. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeHours(intervalEndTimeHours int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.hours", fmt.Sprint(intervalEndTimeHours)) + return c +} + +// IntervalEndTimeMinutes sets the optional parameter +// "interval.endTime.minutes": Required. Minutes of hour of day. Must be +// from 0 to 59. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeMinutes(intervalEndTimeMinutes int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.minutes", fmt.Sprint(intervalEndTimeMinutes)) + return c +} + +// IntervalEndTimeMonth sets the optional parameter +// "interval.endTime.month": Required. Month of year. Must be from 1 to +// 12. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeMonth(intervalEndTimeMonth int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.month", fmt.Sprint(intervalEndTimeMonth)) + return c +} + +// IntervalEndTimeNanos sets the optional parameter +// "interval.endTime.nanos": Required. Fractions of seconds in +// nanoseconds. Must be from 0 to 999,999,999. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeNanos(intervalEndTimeNanos int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.nanos", fmt.Sprint(intervalEndTimeNanos)) + return c +} + +// IntervalEndTimeSeconds sets the optional parameter +// "interval.endTime.seconds": Required. Seconds of minutes of the time. +// Must normally be from 0 to 59. An API may allow the value 60 if it +// allows leap-seconds. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeSeconds(intervalEndTimeSeconds int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.seconds", fmt.Sprint(intervalEndTimeSeconds)) + return c +} + +// IntervalEndTimeTimeZoneId sets the optional parameter +// "interval.endTime.timeZone.id": IANA Time Zone Database time zone, +// e.g. "America/New_York". +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeTimeZoneId(intervalEndTimeTimeZoneId string) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.timeZone.id", intervalEndTimeTimeZoneId) + return c +} + +// IntervalEndTimeTimeZoneVersion sets the optional parameter +// "interval.endTime.timeZone.version": IANA Time Zone Database version +// number, e.g. "2019a". +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeTimeZoneVersion(intervalEndTimeTimeZoneVersion string) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.timeZone.version", intervalEndTimeTimeZoneVersion) + return c +} + +// IntervalEndTimeUtcOffset sets the optional parameter +// "interval.endTime.utcOffset": UTC offset. Must be whole seconds, +// between -18 hours and +18 hours. For example, a UTC offset of -4:00 +// would be represented as { seconds: -14400 }. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeUtcOffset(intervalEndTimeUtcOffset string) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.utcOffset", intervalEndTimeUtcOffset) + return c +} + +// IntervalEndTimeYear sets the optional parameter +// "interval.endTime.year": Year of date. Must be from 1 to 9999, or 0 +// if specifying a datetime without a year. +func (c *VitalsErrorsIssuesSearchCall) IntervalEndTimeYear(intervalEndTimeYear int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.endTime.year", fmt.Sprint(intervalEndTimeYear)) + return c +} + +// IntervalStartTimeDay sets the optional parameter +// "interval.startTime.day": Required. Day of month. Must be from 1 to +// 31 and valid for the year and month. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeDay(intervalStartTimeDay int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.day", fmt.Sprint(intervalStartTimeDay)) + return c +} + +// IntervalStartTimeHours sets the optional parameter +// "interval.startTime.hours": Required. Hours of day in 24 hour format. +// Should be from 0 to 23. An API may choose to allow the value +// "24:00:00" for scenarios like business closing time. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeHours(intervalStartTimeHours int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.hours", fmt.Sprint(intervalStartTimeHours)) + return c +} + +// IntervalStartTimeMinutes sets the optional parameter +// "interval.startTime.minutes": Required. Minutes of hour of day. Must +// be from 0 to 59. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeMinutes(intervalStartTimeMinutes int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.minutes", fmt.Sprint(intervalStartTimeMinutes)) + return c +} + +// IntervalStartTimeMonth sets the optional parameter +// "interval.startTime.month": Required. Month of year. Must be from 1 +// to 12. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeMonth(intervalStartTimeMonth int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.month", fmt.Sprint(intervalStartTimeMonth)) + return c +} + +// IntervalStartTimeNanos sets the optional parameter +// "interval.startTime.nanos": Required. Fractions of seconds in +// nanoseconds. Must be from 0 to 999,999,999. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeNanos(intervalStartTimeNanos int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.nanos", fmt.Sprint(intervalStartTimeNanos)) + return c +} + +// IntervalStartTimeSeconds sets the optional parameter +// "interval.startTime.seconds": Required. Seconds of minutes of the +// time. Must normally be from 0 to 59. An API may allow the value 60 if +// it allows leap-seconds. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeSeconds(intervalStartTimeSeconds int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.seconds", fmt.Sprint(intervalStartTimeSeconds)) + return c +} + +// IntervalStartTimeTimeZoneId sets the optional parameter +// "interval.startTime.timeZone.id": IANA Time Zone Database time zone, +// e.g. "America/New_York". +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeTimeZoneId(intervalStartTimeTimeZoneId string) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.timeZone.id", intervalStartTimeTimeZoneId) + return c +} + +// IntervalStartTimeTimeZoneVersion sets the optional parameter +// "interval.startTime.timeZone.version": IANA Time Zone Database +// version number, e.g. "2019a". +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeTimeZoneVersion(intervalStartTimeTimeZoneVersion string) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.timeZone.version", intervalStartTimeTimeZoneVersion) + return c +} + +// IntervalStartTimeUtcOffset sets the optional parameter +// "interval.startTime.utcOffset": UTC offset. Must be whole seconds, +// between -18 hours and +18 hours. For example, a UTC offset of -4:00 +// would be represented as { seconds: -14400 }. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeUtcOffset(intervalStartTimeUtcOffset string) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.utcOffset", intervalStartTimeUtcOffset) + return c +} + +// IntervalStartTimeYear sets the optional parameter +// "interval.startTime.year": Year of date. Must be from 1 to 9999, or 0 +// if specifying a datetime without a year. +func (c *VitalsErrorsIssuesSearchCall) IntervalStartTimeYear(intervalStartTimeYear int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("interval.startTime.year", fmt.Sprint(intervalStartTimeYear)) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of error issues to return. The service may return fewer than this +// value. If unspecified, at most 50 error issues will be returned. The +// maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *VitalsErrorsIssuesSearchCall) PageSize(pageSize int64) *VitalsErrorsIssuesSearchCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// the request must match the call that provided the page token. +func (c *VitalsErrorsIssuesSearchCall) PageToken(pageToken string) *VitalsErrorsIssuesSearchCall { + 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 *VitalsErrorsIssuesSearchCall) Fields(s ...googleapi.Field) *VitalsErrorsIssuesSearchCall { + 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 *VitalsErrorsIssuesSearchCall) IfNoneMatch(entityTag string) *VitalsErrorsIssuesSearchCall { + 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 *VitalsErrorsIssuesSearchCall) Context(ctx context.Context) *VitalsErrorsIssuesSearchCall { + 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 *VitalsErrorsIssuesSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsErrorsIssuesSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/errorIssues:search") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.errors.issues.search" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse.ServerR +// esponse.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 *VitalsErrorsIssuesSearchCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse, 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 := &GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse{ + 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": "Searches all error issues in which reports have been grouped.", + // "flatPath": "v1alpha1/apps/{appsId}/errorIssues:search", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.errors.issues.search", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A selection predicate to retrieve only a subset of the issues. Counts in the returned error issues will only reflect occurrences that matched the filter. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error issues that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error issues that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error issues that occurred in the requested devices. Example: `deviceModel = \"walleye\" OR deviceModel = \"marlin\"`. * `deviceType`: Matches error issues that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error issues of the requested types only. Valid candidates: `CRASH`, `ANR`. Example: `errorIssueType = CRASH OR errorIssueType = ANR`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR errorIssueType = ANR` is not a valid filter. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.day": { + // "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.hours": { + // "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.minutes": { + // "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.month": { + // "description": "Required. Month of year. Must be from 1 to 12.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.nanos": { + // "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.seconds": { + // "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.timeZone.id": { + // "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.timeZone.version": { + // "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.utcOffset": { + // "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.year": { + // "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.day": { + // "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.hours": { + // "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.minutes": { + // "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.month": { + // "description": "Required. Month of year. Must be from 1 to 12.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.nanos": { + // "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.seconds": { + // "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.timeZone.id": { + // "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime.timeZone.version": { + // "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime.utcOffset": { + // "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime.year": { + // "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageSize": { + // "description": "The maximum number of error issues to return. The service may return fewer than this value. If unspecified, at most 50 error issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource of the error issues, indicating the application for which they were received. Format: apps/{app}", + // "location": "path", + // "pattern": "^apps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+parent}/errorIssues:search", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse" + // } + // } + +} + +// 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 *VitalsErrorsIssuesSearchCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse) 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 "playdeveloperreporting.vitals.errors.reports.search": + +type VitalsErrorsReportsSearchCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Search: Searches all error reports received for an app. +// +// - parent: Parent resource of the reports, indicating the application +// for which they were received. Format: apps/{app}. +func (r *VitalsErrorsReportsService) Search(parent string) *VitalsErrorsReportsSearchCall { + c := &VitalsErrorsReportsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A selection predicate to +// retrieve only a subset of the reports. For filtering basics, please +// check AIP-160 (https://google.aip.dev/160). ** Supported field +// names:** * `apiLevel`: Matches error reports that occurred in the +// requested Android versions (specified as the numeric API level) only. +// Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches +// error reports that occurred in the requested app version codes only. +// Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: +// Matches error reports that occurred in the requested devices. +// Example: `deviceModel = "walleye" OR deviceModel = "marlin". * +// `deviceType`: Matches error reports that occurred in the requested +// device types. Example: `deviceType = "PHONE". * `errorIssueType`: +// Matches error reports of the requested types only. Valid candidates: +// `JAVA_CRASH`, `NATIVE_CRASH`, `ANR`. Example: `errorIssueType = +// JAVA_CRASH OR errorIssueType = NATIVE_CRASH`. * `errorIssueId`: +// Matches error reports belonging to the requested error issue ids +// only. Example: `errorIssueId = 1234 OR errorIssueId = 4567`. ** +// Supported operators:** * Comparison operators: The only supported +// comparison operator is equality. The filtered field must appear on +// the left hand side of the comparison. * Logical Operators: Logical +// operators `AND` and `OR` can be used to build complex filters +// following a conjunctive normal form (CNF), i.e., conjunctions of +// disjunctions. The `OR` operator takes precedence over `AND` so the +// use of parenthesis is not necessary when building CNF. The `OR` +// operator is only supported to build disjunctions that apply to the +// same field, e.g., `versionCode = 123 OR versionCode = ANR`. The +// filter expression `versionCode = 123 OR errorIssueType = ANR` is not +// valid. ** Examples ** Some valid filtering expressions: * +// `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND +// errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND +// (errorIssueType = OR errorIssueType = CRASH)` +func (c *VitalsErrorsReportsSearchCall) Filter(filter string) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IntervalEndTimeDay sets the optional parameter +// "interval.endTime.day": Required. Day of month. Must be from 1 to 31 +// and valid for the year and month. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeDay(intervalEndTimeDay int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.day", fmt.Sprint(intervalEndTimeDay)) + return c +} + +// IntervalEndTimeHours sets the optional parameter +// "interval.endTime.hours": Required. Hours of day in 24 hour format. +// Should be from 0 to 23. An API may choose to allow the value +// "24:00:00" for scenarios like business closing time. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeHours(intervalEndTimeHours int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.hours", fmt.Sprint(intervalEndTimeHours)) + return c +} + +// IntervalEndTimeMinutes sets the optional parameter +// "interval.endTime.minutes": Required. Minutes of hour of day. Must be +// from 0 to 59. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeMinutes(intervalEndTimeMinutes int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.minutes", fmt.Sprint(intervalEndTimeMinutes)) + return c +} + +// IntervalEndTimeMonth sets the optional parameter +// "interval.endTime.month": Required. Month of year. Must be from 1 to +// 12. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeMonth(intervalEndTimeMonth int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.month", fmt.Sprint(intervalEndTimeMonth)) + return c +} + +// IntervalEndTimeNanos sets the optional parameter +// "interval.endTime.nanos": Required. Fractions of seconds in +// nanoseconds. Must be from 0 to 999,999,999. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeNanos(intervalEndTimeNanos int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.nanos", fmt.Sprint(intervalEndTimeNanos)) + return c +} + +// IntervalEndTimeSeconds sets the optional parameter +// "interval.endTime.seconds": Required. Seconds of minutes of the time. +// Must normally be from 0 to 59. An API may allow the value 60 if it +// allows leap-seconds. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeSeconds(intervalEndTimeSeconds int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.seconds", fmt.Sprint(intervalEndTimeSeconds)) + return c +} + +// IntervalEndTimeTimeZoneId sets the optional parameter +// "interval.endTime.timeZone.id": IANA Time Zone Database time zone, +// e.g. "America/New_York". +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeTimeZoneId(intervalEndTimeTimeZoneId string) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.timeZone.id", intervalEndTimeTimeZoneId) + return c +} + +// IntervalEndTimeTimeZoneVersion sets the optional parameter +// "interval.endTime.timeZone.version": IANA Time Zone Database version +// number, e.g. "2019a". +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeTimeZoneVersion(intervalEndTimeTimeZoneVersion string) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.timeZone.version", intervalEndTimeTimeZoneVersion) + return c +} + +// IntervalEndTimeUtcOffset sets the optional parameter +// "interval.endTime.utcOffset": UTC offset. Must be whole seconds, +// between -18 hours and +18 hours. For example, a UTC offset of -4:00 +// would be represented as { seconds: -14400 }. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeUtcOffset(intervalEndTimeUtcOffset string) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.utcOffset", intervalEndTimeUtcOffset) + return c +} + +// IntervalEndTimeYear sets the optional parameter +// "interval.endTime.year": Year of date. Must be from 1 to 9999, or 0 +// if specifying a datetime without a year. +func (c *VitalsErrorsReportsSearchCall) IntervalEndTimeYear(intervalEndTimeYear int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.endTime.year", fmt.Sprint(intervalEndTimeYear)) + return c +} + +// IntervalStartTimeDay sets the optional parameter +// "interval.startTime.day": Required. Day of month. Must be from 1 to +// 31 and valid for the year and month. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeDay(intervalStartTimeDay int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.day", fmt.Sprint(intervalStartTimeDay)) + return c +} + +// IntervalStartTimeHours sets the optional parameter +// "interval.startTime.hours": Required. Hours of day in 24 hour format. +// Should be from 0 to 23. An API may choose to allow the value +// "24:00:00" for scenarios like business closing time. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeHours(intervalStartTimeHours int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.hours", fmt.Sprint(intervalStartTimeHours)) + return c +} + +// IntervalStartTimeMinutes sets the optional parameter +// "interval.startTime.minutes": Required. Minutes of hour of day. Must +// be from 0 to 59. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeMinutes(intervalStartTimeMinutes int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.minutes", fmt.Sprint(intervalStartTimeMinutes)) + return c +} + +// IntervalStartTimeMonth sets the optional parameter +// "interval.startTime.month": Required. Month of year. Must be from 1 +// to 12. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeMonth(intervalStartTimeMonth int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.month", fmt.Sprint(intervalStartTimeMonth)) + return c +} + +// IntervalStartTimeNanos sets the optional parameter +// "interval.startTime.nanos": Required. Fractions of seconds in +// nanoseconds. Must be from 0 to 999,999,999. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeNanos(intervalStartTimeNanos int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.nanos", fmt.Sprint(intervalStartTimeNanos)) + return c +} + +// IntervalStartTimeSeconds sets the optional parameter +// "interval.startTime.seconds": Required. Seconds of minutes of the +// time. Must normally be from 0 to 59. An API may allow the value 60 if +// it allows leap-seconds. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeSeconds(intervalStartTimeSeconds int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.seconds", fmt.Sprint(intervalStartTimeSeconds)) + return c +} + +// IntervalStartTimeTimeZoneId sets the optional parameter +// "interval.startTime.timeZone.id": IANA Time Zone Database time zone, +// e.g. "America/New_York". +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeTimeZoneId(intervalStartTimeTimeZoneId string) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.timeZone.id", intervalStartTimeTimeZoneId) + return c +} + +// IntervalStartTimeTimeZoneVersion sets the optional parameter +// "interval.startTime.timeZone.version": IANA Time Zone Database +// version number, e.g. "2019a". +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeTimeZoneVersion(intervalStartTimeTimeZoneVersion string) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.timeZone.version", intervalStartTimeTimeZoneVersion) + return c +} + +// IntervalStartTimeUtcOffset sets the optional parameter +// "interval.startTime.utcOffset": UTC offset. Must be whole seconds, +// between -18 hours and +18 hours. For example, a UTC offset of -4:00 +// would be represented as { seconds: -14400 }. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeUtcOffset(intervalStartTimeUtcOffset string) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.utcOffset", intervalStartTimeUtcOffset) + return c +} + +// IntervalStartTimeYear sets the optional parameter +// "interval.startTime.year": Year of date. Must be from 1 to 9999, or 0 +// if specifying a datetime without a year. +func (c *VitalsErrorsReportsSearchCall) IntervalStartTimeYear(intervalStartTimeYear int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("interval.startTime.year", fmt.Sprint(intervalStartTimeYear)) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of reports to return. The service may return fewer than this value. +// If unspecified, at most 50 reports will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *VitalsErrorsReportsSearchCall) PageSize(pageSize int64) *VitalsErrorsReportsSearchCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `SearchErrorReports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `SearchErrorReports` must match the call that provided +// the page token. +func (c *VitalsErrorsReportsSearchCall) PageToken(pageToken string) *VitalsErrorsReportsSearchCall { + 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 *VitalsErrorsReportsSearchCall) Fields(s ...googleapi.Field) *VitalsErrorsReportsSearchCall { + 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 *VitalsErrorsReportsSearchCall) IfNoneMatch(entityTag string) *VitalsErrorsReportsSearchCall { + 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 *VitalsErrorsReportsSearchCall) Context(ctx context.Context) *VitalsErrorsReportsSearchCall { + 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 *VitalsErrorsReportsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsErrorsReportsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/errorReports:search") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.errors.reports.search" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse.Server +// Response.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 *VitalsErrorsReportsSearchCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse, 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 := &GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse{ + 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": "Searches all error reports received for an app.", + // "flatPath": "v1alpha1/apps/{appsId}/errorReports:search", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.errors.reports.search", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A selection predicate to retrieve only a subset of the reports. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error reports that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error reports that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error reports that occurred in the requested devices. Example: `deviceModel = \"walleye\" OR deviceModel = \"marlin\"`. * `deviceType`: Matches error reports that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error reports of the requested types only. Valid candidates: `JAVA_CRASH`, `NATIVE_CRASH`, `ANR`. Example: `errorIssueType = JAVA_CRASH OR errorIssueType = NATIVE_CRASH`. * `errorIssueId`: Matches error reports belonging to the requested error issue ids only. Example: `errorIssueId = 1234 OR errorIssueId = 4567`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR versionCode = ANR`. The filter expression `versionCode = 123 OR errorIssueType = ANR` is not valid. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.day": { + // "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.hours": { + // "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.minutes": { + // "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.month": { + // "description": "Required. Month of year. Must be from 1 to 12.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.nanos": { + // "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.seconds": { + // "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.endTime.timeZone.id": { + // "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.timeZone.version": { + // "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.utcOffset": { + // "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime.year": { + // "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.day": { + // "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.hours": { + // "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.minutes": { + // "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.month": { + // "description": "Required. Month of year. Must be from 1 to 12.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.nanos": { + // "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.seconds": { + // "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "interval.startTime.timeZone.id": { + // "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime.timeZone.version": { + // "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime.utcOffset": { + // "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime.year": { + // "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageSize": { + // "description": "The maximum number of reports to return. The service may return fewer than this value. If unspecified, at most 50 reports will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `SearchErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchErrorReports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource of the reports, indicating the application for which they were received. Format: apps/{app}", + // "location": "path", + // "pattern": "^apps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+parent}/errorReports:search", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse" + // } + // } + +} + +// 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 *VitalsErrorsReportsSearchCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse) 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 "playdeveloperreporting.vitals.excessivewakeuprate.get": + +type VitalsExcessivewakeuprateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: +// apps/{app}/excessiveWakeupRateMetricSet. +func (r *VitalsExcessivewakeuprateService) Get(name string) *VitalsExcessivewakeuprateGetCall { + c := &VitalsExcessivewakeuprateGetCall{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 *VitalsExcessivewakeuprateGetCall) Fields(s ...googleapi.Field) *VitalsExcessivewakeuprateGetCall { + 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 *VitalsExcessivewakeuprateGetCall) IfNoneMatch(entityTag string) *VitalsExcessivewakeuprateGetCall { + 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 *VitalsExcessivewakeuprateGetCall) Context(ctx context.Context) *VitalsExcessivewakeuprateGetCall { + 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 *VitalsExcessivewakeuprateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsExcessivewakeuprateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.excessivewakeuprate.get" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet.Serv +// erResponse.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 *VitalsExcessivewakeuprateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet, 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 := &GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/excessiveWakeupRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.excessivewakeuprate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.excessivewakeuprate.query": + +type VitalsExcessivewakeuprateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: +// apps/{app}/excessiveWakeupRateMetricSet. +func (r *VitalsExcessivewakeuprateService) Query(name string, googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest) *VitalsExcessivewakeuprateQueryCall { + c := &VitalsExcessivewakeuprateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest = googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest + 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 *VitalsExcessivewakeuprateQueryCall) Fields(s ...googleapi.Field) *VitalsExcessivewakeuprateQueryCall { + 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 *VitalsExcessivewakeuprateQueryCall) Context(ctx context.Context) *VitalsExcessivewakeuprateQueryCall { + 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 *VitalsExcessivewakeuprateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsExcessivewakeuprateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.excessivewakeuprate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSet +// Response or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSet +// Response.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 *VitalsExcessivewakeuprateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/excessiveWakeupRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.excessivewakeuprate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsExcessivewakeuprateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { + c.googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest.PageToken = pt + }(c.googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest.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.googleplaydeveloperreportingv1alpha1queryexcessivewakeupratemetricsetrequest.PageToken = x.NextPageToken + } +} + +// method id "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get": + +type VitalsStuckbackgroundwakelockrateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: +// apps/{app}/stuckBackgroundWakelockRateMetricSet. +func (r *VitalsStuckbackgroundwakelockrateService) Get(name string) *VitalsStuckbackgroundwakelockrateGetCall { + c := &VitalsStuckbackgroundwakelockrateGetCall{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 *VitalsStuckbackgroundwakelockrateGetCall) Fields(s ...googleapi.Field) *VitalsStuckbackgroundwakelockrateGetCall { + 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 *VitalsStuckbackgroundwakelockrateGetCall) IfNoneMatch(entityTag string) *VitalsStuckbackgroundwakelockrateGetCall { + 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 *VitalsStuckbackgroundwakelockrateGetCall) Context(ctx context.Context) *VitalsStuckbackgroundwakelockrateGetCall { + 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 *VitalsStuckbackgroundwakelockrateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsStuckbackgroundwakelockrateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetric +// Set or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetric +// Set.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 *VitalsStuckbackgroundwakelockrateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet, 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 := &GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query": + +type VitalsStuckbackgroundwakelockrateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: +// apps/{app}/stuckBackgroundWakelockRateMetricSet. +func (r *VitalsStuckbackgroundwakelockrateService) Query(name string, googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest *GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest) *VitalsStuckbackgroundwakelockrateQueryCall { + c := &VitalsStuckbackgroundwakelockrateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest = googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest + 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 *VitalsStuckbackgroundwakelockrateQueryCall) Fields(s ...googleapi.Field) *VitalsStuckbackgroundwakelockrateQueryCall { + 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 *VitalsStuckbackgroundwakelockrateQueryCall) Context(ctx context.Context) *VitalsStuckbackgroundwakelockrateQueryCall { + 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 *VitalsStuckbackgroundwakelockrateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsStuckbackgroundwakelockrateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateM +// etricSetResponse or error will be non-nil. Any non-2xx status code is +// an error. Response headers are in either +// *GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateM +// etricSetResponse.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 *VitalsStuckbackgroundwakelockrateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1alpha1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsStuckbackgroundwakelockrateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { + c.googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest.PageToken = pt + }(c.googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest.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.googleplaydeveloperreportingv1alpha1querystuckbackgroundwakelockratemetricsetrequest.PageToken = x.NextPageToken + } +} diff --git a/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json b/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json new file mode 100644 index 00000000000..e1f0791d1d0 --- /dev/null +++ b/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json @@ -0,0 +1,909 @@ +{ + "basePath": "", + "baseUrl": "https://playdeveloperreporting.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Playdeveloperreporting", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/play/developer/reporting", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "playdeveloperreporting:v1beta1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://playdeveloperreporting.mtls.googleapis.com/", + "name": "playdeveloperreporting", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "anomalies": { + "methods": { + "list": { + "description": "Lists anomalies in any of the datasets.", + "flatPath": "v1beta1/apps/{appsId}/anomalies", + "httpMethod": "GET", + "id": "playdeveloperreporting.anomalies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering criteria for anomalies. For basic filter guidance, please check: https://google.aip.dev/160. **Supported functions:** * `activeBetween(startTime, endTime)`: If specified, only list anomalies that were active in between `startTime` (inclusive) and `endTime` (exclusive). Both parameters are expected to conform to an RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC offsets are supported. Both `startTime` and `endTime` accept the special value `UNBOUNDED`, to signify intervals with no lower or upper bound, respectively. Examples: * `activeBetween(\"2021-04-21T11:30:00Z\", \"2021-07-21T00:00:00Z\")` * `activeBetween(UNBOUNDED, \"2021-11-21T00:00:00-04:00\")` * `activeBetween(\"2021-07-21T00:00:00-04:00\", UNBOUNDED)`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 10 anomalies will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListErrorReports` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent app for which anomalies were detected. Format: apps/{app}", + "location": "path", + "pattern": "^apps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/anomalies", + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse" + } + } + } + }, + "vitals": { + "resources": { + "anrrate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1beta1/apps/{appsId}/anrRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.anrrate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/anrRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1AnrRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1beta1/apps/{appsId}/anrRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.anrrate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/anrRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse" + } + } + } + }, + "crashrate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1beta1/apps/{appsId}/crashRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.crashrate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/crashRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1CrashRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1beta1/apps/{appsId}/crashRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.crashrate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/crashRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse" + } + } + } + }, + "excessivewakeuprate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1beta1/apps/{appsId}/excessiveWakeupRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.excessivewakeuprate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1beta1/apps/{appsId}/excessiveWakeupRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.excessivewakeuprate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse" + } + } + } + }, + "stuckbackgroundwakelockrate": { + "methods": { + "get": { + "description": "Describes the properties of the metric set.", + "flatPath": "v1beta1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet", + "httpMethod": "GET", + "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet" + } + }, + "query": { + "description": "Queries the metrics in the metric set.", + "flatPath": "v1beta1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet:query", + "httpMethod": "POST", + "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + "location": "path", + "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:query", + "request": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest" + }, + "response": { + "$ref": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse" + } + } + } + } + } + } + }, + "revision": "20220308", + "rootUrl": "https://playdeveloperreporting.googleapis.com/", + "schemas": { + "GooglePlayDeveloperReportingV1beta1Anomaly": { + "description": "Represents an anomaly detected in a dataset. Our anomaly detection systems flag datapoints in a time series that fall outside of and expected range derived from historical data. Although those expected ranges have an upper and a lower bound, we only flag anomalies when the data has become unexpectedly _worse_, which usually corresponds to the case where the metric crosses the upper bound. Multiple contiguous datapoints in a timeline outside of the expected range will be grouped into a single anomaly. Therefore, an anomaly represents effectively a segment of a metric's timeline. The information stored in the `timeline_spec`, `dimensions` and `metric` can be used to fetch a full timeline with extended ragne for context. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1beta1Anomaly", + "properties": { + "dimensions": { + "description": "Combination of dimensions in which the anomaly was detected.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1DimensionValue" + }, + "type": "array" + }, + "metric": { + "$ref": "GooglePlayDeveloperReportingV1beta1MetricValue", + "description": "Metric where the anomaly was detected, together with the anomalous value." + }, + "metricSet": { + "description": "Metric set resource where the anomaly was detected.", + "type": "string" + }, + "name": { + "description": "Name of the anomaly. Format: apps/{app}/anomalies/{anomaly}", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", + "description": "Timeline specification that covers the anomaly period." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1AnrRateMetricSet": { + "description": "Singleton resource representing the set of ANR (Application not responding) metrics. This metric set contains ANRs data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. If your app exhibits an ANR rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about crashes, another stability metric.", + "id": "GooglePlayDeveloperReportingV1beta1AnrRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/anrRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1CrashRateMetricSet": { + "description": "Singleton resource representing the set of crashrate metrics. This metric set contains crashes data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. If your app exhibits a crash rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about ANRs, another stability metric.", + "id": "GooglePlayDeveloperReportingV1beta1CrashRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/crashRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1DimensionValue": { + "description": "Represents the value of a single dimension.", + "id": "GooglePlayDeveloperReportingV1beta1DimensionValue", + "properties": { + "dimension": { + "description": "Name of the dimension.", + "type": "string" + }, + "int64Value": { + "description": "Actual value, represented as an int64.", + "format": "int64", + "type": "string" + }, + "stringValue": { + "description": "Actual value, represented as a string.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet": { + "description": "Singleton resource representing the set of Excessive Weakeups metrics. This metric set contains AlarmManager wakeup counts data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. If your app exhibits an excessive wakeup rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1FreshnessInfo": { + "description": "Represents the latest available time that can be requested in a TimelineSpec. Different aggregation periods have different freshness. For example, `DAILY` aggregation may lag behind `HOURLY` in cases where such aggregation is computed only once at the end of the day.", + "id": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", + "properties": { + "freshnesses": { + "description": "Information about data freshness for every supported aggregation period. This field has set semantics, keyed by the `aggregation_period` field.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness": { + "description": "Information about data freshness for a single aggregation period.", + "id": "GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness", + "properties": { + "aggregationPeriod": { + "description": "Aggregation period for which data is available.", + "enum": [ + "AGGREGATION_PERIOD_UNSPECIFIED", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified granularity.", + "Data is aggregated in hourly intervals.", + "Data is aggregated in daily intervals." + ], + "type": "string" + }, + "latestEndTime": { + "$ref": "GoogleTypeDateTime", + "description": "Latest end time for which data is available, for the aggregation period. The time is specified in the metric set's default timezone. *Note:* time ranges in TimelineSpec are represented as `start_time, end_time)`. For example, if the latest available timeline data point for a `DAILY` aggregation period is `2021-06-23 00:00:00 America/Los_Angeles`, the value of this field would be `2021-06-24 00:00:00 America/Los_Angeles` so it can be easily reused in [TimelineSpec.end_time." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse": { + "description": "Response with a list of anomalies in datasets.", + "id": "GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse", + "properties": { + "anomalies": { + "description": "Anomalies that were found.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1Anomaly" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1MetricValue": { + "description": "Represents the value of a metric.", + "id": "GooglePlayDeveloperReportingV1beta1MetricValue", + "properties": { + "decimalValue": { + "$ref": "GoogleTypeDecimal", + "description": "Actual value, represented as a decimal number." + }, + "metric": { + "description": "Name of the metric.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1MetricsRow": { + "description": "Represents a row of dimensions and metrics.", + "id": "GooglePlayDeveloperReportingV1beta1MetricsRow", + "properties": { + "aggregationPeriod": { + "description": "Granularity of the aggregation period of the row.", + "enum": [ + "AGGREGATION_PERIOD_UNSPECIFIED", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified granularity.", + "Data is aggregated in hourly intervals.", + "Data is aggregated in daily intervals." + ], + "type": "string" + }, + "dimensions": { + "description": "Dimension columns in the row.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1DimensionValue" + }, + "type": "array" + }, + "metrics": { + "description": "Metric columns in the row.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1MetricValue" + }, + "type": "array" + }, + "startTime": { + "$ref": "GoogleTypeDateTime", + "description": "Starting date (and time for hourly aggregation) of the period covered by this row." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest": { + "description": "Request message for QueryAnrRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. If your app exhibits an ANR rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse": { + "description": "Response message for QueryAnrRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest": { + "description": "Request message for QueryCrashRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. If your app exhibits a crash rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` metric. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse": { + "description": "Response message for QueryCrashRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest": { + "description": "Request message for QueryExcessiveWakeupRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. If your app exhibits an excessive wakeup rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse": { + "description": "Response message for QueryExcessiveWakeupRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest": { + "description": "Request message for QueryStuckBackgroundWakelockRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest", + "properties": { + "dimensions": { + "description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).", + "items": { + "type": "string" + }, + "type": "array" + }, + "filter": { + "description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", + "type": "string" + }, + "metrics": { + "description": "Metrics to aggregate. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. If your app exhibits a stuck background wakelock rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageSize": { + "description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", + "type": "string" + }, + "timelineSpec": { + "$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", + "description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse": { + "description": "Response message for QueryStuckBackgroundWakelockRateMetricSet.", + "id": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to fetch the next page of data.", + "type": "string" + }, + "rows": { + "description": "Returned rows of data.", + "items": { + "$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet": { + "description": "Singleton resource representing the set of Stuck Background Wakelocks metrics. This metric set contains PowerManager wakelock duration data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. If your app exhibits a stuck background wakelocks rate equal to or higher than the threshold, it's in the bottom 25% of the top 1,000 apps on Google Play (by number of installs). * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if their app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): the type (also known as form factor) of the user's device. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", + "id": "GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet", + "properties": { + "freshnessInfo": { + "$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", + "description": "Summary about data freshness in this resource." + }, + "name": { + "description": "The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + "type": "string" + } + }, + "type": "object" + }, + "GooglePlayDeveloperReportingV1beta1TimelineSpec": { + "description": "Specification of the time-related aggregation parameters of a timeline. Timelines have an aggregation period (`DAILY`, `HOURLY`, etc) which defines how events are aggregated in metrics. The points in a timeline are defined by the starting DateTime of the aggregation period. The duration is implicit in the AggregationPeriod. Hourly aggregation periods, when supported by a metric set, are always specified in UTC to avoid ambiguities around daylight saving time transitions, where an hour is skipped when adopting DST, and repeated when abandoning DST. For example, the timestamp '2021-11-07 01:00:00 America/Los_Angeles' is ambiguous since it can correspond to '2021-11-07 08:00:00 UTC' or '2021-11-07 09:00:00 UTC'. Daily aggregation periods require specifying a timezone which will determine the precise instants of the start and the end of the day. Not all metric sets support all timezones, so make sure to check which timezones are supported by the metric set you want to query.", + "id": "GooglePlayDeveloperReportingV1beta1TimelineSpec", + "properties": { + "aggregationPeriod": { + "description": "Type of the aggregation period of the datapoints in the timeline. Intervals are identified by the date and time at the start of the interval.", + "enum": [ + "AGGREGATION_PERIOD_UNSPECIFIED", + "HOURLY", + "DAILY" + ], + "enumDescriptions": [ + "Unspecified granularity.", + "Data is aggregated in hourly intervals.", + "Data is aggregated in daily intervals." + ], + "type": "string" + }, + "endTime": { + "$ref": "GoogleTypeDateTime", + "description": "Ending datapoint of the timeline (exclusive). See start_time for restrictions. The timezone of the end point must match the timezone of the start point." + }, + "startTime": { + "$ref": "GoogleTypeDateTime", + "description": "Starting datapoint of the timeline (inclusive). Must be aligned to the aggregation period as follows: * HOURLY: the 'minutes', 'seconds' and 'nanos' fields must be unset. The time_zone can be left unset (defaults to UTC) or set explicitly to \"UTC\". Setting any other utc_offset or timezone id will result in a validation error. * DAILY: the 'hours', 'minutes', 'seconds' and 'nanos' fields must be unset. Different metric sets support different timezones. It can be left unset to use the default timezone specified by the metric set. The timezone of the end point must match the timezone of the start point." + } + }, + "type": "object" + }, + "GoogleTypeDateTime": { + "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year is 0, the DateTime is considered not to have a specific year. month and day must have valid, non-zero values. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", + "id": "GoogleTypeDateTime", + "properties": { + "day": { + "description": "Required. Day of month. Must be from 1 to 31 and valid for the year and month.", + "format": "int32", + "type": "integer" + }, + "hours": { + "description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Required. Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Required. Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + }, + "timeZone": { + "$ref": "GoogleTypeTimeZone", + "description": "Time zone." + }, + "utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "type": "string" + }, + "year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleTypeDecimal": { + "description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", + "id": "GoogleTypeDecimal", + "properties": { + "value": { + "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -\u003e `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeTimeZone": { + "description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", + "id": "GoogleTypeTimeZone", + "properties": { + "id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "type": "string" + }, + "version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Google Play Developer Reporting API", + "version": "v1beta1", + "version_module": true +} \ No newline at end of file diff --git a/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go new file mode 100644 index 00000000000..0c35154713b --- /dev/null +++ b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go @@ -0,0 +1,2930 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package playdeveloperreporting provides access to the Google Play Developer Reporting API. +// +// For product documentation, see: https://developers.google.com/play/developer/reporting +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/playdeveloperreporting/v1beta1" +// ... +// ctx := context.Background() +// playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package playdeveloperreporting // import "google.golang.org/api/playdeveloperreporting/v1beta1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// 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 _ = internaloption.WithDefaultEndpoint + +const apiId = "playdeveloperreporting:v1beta1" +const apiName = "playdeveloperreporting" +const apiVersion = "v1beta1" +const basePath = "https://playdeveloperreporting.googleapis.com/" +const mtlsBasePath = "https://playdeveloperreporting.mtls.googleapis.com/" + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Anomalies = NewAnomaliesService(s) + s.Vitals = NewVitalsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Anomalies *AnomaliesService + + Vitals *VitalsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewAnomaliesService(s *Service) *AnomaliesService { + rs := &AnomaliesService{s: s} + return rs +} + +type AnomaliesService struct { + s *Service +} + +func NewVitalsService(s *Service) *VitalsService { + rs := &VitalsService{s: s} + rs.Anrrate = NewVitalsAnrrateService(s) + rs.Crashrate = NewVitalsCrashrateService(s) + rs.Excessivewakeuprate = NewVitalsExcessivewakeuprateService(s) + rs.Stuckbackgroundwakelockrate = NewVitalsStuckbackgroundwakelockrateService(s) + return rs +} + +type VitalsService struct { + s *Service + + Anrrate *VitalsAnrrateService + + Crashrate *VitalsCrashrateService + + Excessivewakeuprate *VitalsExcessivewakeuprateService + + Stuckbackgroundwakelockrate *VitalsStuckbackgroundwakelockrateService +} + +func NewVitalsAnrrateService(s *Service) *VitalsAnrrateService { + rs := &VitalsAnrrateService{s: s} + return rs +} + +type VitalsAnrrateService struct { + s *Service +} + +func NewVitalsCrashrateService(s *Service) *VitalsCrashrateService { + rs := &VitalsCrashrateService{s: s} + return rs +} + +type VitalsCrashrateService struct { + s *Service +} + +func NewVitalsExcessivewakeuprateService(s *Service) *VitalsExcessivewakeuprateService { + rs := &VitalsExcessivewakeuprateService{s: s} + return rs +} + +type VitalsExcessivewakeuprateService struct { + s *Service +} + +func NewVitalsStuckbackgroundwakelockrateService(s *Service) *VitalsStuckbackgroundwakelockrateService { + rs := &VitalsStuckbackgroundwakelockrateService{s: s} + return rs +} + +type VitalsStuckbackgroundwakelockrateService struct { + s *Service +} + +// GooglePlayDeveloperReportingV1beta1Anomaly: Represents an anomaly +// detected in a dataset. Our anomaly detection systems flag datapoints +// in a time series that fall outside of and expected range derived from +// historical data. Although those expected ranges have an upper and a +// lower bound, we only flag anomalies when the data has become +// unexpectedly _worse_, which usually corresponds to the case where the +// metric crosses the upper bound. Multiple contiguous datapoints in a +// timeline outside of the expected range will be grouped into a single +// anomaly. Therefore, an anomaly represents effectively a segment of a +// metric's timeline. The information stored in the `timeline_spec`, +// `dimensions` and `metric` can be used to fetch a full timeline with +// extended ragne for context. **Required permissions**: to access this +// resource, the calling user needs the _View app information +// (read-only)_ permission for the app. +type GooglePlayDeveloperReportingV1beta1Anomaly struct { + // Dimensions: Combination of dimensions in which the anomaly was + // detected. + Dimensions []*GooglePlayDeveloperReportingV1beta1DimensionValue `json:"dimensions,omitempty"` + + // Metric: Metric where the anomaly was detected, together with the + // anomalous value. + Metric *GooglePlayDeveloperReportingV1beta1MetricValue `json:"metric,omitempty"` + + // MetricSet: Metric set resource where the anomaly was detected. + MetricSet string `json:"metricSet,omitempty"` + + // Name: Name of the anomaly. Format: apps/{app}/anomalies/{anomaly} + Name string `json:"name,omitempty"` + + // TimelineSpec: Timeline specification that covers the anomaly period. + TimelineSpec *GooglePlayDeveloperReportingV1beta1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1Anomaly) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1Anomaly + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1AnrRateMetricSet: Singleton +// resource representing the set of ANR (Application not responding) +// metrics. This metric set contains ANRs data combined with usage data +// to produce a normalized metric independent of user counts. +// **Supported aggregation periods:** * DAILY: metrics are aggregated in +// calendar date intervals. Due to historical constraints, the only +// supported timezone is `America/Los_Angeles`. **Supported metrics:** * +// `anrRate` (`google.type.Decimal`): Percentage of distinct users in +// the aggregation period that experienced at least one ANR. If your app +// exhibits an ANR rate equal to or higher than the threshold, it's in +// the bottom 25% of the top 1,000 apps on Google Play (by number of +// installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling +// average value of `anrRate` in the last 7 days. The daily values are +// weighted by the count of distinct users for the day. * +// `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average +// value of `anrRate` in the last 28 days. The daily values are weighted +// by the count of distinct users for the day. * `distinctUsers` +// (`google.type.Decimal`): Count of distinct users in the aggregation +// period that were used as normalization value for the `anrRate` +// metric. A user is counted in this metric if they used the app in the +// foreground during the aggregation period. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. **Supported dimensions:** * `apiLevel` (string): the +// API level of Android that was running on the user's device. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the +// user's device model. * `deviceType` (string): the type (also known as +// form factor) of the user's device. * `countryCode` (string): the +// country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. **Related metric sets:** * vitals.errors contains +// unnormalized version (absolute counts) of crashes. * vitals.errors +// contains normalized metrics about crashes, another stability metric. +type GooglePlayDeveloperReportingV1beta1AnrRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1beta1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: apps/{app}/anrRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1AnrRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1AnrRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1CrashRateMetricSet: Singleton +// resource representing the set of crashrate metrics. This metric set +// contains crashes data combined with usage data to produce a +// normalized metric independent of user counts. **Supported aggregation +// periods:** * DAILY: metrics are aggregated in calendar date +// intervals. Due to historical constraints, the only supported timezone +// is `America/Los_Angeles`. **Supported metrics:** * `crashRate` +// (`google.type.Decimal`): Percentage of distinct users in the +// aggregation period that experienced at least one crash. If your app +// exhibits a crash rate equal to or higher than the threshold, it's in +// the bottom 25% of the top 1,000 apps on Google Play (by number of +// installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): +// Rolling average value of `crashRate` in the last 7 days. The daily +// values are weighted by the count of distinct users for the day. * +// `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average +// value of `crashRate` in the last 28 days. The daily values are +// weighted by the count of distinct users for the day. * +// `distinctUsers` (`google.type.Decimal`): Count of distinct users in +// the aggregation period that were used as normalization value for the +// `crashRate` metric. A user is counted in this metric if they used the +// app in the foreground during the aggregation period. Care must be +// taken not to aggregate this count further, as it may result in users +// being counted multiple times. **Supported dimensions:** * `apiLevel` +// (string): the API level of Android that was running on the user's +// device. * `versionCode` (int64): version of the app that was running +// on the user's device. * `deviceModel` (string): unique identifier of +// the user's device model. * `deviceType` (string): the type (also +// known as form factor) of the user's device. * `countryCode` (string): +// the country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. **Related metric sets:** * vitals.errors contains +// unnormalized version (absolute counts) of crashes. * vitals.errors +// contains normalized metrics about ANRs, another stability metric. +type GooglePlayDeveloperReportingV1beta1CrashRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1beta1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: apps/{app}/crashRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1CrashRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1CrashRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1DimensionValue: Represents the +// value of a single dimension. +type GooglePlayDeveloperReportingV1beta1DimensionValue struct { + // Dimension: Name of the dimension. + Dimension string `json:"dimension,omitempty"` + + // Int64Value: Actual value, represented as an int64. + Int64Value int64 `json:"int64Value,omitempty,string"` + + // StringValue: Actual value, represented as a string. + StringValue string `json:"stringValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimension") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimension") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1DimensionValue) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1DimensionValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet: +// Singleton resource representing the set of Excessive Weakeups +// metrics. This metric set contains AlarmManager wakeup counts data +// combined with process state data to produce a normalized metric +// independent of user counts. **Supported aggregation periods:** * +// DAILY: metrics are aggregated in calendar date intervals. Due to +// historical constraints, the only supported timezone is +// `America/Los_Angeles`. **Supported metrics:** * `excessiveWakeupRate` +// (`google.type.Decimal`): Percentage of distinct users in the +// aggregation period that had more than 10 wakeups per hour. If your +// app exhibits an excessive wakeup rate equal to or higher than the +// threshold, it's in the bottom 25% of the top 1,000 apps on Google +// Play (by number of installs). * `excessiveWakeupRate7dUserWeighted` +// (`google.type.Decimal`): Rolling average value of +// `excessiveWakeupRate` in the last 7 days. The daily values are +// weighted by the count of distinct users for the day. * +// `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling +// average value of `excessiveWakeupRate` in the last 28 days. The daily +// values are weighted by the count of distinct users for the day. * +// `distinctUsers` (`google.type.Decimal`): Count of distinct users in +// the aggregation period that were used as normalization value for the +// `excessiveWakeupRate` metric. A user is counted in this metric if +// they app was doing any work on the device, i.e., not just active +// foreground usage but also background work. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. **Supported dimensions:** * `apiLevel` (string): the +// API level of Android that was running on the user's device. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the +// user's device model. * `deviceType` (string): the type (also known as +// form factor) of the user's device. * `countryCode` (string): the +// country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. +type GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1beta1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: + // apps/{app}/excessiveWakeupRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1FreshnessInfo: Represents the +// latest available time that can be requested in a TimelineSpec. +// Different aggregation periods have different freshness. For example, +// `DAILY` aggregation may lag behind `HOURLY` in cases where such +// aggregation is computed only once at the end of the day. +type GooglePlayDeveloperReportingV1beta1FreshnessInfo struct { + // Freshnesses: Information about data freshness for every supported + // aggregation period. This field has set semantics, keyed by the + // `aggregation_period` field. + Freshnesses []*GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness `json:"freshnesses,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Freshnesses") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Freshnesses") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1FreshnessInfo) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1FreshnessInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness: +// Information about data freshness for a single aggregation period. +type GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness struct { + // AggregationPeriod: Aggregation period for which data is available. + // + // Possible values: + // "AGGREGATION_PERIOD_UNSPECIFIED" - Unspecified granularity. + // "HOURLY" - Data is aggregated in hourly intervals. + // "DAILY" - Data is aggregated in daily intervals. + AggregationPeriod string `json:"aggregationPeriod,omitempty"` + + // LatestEndTime: Latest end time for which data is available, for the + // aggregation period. The time is specified in the metric set's default + // timezone. *Note:* time ranges in TimelineSpec are represented as + // `start_time, end_time)`. For example, if the latest available + // timeline data point for a `DAILY` aggregation period is `2021-06-23 + // 00:00:00 America/Los_Angeles`, the value of this field would be + // `2021-06-24 00:00:00 America/Los_Angeles` so it can be easily reused + // in [TimelineSpec.end_time. + LatestEndTime *GoogleTypeDateTime `json:"latestEndTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationPeriod") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationPeriod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse: Response +// with a list of anomalies in datasets. +type GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse struct { + // Anomalies: Anomalies that were found. + Anomalies []*GooglePlayDeveloperReportingV1beta1Anomaly `json:"anomalies,omitempty"` + + // NextPageToken: Continuation token to fetch the next page of data. + 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. "Anomalies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Anomalies") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1MetricValue: Represents the value +// of a metric. +type GooglePlayDeveloperReportingV1beta1MetricValue struct { + // DecimalValue: Actual value, represented as a decimal number. + DecimalValue *GoogleTypeDecimal `json:"decimalValue,omitempty"` + + // Metric: Name of the metric. + Metric string `json:"metric,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DecimalValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DecimalValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1MetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1MetricValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1MetricsRow: Represents a row of +// dimensions and metrics. +type GooglePlayDeveloperReportingV1beta1MetricsRow struct { + // AggregationPeriod: Granularity of the aggregation period of the row. + // + // Possible values: + // "AGGREGATION_PERIOD_UNSPECIFIED" - Unspecified granularity. + // "HOURLY" - Data is aggregated in hourly intervals. + // "DAILY" - Data is aggregated in daily intervals. + AggregationPeriod string `json:"aggregationPeriod,omitempty"` + + // Dimensions: Dimension columns in the row. + Dimensions []*GooglePlayDeveloperReportingV1beta1DimensionValue `json:"dimensions,omitempty"` + + // Metrics: Metric columns in the row. + Metrics []*GooglePlayDeveloperReportingV1beta1MetricValue `json:"metrics,omitempty"` + + // StartTime: Starting date (and time for hourly aggregation) of the + // period covered by this row. + StartTime *GoogleTypeDateTime `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationPeriod") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationPeriod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1MetricsRow) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1MetricsRow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest: +// Request message for QueryAnrRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the metrics by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * `anrRate` + // (`google.type.Decimal`): Percentage of distinct users in the + // aggregation period that experienced at least one ANR. If your app + // exhibits an ANR rate equal to or higher than the threshold, it's in + // the bottom 25% of the top 1,000 apps on Google Play (by number of + // installs). * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `anrRate` in the last 7 days. The daily values are + // weighted by the count of distinct users for the day. * + // `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average + // value of `anrRate` in the last 28 days. The daily values are weighted + // by the count of distinct users for the day. * `distinctUsers` + // (`google.type.Decimal`): Count of distinct users in the aggregation + // period that were used as normalization value for the `anrRate` + // metric. A user is counted in this metric if they used the app in the + // foreground during the aggregation period. Care must be taken not to + // aggregate this count further, as it may result in users being counted + // multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100,000; values + // above 100,000 will be coerced to 100,000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the default + // and only supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1beta1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse: +// Response message for QueryAnrRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1beta1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest: +// Request message for QueryCrashRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the metrics by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * `crashRate` + // (`google.type.Decimal`): Percentage of distinct users in the + // aggregation period that experienced at least one crash. If your app + // exhibits a crash rate equal to or higher than the threshold, it's in + // the bottom 25% of the top 1,000 apps on Google Play (by number of + // installs). * `crashRate7dUserWeighted` (`google.type.Decimal`): + // Rolling average value of `crashRate` in the last 7 days. The daily + // values are weighted by the count of distinct users for the day. * + // `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average + // value of `crashRate` in the last 28 days. The daily values are + // weighted by the count of distinct users for the day. * + // `distinctUsers` (`google.type.Decimal`): Count of distinct users in + // the aggregation period that were used as normalization value for the + // `crashRate` metric. A user is counted in this metric if they used the + // app in the foreground during the aggregation period. Care must be + // taken not to aggregate this count further, as it may result in users + // being counted multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100,000; values + // above 100,000 will be coerced to 100,000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the default + // and only supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1beta1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse: +// Response message for QueryCrashRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1beta1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRe +// quest: Request message for QueryExcessiveWakeupRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the data by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * + // `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct + // users in the aggregation period that had more than 10 wakeups per + // hour. If your app exhibits an excessive wakeup rate equal to or + // higher than the threshold, it's in the bottom 25% of the top 1,000 + // apps on Google Play (by number of installs). * + // `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `excessiveWakeupRate` in the last 7 days. The daily + // values are weighted by the count of distinct users for the day. * + // `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `excessiveWakeupRate` in the last 28 days. The daily + // values are weighted by the count of distinct users for the day. * + // `distinctUsers` (`google.type.Decimal`): Count of distinct users in + // the aggregation period that were used as normalization value for the + // `excessiveWakeupRate` metric. A user is counted in this metric if + // they app was doing any work on the device, i.e., not just active + // foreground usage but also background work. Care must be taken not to + // aggregate this count further, as it may result in users being counted + // multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100000; values above + // 100000 will be coerced to 100000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the only + // supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1beta1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRe +// sponse: Response message for QueryExcessiveWakeupRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1beta1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMet +// ricSetRequest: Request message for +// QueryStuckBackgroundWakelockRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest struct { + // Dimensions: Dimensions to slice the data by. **Supported + // dimensions:** * `apiLevel` (string): the API level of Android that + // was running on the user's device. * `versionCode` (int64): version of + // the app that was running on the user's device. * `deviceModel` + // (string): unique identifier of the user's device model. * + // `deviceType` (string): the type (also known as form factor) of the + // user's device. * `countryCode` (string): the country or region of the + // user's device based on their IP address, represented as a 2-letter + // ISO-3166 code (e.g. US for the United States). + Dimensions []string `json:"dimensions,omitempty"` + + // Filter: Filters to apply to data. The filtering expression follows + // AIP-160 (https://google.aip.dev/160) standard and supports filtering + // by equality of all breakdown dimensions. + Filter string `json:"filter,omitempty"` + + // Metrics: Metrics to aggregate. **Supported metrics:** * + // `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct + // users in the aggregation period that had a wakelock held in the + // background for longer than 1 hour. If your app exhibits a stuck + // background wakelock rate equal to or higher than the threshold, it's + // in the bottom 25% of the top 1,000 apps on Google Play (by number of + // installs). * `stuckBgWakelockRate7dUserWeighted` + // (`google.type.Decimal`): Rolling average value of + // `stuckBgWakelockRate` in the last 7 days. The daily values are + // weighted by the count of distinct users for the day. * + // `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling + // average value of `stuckBgWakelockRate` in the last 28 days. The daily + // values are weighted by the count of distinct users for the day. * + // `distinctUsers` (`google.type.Decimal`): Count of distinct users in + // the aggregation period that were used as normalization value for the + // `stuckBgWakelockRate` metric. A user is counted in this metric if + // they app was doing any work on the device, i.e., not just active + // foreground usage but also background work. Care must be taken not to + // aggregate this count further, as it may result in users being counted + // multiple times. + Metrics []string `json:"metrics,omitempty"` + + // PageSize: Maximum size of the returned data. If unspecified, at most + // 1000 rows will be returned. The maximum value is 100000; values above + // 100000 will be coerced to 100000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token, received from a previous call. Provide this + // to retrieve the subsequent page. When paginating, all other + // parameters provided to the request must match the call that provided + // the page token. + PageToken string `json:"pageToken,omitempty"` + + // TimelineSpec: Specification of the timeline aggregation parameters. + // **Supported aggregation periods:** * DAILY: metrics are aggregated in + // calendar date intervals. Due to historical constraints, the only + // supported timezone is `America/Los_Angeles`. + TimelineSpec *GooglePlayDeveloperReportingV1beta1TimelineSpec `json:"timelineSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMet +// ricSetResponse: Response message for +// QueryStuckBackgroundWakelockRateMetricSet. +type GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse struct { + // NextPageToken: Continuation token to fetch the next page of data. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rows: Returned rows of data. + Rows []*GooglePlayDeveloperReportingV1beta1MetricsRow `json:"rows,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSe +// t: Singleton resource representing the set of Stuck Background +// Wakelocks metrics. This metric set contains PowerManager wakelock +// duration data combined with process state data to produce a +// normalized metric independent of user counts. **Supported aggregation +// periods:** * DAILY: metrics are aggregated in calendar date +// intervals. Due to historical constraints, the only supported timezone +// is `America/Los_Angeles`. **Supported metrics:** * +// `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct +// users in the aggregation period that had a wakelock held in the +// background for longer than 1 hour. If your app exhibits a stuck +// background wakelocks rate equal to or higher than the threshold, it's +// in the bottom 25% of the top 1,000 apps on Google Play (by number of +// installs). * `stuckBgWakelockRate7dUserWeighted` +// (`google.type.Decimal`): Rolling average value of +// `stuckBgWakelockRate` in the last 7 days. The daily values are +// weighted by the count of distinct users for the day. * +// `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling +// average value of `stuckBgWakelockRate` in the last 28 days. The daily +// values are weighted by the count of distinct users for the day. * +// `distinctUsers` (`google.type.Decimal`): Count of distinct users in +// the aggregation period that were used as normalization value for the +// `stuckBgWakelockRate` metric. A user is counted in this metric if +// their app was doing any work on the device, i.e., not just active +// foreground usage but also background work. Care must be taken not to +// aggregate this count further, as it may result in users being counted +// multiple times. **Supported dimensions:** * `apiLevel` (string): the +// API level of Android that was running on the user's device. * +// `versionCode` (int64): version of the app that was running on the +// user's device. * `deviceModel` (string): unique identifier of the +// user's device model. * `deviceType` (string): the type (also known as +// form factor) of the user's device. * `countryCode` (string): the +// country or region of the user's device based on their IP address, +// represented as a 2-letter ISO-3166 code (e.g. US for the United +// States). **Required permissions**: to access this resource, the +// calling user needs the _View app information (read-only)_ permission +// for the app. +type GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet struct { + // FreshnessInfo: Summary about data freshness in this resource. + FreshnessInfo *GooglePlayDeveloperReportingV1beta1FreshnessInfo `json:"freshnessInfo,omitempty"` + + // Name: The resource name. Format: + // apps/{app}/stuckBackgroundWakelockRateMetricSet + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FreshnessInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FreshnessInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePlayDeveloperReportingV1beta1TimelineSpec: Specification of the +// time-related aggregation parameters of a timeline. Timelines have an +// aggregation period (`DAILY`, `HOURLY`, etc) which defines how events +// are aggregated in metrics. The points in a timeline are defined by +// the starting DateTime of the aggregation period. The duration is +// implicit in the AggregationPeriod. Hourly aggregation periods, when +// supported by a metric set, are always specified in UTC to avoid +// ambiguities around daylight saving time transitions, where an hour is +// skipped when adopting DST, and repeated when abandoning DST. For +// example, the timestamp '2021-11-07 01:00:00 America/Los_Angeles' is +// ambiguous since it can correspond to '2021-11-07 08:00:00 UTC' or +// '2021-11-07 09:00:00 UTC'. Daily aggregation periods require +// specifying a timezone which will determine the precise instants of +// the start and the end of the day. Not all metric sets support all +// timezones, so make sure to check which timezones are supported by the +// metric set you want to query. +type GooglePlayDeveloperReportingV1beta1TimelineSpec struct { + // AggregationPeriod: Type of the aggregation period of the datapoints + // in the timeline. Intervals are identified by the date and time at the + // start of the interval. + // + // Possible values: + // "AGGREGATION_PERIOD_UNSPECIFIED" - Unspecified granularity. + // "HOURLY" - Data is aggregated in hourly intervals. + // "DAILY" - Data is aggregated in daily intervals. + AggregationPeriod string `json:"aggregationPeriod,omitempty"` + + // EndTime: Ending datapoint of the timeline (exclusive). See start_time + // for restrictions. The timezone of the end point must match the + // timezone of the start point. + EndTime *GoogleTypeDateTime `json:"endTime,omitempty"` + + // StartTime: Starting datapoint of the timeline (inclusive). Must be + // aligned to the aggregation period as follows: * HOURLY: the + // 'minutes', 'seconds' and 'nanos' fields must be unset. The time_zone + // can be left unset (defaults to UTC) or set explicitly to "UTC". + // Setting any other utc_offset or timezone id will result in a + // validation error. * DAILY: the 'hours', 'minutes', 'seconds' and + // 'nanos' fields must be unset. Different metric sets support different + // timezones. It can be left unset to use the default timezone specified + // by the metric set. The timezone of the end point must match the + // timezone of the start point. + StartTime *GoogleTypeDateTime `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationPeriod") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationPeriod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePlayDeveloperReportingV1beta1TimelineSpec) MarshalJSON() ([]byte, error) { + type NoMethod GooglePlayDeveloperReportingV1beta1TimelineSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDateTime: Represents civil time (or occasionally physical +// time). This type can represent a civil time in one of a few possible +// ways: * When utc_offset is set and time_zone is unset: a civil time +// on a calendar day with a particular offset from UTC. * When time_zone +// is set and utc_offset is unset: a civil time on a calendar day in a +// particular time zone. * When neither time_zone nor utc_offset is set: +// a civil time on a calendar day in local time. The date is relative to +// the Proleptic Gregorian Calendar. If year is 0, the DateTime is +// considered not to have a specific year. month and day must have +// valid, non-zero values. This type may also be used to represent a +// physical time if all the date and time fields are set and either case +// of the `time_offset` oneof is set. Consider using `Timestamp` message +// for physical time instead. If your use case also would like to store +// the user's timezone, that can be done in another field. This type is +// more flexible than some applications may want. Make sure to document +// and validate your application's limitations. +type GoogleTypeDateTime struct { + // Day: Required. Day of month. Must be from 1 to 31 and valid for the + // year and month. + Day int64 `json:"day,omitempty"` + + // Hours: Required. Hours of day in 24 hour format. Should be from 0 to + // 23. An API may choose to allow the value "24:00:00" for scenarios + // like business closing time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Required. Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + + // Month: Required. Month of year. Must be from 1 to 12. + Month int64 `json:"month,omitempty"` + + // Nanos: Required. Fractions of seconds in nanoseconds. Must be from 0 + // to 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Required. Seconds of minutes of the time. Must normally be + // from 0 to 59. An API may allow the value 60 if it allows + // leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // TimeZone: Time zone. + TimeZone *GoogleTypeTimeZone `json:"timeZone,omitempty"` + + // UtcOffset: UTC offset. Must be whole seconds, between -18 hours and + // +18 hours. For example, a UTC offset of -4:00 would be represented as + // { seconds: -14400 }. + UtcOffset string `json:"utcOffset,omitempty"` + + // Year: Optional. Year of date. Must be from 1 to 9999, or 0 if + // specifying a datetime without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDateTime) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDateTime + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDecimal: A representation of a decimal value, such as 2.5. +// Clients may convert values into language-native decimal formats, such +// as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: +// https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html +// [decimal.Decimal]: https://docs.python.org/3/library/decimal.html +type GoogleTypeDecimal struct { + // Value: The decimal value, as a string. The string representation + // consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), + // followed by a sequence of zero or more decimal digits ("the + // integer"), optionally followed by a fraction, optionally followed by + // an exponent. The fraction consists of a decimal point followed by + // zero or more decimal digits. The string must contain at least one + // digit in either the integer or the fraction. The number formed by the + // sign, the integer and the fraction is referred to as the significand. + // The exponent consists of the character `e` (`U+0065`) or `E` + // (`U+0045`) followed by one or more decimal digits. Services + // **should** normalize decimal values before storing them by: - + // Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - + // Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - + // Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - + // Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + // Services **may** perform additional normalization based on its own + // needs and the internal decimal implementation selected, such as + // shifting the decimal point and exponent value together (example: + // `2.5e-1` <-> `0.25`). Additionally, services **may** preserve + // trailing zeroes in the fraction to indicate increased precision, but + // are not required to do so. Note that only the `.` character is + // supported to divide the integer and the fraction; `,` **should not** + // be supported regardless of locale. Additionally, thousand separators + // **should not** be supported. If a service does support them, values + // **must** be normalized. The ENBF grammar is: DecimalString = [Sign] + // Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | + // [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { + // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services + // **should** clearly document the range of supported values, the + // maximum supported precision (total number of digits), and, if + // applicable, the scale (number of digits after the decimal point), as + // well as how it behaves when receiving out-of-bounds values. Services + // **may** choose to accept values passed as input even when the value + // has a higher precision or scale than the service supports, and + // **should** round the value to fit the supported scale. Alternatively, + // the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` + // in gRPC) if precision would be lost. Services **should** error with + // `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service + // receives a value outside of the supported range. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDecimal) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDecimal + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone +// Database (https://www.iana.org/time-zones). +type GoogleTypeTimeZone struct { + // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + Id string `json:"id,omitempty"` + + // Version: Optional. IANA Time Zone Database version number, e.g. + // "2019a". + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleTypeTimeZone) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeTimeZone + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "playdeveloperreporting.anomalies.list": + +type AnomaliesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists anomalies in any of the datasets. +// +// - parent: Parent app for which anomalies were detected. Format: +// apps/{app}. +func (r *AnomaliesService) List(parent string) *AnomaliesListCall { + c := &AnomaliesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering criteria for +// anomalies. For basic filter guidance, please check: +// https://google.aip.dev/160. **Supported functions:** * +// `activeBetween(startTime, endTime)`: If specified, only list +// anomalies that were active in between `startTime` (inclusive) and +// `endTime` (exclusive). Both parameters are expected to conform to an +// RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC +// offsets are supported. Both `startTime` and `endTime` accept the +// special value `UNBOUNDED`, to signify intervals with no lower or +// upper bound, respectively. Examples: * +// `activeBetween("2021-04-21T11:30:00Z", "2021-07-21T00:00:00Z")` * +// `activeBetween(UNBOUNDED, "2021-11-21T00:00:00-04:00")` * +// `activeBetween("2021-07-21T00:00:00-04:00", UNBOUNDED)` +func (c *AnomaliesListCall) Filter(filter string) *AnomaliesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum size of the +// returned data. If unspecified, at most 10 anomalies will be returned. +// The maximum value is 100; values above 100 will be coerced to 100. +func (c *AnomaliesListCall) PageSize(pageSize int64) *AnomaliesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListErrorReports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListErrorReports` must match the call that provided the +// page token. +func (c *AnomaliesListCall) PageToken(pageToken string) *AnomaliesListCall { + 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 *AnomaliesListCall) Fields(s ...googleapi.Field) *AnomaliesListCall { + 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 *AnomaliesListCall) IfNoneMatch(entityTag string) *AnomaliesListCall { + 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 *AnomaliesListCall) Context(ctx context.Context) *AnomaliesListCall { + 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 *AnomaliesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AnomaliesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/anomalies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.anomalies.list" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse.ServerRespon +// se.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 *AnomaliesListCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse, 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 := &GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse{ + 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 anomalies in any of the datasets.", + // "flatPath": "v1beta1/apps/{appsId}/anomalies", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.anomalies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering criteria for anomalies. For basic filter guidance, please check: https://google.aip.dev/160. **Supported functions:** * `activeBetween(startTime, endTime)`: If specified, only list anomalies that were active in between `startTime` (inclusive) and `endTime` (exclusive). Both parameters are expected to conform to an RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC offsets are supported. Both `startTime` and `endTime` accept the special value `UNBOUNDED`, to signify intervals with no lower or upper bound, respectively. Examples: * `activeBetween(\"2021-04-21T11:30:00Z\", \"2021-07-21T00:00:00Z\")` * `activeBetween(UNBOUNDED, \"2021-11-21T00:00:00-04:00\")` * `activeBetween(\"2021-07-21T00:00:00-04:00\", UNBOUNDED)`", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum size of the returned data. If unspecified, at most 10 anomalies will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListErrorReports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent app for which anomalies were detected. Format: apps/{app}", + // "location": "path", + // "pattern": "^apps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/anomalies", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse" + // } + // } + +} + +// 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 *AnomaliesListCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse) 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 "playdeveloperreporting.vitals.anrrate.get": + +type VitalsAnrrateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: apps/{app}/anrRateMetricSet. +func (r *VitalsAnrrateService) Get(name string) *VitalsAnrrateGetCall { + c := &VitalsAnrrateGetCall{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 *VitalsAnrrateGetCall) Fields(s ...googleapi.Field) *VitalsAnrrateGetCall { + 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 *VitalsAnrrateGetCall) IfNoneMatch(entityTag string) *VitalsAnrrateGetCall { + 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 *VitalsAnrrateGetCall) Context(ctx context.Context) *VitalsAnrrateGetCall { + 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 *VitalsAnrrateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsAnrrateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.anrrate.get" call. +// Exactly one of *GooglePlayDeveloperReportingV1beta1AnrRateMetricSet +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1beta1AnrRateMetricSet.ServerResponse.He +// ader 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 *VitalsAnrrateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1AnrRateMetricSet, 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 := &GooglePlayDeveloperReportingV1beta1AnrRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/anrRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.anrrate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/anrRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1AnrRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.anrrate.query": + +type VitalsAnrrateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: apps/{app}/anrRateMetricSet. +func (r *VitalsAnrrateService) Query(name string, googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest) *VitalsAnrrateQueryCall { + c := &VitalsAnrrateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest = googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest + 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 *VitalsAnrrateQueryCall) Fields(s ...googleapi.Field) *VitalsAnrrateQueryCall { + 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 *VitalsAnrrateQueryCall) Context(ctx context.Context) *VitalsAnrrateQueryCall { + 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 *VitalsAnrrateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsAnrrateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.anrrate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse.Serv +// erResponse.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 *VitalsAnrrateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/anrRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.anrrate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/anrRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsAnrrateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest.PageToken = pt }(c.googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest.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.googleplaydeveloperreportingv1beta1queryanrratemetricsetrequest.PageToken = x.NextPageToken + } +} + +// method id "playdeveloperreporting.vitals.crashrate.get": + +type VitalsCrashrateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: apps/{app}/crashRateMetricSet. +func (r *VitalsCrashrateService) Get(name string) *VitalsCrashrateGetCall { + c := &VitalsCrashrateGetCall{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 *VitalsCrashrateGetCall) Fields(s ...googleapi.Field) *VitalsCrashrateGetCall { + 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 *VitalsCrashrateGetCall) IfNoneMatch(entityTag string) *VitalsCrashrateGetCall { + 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 *VitalsCrashrateGetCall) Context(ctx context.Context) *VitalsCrashrateGetCall { + 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 *VitalsCrashrateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsCrashrateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.crashrate.get" call. +// Exactly one of *GooglePlayDeveloperReportingV1beta1CrashRateMetricSet +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1beta1CrashRateMetricSet.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 *VitalsCrashrateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1CrashRateMetricSet, 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 := &GooglePlayDeveloperReportingV1beta1CrashRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/crashRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.crashrate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/crashRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1CrashRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.crashrate.query": + +type VitalsCrashrateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: apps/{app}/crashRateMetricSet. +func (r *VitalsCrashrateService) Query(name string, googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest) *VitalsCrashrateQueryCall { + c := &VitalsCrashrateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest = googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest + 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 *VitalsCrashrateQueryCall) Fields(s ...googleapi.Field) *VitalsCrashrateQueryCall { + 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 *VitalsCrashrateQueryCall) Context(ctx context.Context) *VitalsCrashrateQueryCall { + 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 *VitalsCrashrateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsCrashrateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.crashrate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse.Se +// rverResponse.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 *VitalsCrashrateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/crashRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.crashrate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/crashRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsCrashrateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest.PageToken = pt }(c.googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest.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.googleplaydeveloperreportingv1beta1querycrashratemetricsetrequest.PageToken = x.NextPageToken + } +} + +// method id "playdeveloperreporting.vitals.excessivewakeuprate.get": + +type VitalsExcessivewakeuprateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: +// apps/{app}/excessiveWakeupRateMetricSet. +func (r *VitalsExcessivewakeuprateService) Get(name string) *VitalsExcessivewakeuprateGetCall { + c := &VitalsExcessivewakeuprateGetCall{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 *VitalsExcessivewakeuprateGetCall) Fields(s ...googleapi.Field) *VitalsExcessivewakeuprateGetCall { + 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 *VitalsExcessivewakeuprateGetCall) IfNoneMatch(entityTag string) *VitalsExcessivewakeuprateGetCall { + 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 *VitalsExcessivewakeuprateGetCall) Context(ctx context.Context) *VitalsExcessivewakeuprateGetCall { + 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 *VitalsExcessivewakeuprateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsExcessivewakeuprateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.excessivewakeuprate.get" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet.Serve +// rResponse.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 *VitalsExcessivewakeuprateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet, 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 := &GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/excessiveWakeupRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.excessivewakeuprate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.excessivewakeuprate.query": + +type VitalsExcessivewakeuprateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: +// apps/{app}/excessiveWakeupRateMetricSet. +func (r *VitalsExcessivewakeuprateService) Query(name string, googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest) *VitalsExcessivewakeuprateQueryCall { + c := &VitalsExcessivewakeuprateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest = googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest + 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 *VitalsExcessivewakeuprateQueryCall) Fields(s ...googleapi.Field) *VitalsExcessivewakeuprateQueryCall { + 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 *VitalsExcessivewakeuprateQueryCall) Context(ctx context.Context) *VitalsExcessivewakeuprateQueryCall { + 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 *VitalsExcessivewakeuprateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsExcessivewakeuprateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.excessivewakeuprate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetR +// esponse or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetR +// esponse.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 *VitalsExcessivewakeuprateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/excessiveWakeupRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.excessivewakeuprate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsExcessivewakeuprateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { + c.googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest.PageToken = pt + }(c.googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest.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.googleplaydeveloperreportingv1beta1queryexcessivewakeupratemetricsetrequest.PageToken = x.NextPageToken + } +} + +// method id "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get": + +type VitalsStuckbackgroundwakelockrateGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Describes the properties of the metric set. +// +// - name: The resource name. Format: +// apps/{app}/stuckBackgroundWakelockRateMetricSet. +func (r *VitalsStuckbackgroundwakelockrateService) Get(name string) *VitalsStuckbackgroundwakelockrateGetCall { + c := &VitalsStuckbackgroundwakelockrateGetCall{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 *VitalsStuckbackgroundwakelockrateGetCall) Fields(s ...googleapi.Field) *VitalsStuckbackgroundwakelockrateGetCall { + 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 *VitalsStuckbackgroundwakelockrateGetCall) IfNoneMatch(entityTag string) *VitalsStuckbackgroundwakelockrateGetCall { + 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 *VitalsStuckbackgroundwakelockrateGetCall) Context(ctx context.Context) *VitalsStuckbackgroundwakelockrateGetCall { + 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 *VitalsStuckbackgroundwakelockrateGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsStuckbackgroundwakelockrateGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricS +// et or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricS +// et.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 *VitalsStuckbackgroundwakelockrateGetCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet, 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 := &GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet{ + 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": "Describes the properties of the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet", + // "httpMethod": "GET", + // "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet" + // } + // } + +} + +// method id "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query": + +type VitalsStuckbackgroundwakelockrateQueryCall struct { + s *Service + name string + googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Queries the metrics in the metric set. +// +// - name: The resource name. Format: +// apps/{app}/stuckBackgroundWakelockRateMetricSet. +func (r *VitalsStuckbackgroundwakelockrateService) Query(name string, googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest *GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest) *VitalsStuckbackgroundwakelockrateQueryCall { + c := &VitalsStuckbackgroundwakelockrateQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest = googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest + 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 *VitalsStuckbackgroundwakelockrateQueryCall) Fields(s ...googleapi.Field) *VitalsStuckbackgroundwakelockrateQueryCall { + 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 *VitalsStuckbackgroundwakelockrateQueryCall) Context(ctx context.Context) *VitalsStuckbackgroundwakelockrateQueryCall { + 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 *VitalsStuckbackgroundwakelockrateQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VitalsStuckbackgroundwakelockrateQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query" call. +// Exactly one of +// *GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMe +// tricSetResponse or error will be non-nil. Any non-2xx status code is +// an error. Response headers are in either +// *GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMe +// tricSetResponse.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 *VitalsStuckbackgroundwakelockrateQueryCall) Do(opts ...googleapi.CallOption) (*GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse, 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 := &GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse{ + 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": "Queries the metrics in the metric set.", + // "flatPath": "v1beta1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet:query", + // "httpMethod": "POST", + // "id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", + // "location": "path", + // "pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:query", + // "request": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest" + // }, + // "response": { + // "$ref": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse" + // } + // } + +} + +// 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 *VitalsStuckbackgroundwakelockrateQueryCall) Pages(ctx context.Context, f func(*GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { + c.googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest.PageToken = pt + }(c.googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest.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.googleplaydeveloperreportingv1beta1querystuckbackgroundwakelockratemetricsetrequest.PageToken = x.NextPageToken + } +} diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index dd3a07762f0..42a54317c99 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -1424,7 +1424,7 @@ } } }, - "revision": "20220207", + "revision": "20220301", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -1705,7 +1705,7 @@ "type": "string" }, "serviceAccountEmail": { - "description": "[Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. The caller (for CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.", + "description": "[Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. See [Setting up push authentication](/pubsub/docs/push#setting_up_for_push_authentication) for more details.", "type": "string" } }, @@ -1896,6 +1896,17 @@ "description": "Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.", "type": "string" }, + "revisionCreateTime": { + "description": "Output only. The timestamp that the revision was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "revisionId": { + "description": "Output only. Immutable. The revision ID of the schema.", + "readOnly": true, + "type": "string" + }, "type": { "description": "The type of the schema definition.", "enum": [ diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index 406531d5fba..f4921c80d71 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -882,9 +882,9 @@ type OidcToken struct { // ServiceAccountEmail: Service account email // (https://cloud.google.com/iam/docs/service-accounts) to be used for - // generating the OIDC token. The caller (for CreateSubscription, - // UpdateSubscription, and ModifyPushConfig RPCs) must have the - // iam.serviceAccounts.actAs permission for the service account. + // generating the OIDC token. See Setting up push authentication + // (/pubsub/docs/push#setting_up_for_push_authentication) for more + // details. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` // ForceSendFields is a list of field names (e.g. "Audience") to @@ -1368,6 +1368,13 @@ type Schema struct { // `projects/{project}/schemas/{schema}`. Name string `json:"name,omitempty"` + // RevisionCreateTime: Output only. The timestamp that the revision was + // created. + RevisionCreateTime string `json:"revisionCreateTime,omitempty"` + + // RevisionId: Output only. Immutable. The revision ID of the schema. + RevisionId string `json:"revisionId,omitempty"` + // Type: The type of the schema definition. // // Possible values: diff --git a/run/v1/run-api.json b/run/v1/run-api.json index cc942b3b68e..fc90f685e08 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2261,7 +2261,7 @@ } } }, - "revision": "20220218", + "revision": "20220304", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -2846,6 +2846,11 @@ "description": "ExecutionStatus represents the current state of a Execution.", "id": "ExecutionStatus", "properties": { + "cancelledCount": { + "description": "Optional. The number of tasks which reached phase Cancelled. +optional", + "format": "int32", + "type": "integer" + }, "completionTime": { "description": "Optional. Represents time when the execution was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional", "format": "google-datetime", @@ -2872,6 +2877,11 @@ "format": "int32", "type": "integer" }, + "retriedCount": { + "description": "Optional. The number of tasks which have retried at least once. +optional", + "format": "int32", + "type": "integer" + }, "runningCount": { "description": "Optional. The number of actively running tasks. +optional", "format": "int32", diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index dd9d57f94d8..4fcf5fc25ef 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -1529,6 +1529,10 @@ func (s *ExecutionSpec) MarshalJSON() ([]byte, error) { // ExecutionStatus: ExecutionStatus represents the current state of a // Execution. type ExecutionStatus struct { + // CancelledCount: Optional. The number of tasks which reached phase + // Cancelled. +optional + CancelledCount int64 `json:"cancelledCount,omitempty"` + // CompletionTime: Optional. Represents time when the execution was // completed. It is not guaranteed to be set in happens-before order // across separate operations. It is represented in RFC3339 form and is @@ -1553,6 +1557,10 @@ type ExecutionStatus struct { // was last processed by the controller. ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // RetriedCount: Optional. The number of tasks which have retried at + // least once. +optional + RetriedCount int64 `json:"retriedCount,omitempty"` + // RunningCount: Optional. The number of actively running tasks. // +optional RunningCount int64 `json:"runningCount,omitempty"` @@ -1567,7 +1575,7 @@ type ExecutionStatus struct { // Succeeded. +optional SucceededCount int64 `json:"succeededCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompletionTime") to + // ForceSendFields is a list of field names (e.g. "CancelledCount") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1575,7 +1583,7 @@ type ExecutionStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletionTime") to + // NullFields is a list of field names (e.g. "CancelledCount") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index 238ff3c301d..65176bc5ff5 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -282,7 +282,7 @@ } } }, - "revision": "20220201", + "revision": "20220308", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -851,7 +851,7 @@ "type": "object" }, "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day, with a zero year (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", "id": "Date", "properties": { "day": { diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index dd713096c28..c0574640a18 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -1042,11 +1042,12 @@ func (s *ClientInfoDetail) MarshalJSON() ([]byte, error) { // birthday. The time of day and time zone are either specified // elsewhere or are insignificant. The date is relative to the Gregorian // Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values * A month and day, with a -// zero year (e.g., an anniversary) * A year on its own, with a zero -// month and a zero day * A year and month, with a zero day (e.g., a -// credit card expiration date) Related types: * google.type.TimeOfDay * -// google.type.DateTime * google.protobuf.Timestamp +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp type Date struct { // Day: Day of a month. Must be from 1 to 31 and valid for the year and // month, or 0 to specify a year by itself or a year and month where the