From a15358113cf46279bb4add9f5c99c175a205ef47 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Feb 2024 08:12:19 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- api-list.json | 2 +- apigee/v1/apigee-api.json | 46 +- apigee/v1/apigee-gen.go | 41 +- apphub/v1/apphub-api.json | 1589 +++- apphub/v1/apphub-gen.go | 6569 +++++++++++++++-- apphub/v1alpha/apphub-api.json | 68 +- apphub/v1alpha/apphub-gen.go | 78 +- .../v1/bigqueryreservation-api.json | 22 +- chromemanagement/v1/chromemanagement-api.json | 8 +- chromemanagement/v1/chromemanagement-gen.go | 7 +- container/v1/container-api.json | 10 +- container/v1/container-gen.go | 7 + container/v1beta1/container-api.json | 8 +- container/v1beta1/container-gen.go | 9 +- language/v1/language-api.json | 4405 +---------- language/v1/language-gen.go | 6158 +-------------- language/v1beta2/language-api.json | 4405 +---------- language/v1beta2/language-gen.go | 6164 +--------------- language/v2/language-api.json | 4349 +---------- language/v2/language-gen.go | 6054 +-------------- places/v1/places-api.json | 251 +- places/v1/places-gen.go | 651 +- policysimulator/v1/policysimulator-api.json | 473 +- policysimulator/v1/policysimulator-gen.go | 3792 ++++++---- .../v1alpha/policysimulator-api.json | 167 +- .../v1alpha/policysimulator-gen.go | 168 +- .../v1beta/policysimulator-api.json | 167 +- policysimulator/v1beta/policysimulator-gen.go | 168 +- storagetransfer/v1/storagetransfer-api.json | 109 +- storagetransfer/v1/storagetransfer-gen.go | 219 +- walletobjects/v1/walletobjects-api.json | 4 +- walletobjects/v1/walletobjects-gen.go | 3 +- workspaceevents/v1/workspaceevents-api.json | 8 +- workspaceevents/v1/workspaceevents-gen.go | 18 +- 34 files changed, 12932 insertions(+), 33265 deletions(-) diff --git a/api-list.json b/api-list.json index 354b799e990..16e8c62d930 100644 --- a/api-list.json +++ b/api-list.json @@ -53,7 +53,7 @@ "name": "accesscontextmanager", "version": "v1", "title": "Access Context Manager API", - "description": "An API for setting attribute based access control to requests to Google Cloud services.", + "description": "An API for setting attribute based access control to requests to Google Cloud services. *Warning:* Do not mix *v1alpha* and *v1* API usage in the same access policy. The v1alpha API supports new Access Context Manager features, which may have different attributes or behaviors that are not supported by v1. The practice of mixed API usage within a policy may result in the inability to update that policy, including any access levels or service perimeters belonging to it. It is not recommended to use both v1 and v1alpha for modifying policies with critical service perimeters. Modifications using v1alpha should be limited to policies with non-production/non-critical service perimeters.", "discoveryRestUrl": "https://accesscontextmanager.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index ac09cce6277..2665035c618 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -9814,7 +9814,7 @@ } } }, - "revision": "20240122", + "revision": "20240220", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -16086,9 +16086,30 @@ "type": "object" }, "GoogleCloudApigeeV1SecurityActionConditionConfig": { - "description": "The following are a list of conditions. A valid SecurityAction must contain at least one condition. Within a condition, each element is ORed. Across conditions elements are ANDed. For example if a SecurityAction has the following: api_keys: [\"key1\", \"key2\"] and developers: [\"dev1\", \"dev2\"] then this is interpreted as: enforce the action if the incoming request has ((api_key = \"key1\" OR api_key=\"key\") AND (developer=\"dev1\" OR developer=\"dev2\")).", + "description": "The following are a list of conditions. A valid SecurityAction must contain at least one condition. Within a condition, each element is ORed. Across conditions elements are ANDed. For example if a SecurityAction has the following: ip_address_ranges: [\"ip1\", \"ip2\"] and bot_reasons: [\"Flooder\", \"Robot Abuser\"] then this is interpreted as: enforce the action if the incoming request has ((ip_address_ranges = \"ip1\" OR ip_address_ranges = \"ip2\") AND (bot_reasons=\"Flooder\" OR bot_reasons=\"Robot Abuser\")). Conditions other than ip_address_ranges and bot_reasons cannot be ANDed.", "id": "GoogleCloudApigeeV1SecurityActionConditionConfig", "properties": { + "accessTokens": { + "description": "Optional. A list of access_tokens. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "apiKeys": { + "description": "Optional. A list of API keys. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "apiProducts": { + "description": "Optional. A list of API Products. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, "botReasons": { "description": "Optional. A list of Bot Reasons. Current options: Flooder, Brute Guessor, Static Content Scraper, OAuth Abuser, Robot Abuser, TorListRule, Advanced Anomaly Detection, Advanced API Scraper, Search Engine Crawlers, Public Clouds, Public Cloud AWS, Public Cloud Azure, and Public Cloud Google.", "items": { @@ -16096,12 +16117,33 @@ }, "type": "array" }, + "developerApps": { + "description": "Optional. A list of developer apps. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "developers": { + "description": "Optional. A list of developers. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, "ipAddressRanges": { "description": "Optional. A list of IP addresses. This could be either IPv4 or IPv6. Limited to 100 per action.", "items": { "type": "string" }, "type": "array" + }, + "userAgents": { + "description": "Optional. A list of user agents to deny. We look for exact matches. Limit 50 per action.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index d474bded7cc..c4da7812c95 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -10938,11 +10938,23 @@ type GoogleCloudApigeeV1SecurityActionAllow struct { // list of conditions. A valid SecurityAction must contain at least one // condition. Within a condition, each element is ORed. Across // conditions elements are ANDed. For example if a SecurityAction has -// the following: api_keys: ["key1", "key2"] and developers: ["dev1", -// "dev2"] then this is interpreted as: enforce the action if the -// incoming request has ((api_key = "key1" OR api_key="key") AND -// (developer="dev1" OR developer="dev2")). +// the following: ip_address_ranges: ["ip1", "ip2"] and bot_reasons: +// ["Flooder", "Robot Abuser"] then this is interpreted as: enforce the +// action if the incoming request has ((ip_address_ranges = "ip1" OR +// ip_address_ranges = "ip2") AND (bot_reasons="Flooder" OR +// bot_reasons="Robot Abuser")). Conditions other than ip_address_ranges +// and bot_reasons cannot be ANDed. type GoogleCloudApigeeV1SecurityActionConditionConfig struct { + // AccessTokens: Optional. A list of access_tokens. Limit 1000 per + // action. + AccessTokens []string `json:"accessTokens,omitempty"` + + // ApiKeys: Optional. A list of API keys. Limit 1000 per action. + ApiKeys []string `json:"apiKeys,omitempty"` + + // ApiProducts: Optional. A list of API Products. Limit 1000 per action. + ApiProducts []string `json:"apiProducts,omitempty"` + // BotReasons: Optional. A list of Bot Reasons. Current options: // Flooder, Brute Guessor, Static Content Scraper, OAuth Abuser, Robot // Abuser, TorListRule, Advanced Anomaly Detection, Advanced API @@ -10950,11 +10962,22 @@ type GoogleCloudApigeeV1SecurityActionConditionConfig struct { // Public Cloud Azure, and Public Cloud Google. BotReasons []string `json:"botReasons,omitempty"` + // DeveloperApps: Optional. A list of developer apps. Limit 1000 per + // action. + DeveloperApps []string `json:"developerApps,omitempty"` + + // Developers: Optional. A list of developers. Limit 1000 per action. + Developers []string `json:"developers,omitempty"` + // IpAddressRanges: Optional. A list of IP addresses. This could be // either IPv4 or IPv6. Limited to 100 per action. IpAddressRanges []string `json:"ipAddressRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "BotReasons") to + // UserAgents: Optional. A list of user agents to deny. We look for + // exact matches. Limit 50 per action. + UserAgents []string `json:"userAgents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessTokens") 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 @@ -10962,10 +10985,10 @@ type GoogleCloudApigeeV1SecurityActionConditionConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BotReasons") to include in - // API requests with the JSON null value. By default, fields with 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. "AccessTokens") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if 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/apphub/v1/apphub-api.json b/apphub/v1/apphub-api.json index 38a3c902631..41130847f1b 100644 --- a/apphub/v1/apphub-api.json +++ b/apphub/v1/apphub-api.json @@ -109,6 +109,34 @@ "resources": { "locations": { "methods": { + "detachServiceProjectAttachment": { + "description": "Detaches a service project from a host project. You can call this API from either a host or service project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:detachServiceProjectAttachment", + "httpMethod": "POST", + "id": "apphub.projects.locations.detachServiceProjectAttachment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:detachServiceProjectAttachment", + "request": { + "$ref": "DetachServiceProjectAttachmentRequest" + }, + "response": { + "$ref": "DetachServiceProjectAttachmentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets information about a location.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", @@ -174,11 +202,129 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "lookupServiceProjectAttachment": { + "description": "Looks up a service project attachment. You can call this API from either a host or service project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:lookupServiceProjectAttachment", + "httpMethod": "GET", + "id": "apphub.projects.locations.lookupServiceProjectAttachment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:lookupServiceProjectAttachment", + "response": { + "$ref": "LookupServiceProjectAttachmentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { "applications": { "methods": { + "create": { + "description": "Creates an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + "httpMethod": "POST", + "id": "apphub.projects.locations.applications.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "applicationId": { + "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/applications", + "request": { + "$ref": "Application" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.applications.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Application" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", @@ -210,6 +356,91 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Lists Applications in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/applications", + "response": { + "$ref": "ListApplicationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.applications.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of an Application. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Application resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Application" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", @@ -266,6 +497,522 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "services": { + "methods": { + "create": { + "description": "Creates a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + "httpMethod": "POST", + "id": "apphub.projects.locations.applications.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/services", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.applications.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Service" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List Services in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/services", + "response": { + "$ref": "ListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.applications.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of a Service. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "workloads": { + "methods": { + "create": { + "description": "Creates a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + "httpMethod": "POST", + "id": "apphub.projects.locations.applications.workloads.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "workloadId": { + "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/workloads", + "request": { + "$ref": "Workload" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.applications.workloads.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.workloads.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Workload" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Workloads in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.workloads.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workloads", + "response": { + "$ref": "ListWorkloadsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.applications.workloads.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the Workload. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Workload resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Workload" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "discoveredServices": { + "methods": { + "get": { + "description": "Gets a discovered service in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices/{discoveredServicesId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredServices.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DiscoveredService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists discovered services that can be added to an application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredServices.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/discoveredServices", + "response": { + "$ref": "ListDiscoveredServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "discoveredWorkloads": { + "methods": { + "get": { + "description": "Gets a discovered workload in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads/{discoveredWorkloadsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredWorkloads.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DiscoveredWorkload" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists discovered workloads that can be added to an application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredWorkloads.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/discoveredWorkloads", + "response": { + "$ref": "ListDiscoveredWorkloadsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } } }, "operations": { @@ -390,15 +1137,255 @@ ] } } + }, + "serviceProjectAttachments": { + "methods": { + "create": { + "description": "Attaches a service project to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", + "httpMethod": "POST", + "id": "apphub.projects.locations.serviceProjectAttachments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "serviceProjectAttachmentId": { + "description": "Required. The service project attachment identifier must contain the project_id of the service project specified in the service_project_attachment.service_project field. Hint: \"projects/{project_id}\"", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/serviceProjectAttachments", + "request": { + "$ref": "ServiceProjectAttachment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a service project attached to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.serviceProjectAttachments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a service project attached to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.serviceProjectAttachments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ServiceProjectAttachment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List service projects attached to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", + "httpMethod": "GET", + "id": "apphub.projects.locations.serviceProjectAttachments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceProjectAttachments", + "response": { + "$ref": "ListServiceProjectAttachmentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20240122", + "revision": "20240217", "rootUrl": "https://apphub.googleapis.com/", "schemas": { + "Application": { + "description": "Application defines the governance boundary for App Hub Entities that perform a logical end-to-end business function. App Hub supports application level IAM permission to align with governance requirements.", + "id": "Application", + "properties": { + "attributes": { + "$ref": "Attributes", + "description": "Optional. Consumer provided attributes." + }, + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-defined description of an Application. Can have a maximum length of 2048 characters.", + "type": "string" + }, + "displayName": { + "description": "Optional. User-defined name for the Application. Can have a maximum length of 63 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of an Application. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}\"", + "type": "string" + }, + "scope": { + "$ref": "Scope", + "description": "Required. Immutable. Defines what data can be included into this Application. Limits which Services and Workloads can be registered." + }, + "state": { + "description": "Output only. Application state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "Unspecified state.", + "The Application is being created.", + "The Application is ready to register Services and Workloads.", + "The Application is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A universally unique identifier (in UUID4 format) for the `Application`.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Attributes": { + "description": "Consumer provided attributes.", + "id": "Attributes", + "properties": { + "businessOwners": { + "description": "Optional. Business team that ensures user needs are met and value is delivered", + "items": { + "$ref": "ContactInfo" + }, + "type": "array" + }, + "criticality": { + "$ref": "Criticality", + "description": "Optional. User-defined criticality information." + }, + "developerOwners": { + "description": "Optional. Developer team that owns development and coding.", + "items": { + "$ref": "ContactInfo" + }, + "type": "array" + }, + "environment": { + "$ref": "Environment", + "description": "Optional. User-defined environment information." + }, + "operatorOwners": { + "description": "Optional. Operator team that ensures runtime and operations.", + "items": { + "$ref": "ContactInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "AuditConfig": { "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", "id": "AuditConfig", @@ -475,12 +1462,131 @@ "properties": {}, "type": "object" }, + "ContactInfo": { + "description": "Contact information of stakeholders.", + "id": "ContactInfo", + "properties": { + "displayName": { + "description": "Optional. Contact's name. Can have a maximum length of 63 characters.", + "type": "string" + }, + "email": { + "description": "Required. Email address of the contacts.", + "type": "string" + } + }, + "type": "object" + }, + "Criticality": { + "description": "Criticality of the Application, Service, or Workload", + "id": "Criticality", + "properties": { + "type": { + "description": "Required. Criticality Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "MISSION_CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "Unspecified type.", + "Mission critical service, application or workload.", + "High impact.", + "Medium impact.", + "Low impact." + ], + "type": "string" + } + }, + "type": "object" + }, + "DetachServiceProjectAttachmentRequest": { + "description": "Request for DetachServiceProjectAttachment.", + "id": "DetachServiceProjectAttachmentRequest", + "properties": {}, + "type": "object" + }, + "DetachServiceProjectAttachmentResponse": { + "description": "Response for DetachServiceProjectAttachment.", + "id": "DetachServiceProjectAttachmentResponse", + "properties": {}, + "type": "object" + }, + "DiscoveredService": { + "description": "DiscoveredService is a network/api interface that exposes some functionality to clients for consumption over the network. A discovered service can be registered to a App Hub service.", + "id": "DiscoveredService", + "properties": { + "name": { + "description": "Identifier. The resource name of the discovered service. Format: \"projects/{host-project-id}/locations/{location}/discoveredServices/{uuid}\"\"", + "type": "string" + }, + "serviceProperties": { + "$ref": "ServiceProperties", + "description": "Output only. Properties of an underlying compute resource that can comprise a Service. These are immutable.", + "readOnly": true + }, + "serviceReference": { + "$ref": "ServiceReference", + "description": "Output only. Reference to an underlying networking resource that can comprise a Service. These are immutable.", + "readOnly": true + } + }, + "type": "object" + }, + "DiscoveredWorkload": { + "description": "DiscoveredWorkload is a binary deployment (such as managed instance groups (MIGs) and GKE deployments) that performs the smallest logical subset of business functionality. A discovered workload can be registered to an App Hub Workload.", + "id": "DiscoveredWorkload", + "properties": { + "name": { + "description": "Identifier. The resource name of the discovered workload. Format: \"projects/{host-project-id}/locations/{location}/discoveredWorkloads/{uuid}\"", + "type": "string" + }, + "workloadProperties": { + "$ref": "WorkloadProperties", + "description": "Output only. Properties of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + }, + "workloadReference": { + "$ref": "WorkloadReference", + "description": "Output only. Reference of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + } + }, + "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); }", "id": "Empty", "properties": {}, "type": "object" }, + "Environment": { + "description": "Environment of the Application, Service, or Workload", + "id": "Environment", + "properties": { + "type": { + "description": "Required. Environment Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "PRODUCTION", + "STAGING", + "TEST", + "DEVELOPMENT" + ], + "enumDescriptions": [ + "Unspecified type.", + "Production environment.", + "Staging environment.", + "Test environment.", + "Development environment." + ], + "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", @@ -504,6 +1610,81 @@ }, "type": "object" }, + "ListApplicationsResponse": { + "description": "Response for ListApplications.", + "id": "ListApplicationsResponse", + "properties": { + "applications": { + "description": "List of Applications.", + "items": { + "$ref": "Application" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListDiscoveredServicesResponse": { + "description": "Response for ListDiscoveredServices.", + "id": "ListDiscoveredServicesResponse", + "properties": { + "discoveredServices": { + "description": "List of discovered services.", + "items": { + "$ref": "DiscoveredService" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListDiscoveredWorkloadsResponse": { + "description": "Response for ListDiscoveredWorkloads.", + "id": "ListDiscoveredWorkloadsResponse", + "properties": { + "discoveredWorkloads": { + "description": "List of discovered workloads.", + "items": { + "$ref": "DiscoveredWorkload" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -540,6 +1721,81 @@ }, "type": "object" }, + "ListServiceProjectAttachmentsResponse": { + "description": "Response for ListServiceProjectAttachments.", + "id": "ListServiceProjectAttachmentsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "serviceProjectAttachments": { + "description": "List of service project attachments.", + "items": { + "$ref": "ServiceProjectAttachment" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListServicesResponse": { + "description": "Response for ListServices.", + "id": "ListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "services": { + "description": "List of Services.", + "items": { + "$ref": "Service" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkloadsResponse": { + "description": "Response for ListWorkloads.", + "id": "ListWorkloadsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workloads": { + "description": "List of Workloads.", + "items": { + "$ref": "Workload" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents a Google Cloud location.", "id": "Location", @@ -574,6 +1830,17 @@ }, "type": "object" }, + "LookupServiceProjectAttachmentResponse": { + "description": "Response for LookupServiceProjectAttachment.", + "id": "LookupServiceProjectAttachmentResponse", + "properties": { + "serviceProjectAttachment": { + "$ref": "ServiceProjectAttachment", + "description": "Service project attachment for a project if exists, empty otherwise." + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -609,6 +1876,50 @@ }, "type": "object" }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -671,6 +1982,175 @@ }, "type": "object" }, + "Scope": { + "description": "Scope of an application.", + "id": "Scope", + "properties": { + "type": { + "description": "Required. Scope Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "REGIONAL" + ], + "enumDescriptions": [ + "Unspecified type.", + "Regional type." + ], + "type": "string" + } + }, + "type": "object" + }, + "Service": { + "description": "Service is an App Hub data model that contains a discovered service, which represents a network/api interface that exposes some functionality to clients for consumption over the network.", + "id": "Service", + "properties": { + "attributes": { + "$ref": "Attributes", + "description": "Optional. Consumer provided attributes." + }, + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-defined description of a Service. Can have a maximum length of 2048 characters.", + "type": "string" + }, + "discoveredService": { + "description": "Required. Immutable. The resource name of the original discovered service.", + "type": "string" + }, + "displayName": { + "description": "Optional. User-defined name for the Service. Can have a maximum length of 63 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of a Service. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}\"", + "type": "string" + }, + "serviceProperties": { + "$ref": "ServiceProperties", + "description": "Output only. Properties of an underlying compute resource that can comprise a Service. These are immutable.", + "readOnly": true + }, + "serviceReference": { + "$ref": "ServiceReference", + "description": "Output only. Reference to an underlying networking resource that can comprise a Service. These are immutable.", + "readOnly": true + }, + "state": { + "description": "Output only. Service state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "DETACHED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The service is being created.", + "The service is ready.", + "The service is being deleted.", + "The underlying networking resources have been deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A universally unique identifier (UUID) for the `Service` in the UUID4 format.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceProjectAttachment": { + "description": "ServiceProjectAttachment represents an attachment from a service project to a host project. Service projects contain the underlying cloud infrastructure resources, and expose these resources to the host project through a ServiceProjectAttachment. With the attachments, the host project can provide an aggregated view of resources across all service projects.", + "id": "ServiceProjectAttachment", + "properties": { + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of a ServiceProjectAttachment. Format: \"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\"", + "type": "string" + }, + "serviceProject": { + "description": "Required. Immutable. Service project name in the format: \"projects/abc\" or \"projects/123\". As input, project name with either project id or number are accepted. As output, this field will contain project number.", + "type": "string" + }, + "state": { + "description": "Output only. ServiceProjectAttachment state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "Unspecified state.", + "The ServiceProjectAttachment is being created.", + "The ServiceProjectAttachment is ready. This means Services and Workloads under the corresponding ServiceProjectAttachment is ready for registration.", + "The ServiceProjectAttachment is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A globally unique identifier (in UUID4 format) for the `ServiceProjectAttachment`.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceProperties": { + "description": "Properties of an underlying cloud resource that can comprise a Service.", + "id": "ServiceProperties", + "properties": { + "gcpProject": { + "description": "Output only. The service project identifier that the underlying cloud resource resides in.", + "readOnly": true, + "type": "string" + }, + "location": { + "description": "Output only. The location that the underlying resource resides in, for example, us-west1.", + "readOnly": true, + "type": "string" + }, + "zone": { + "description": "Output only. The location that the underlying resource resides in if it is zonal, for example, us-west1-a).", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceReference": { + "description": "Reference to an underlying networking resource that can comprise a Service.", + "id": "ServiceReference", + "properties": { + "uri": { + "description": "Output only. The underlying resource URI (For example, URI of Forwarding Rule, URL Map, and Backend Service).", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -741,6 +2221,113 @@ } }, "type": "object" + }, + "Workload": { + "description": "Workload is an App Hub data model that contains a discovered workload, which represents a binary deployment (such as managed instance groups (MIGs) and GKE deployments) that performs the smallest logical subset of business functionality.", + "id": "Workload", + "properties": { + "attributes": { + "$ref": "Attributes", + "description": "Optional. Consumer provided attributes." + }, + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters.", + "type": "string" + }, + "discoveredWorkload": { + "description": "Required. Immutable. The resource name of the original discovered workload.", + "type": "string" + }, + "displayName": { + "description": "Optional. User-defined name for the Workload. Can have a maximum length of 63 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of the Workload. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}\"", + "type": "string" + }, + "state": { + "description": "Output only. Workload state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "DETACHED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The Workload is being created.", + "The Workload is ready.", + "The Workload is being deleted.", + "The underlying compute resources have been deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A universally unique identifier (UUID) for the `Workload` in the UUID4 format.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "workloadProperties": { + "$ref": "WorkloadProperties", + "description": "Output only. Properties of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + }, + "workloadReference": { + "$ref": "WorkloadReference", + "description": "Output only. Reference of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + } + }, + "type": "object" + }, + "WorkloadProperties": { + "description": "Properties of an underlying compute resource represented by the Workload.", + "id": "WorkloadProperties", + "properties": { + "gcpProject": { + "description": "Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.", + "readOnly": true, + "type": "string" + }, + "location": { + "description": "Output only. The location that the underlying compute resource resides in (e.g us-west1).", + "readOnly": true, + "type": "string" + }, + "zone": { + "description": "Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WorkloadReference": { + "description": "Reference of an underlying compute resource represented by the Workload.", + "id": "WorkloadReference", + "properties": { + "uri": { + "description": "Output only. The underlying compute resource uri.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/apphub/v1/apphub-gen.go b/apphub/v1/apphub-gen.go index ddc8492d785..593fc0b1162 100644 --- a/apphub/v1/apphub-gen.go +++ b/apphub/v1/apphub-gen.go @@ -101,8 +101,8 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) -// NewService creates a new Service. -func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { +// NewService creates a new APIService. +func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", ) @@ -126,21 +126,21 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err return s, nil } -// New creates a new Service. It uses the provided http.Client for requests. +// New creates a new APIService. 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) { +func New(client *http.Client) (*APIService, error) { if client == nil { return nil, errors.New("client is nil") } - s := &Service{client: client, BasePath: basePath} + s := &APIService{client: client, BasePath: basePath} s.Projects = NewProjectsService(s) return s, nil } -type Service struct { +type APIService struct { client *http.Client BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment @@ -148,56 +148,233 @@ type Service struct { Projects *ProjectsService } -func (s *Service) userAgent() string { +func (s *APIService) userAgent() string { if s.UserAgent == "" { return googleapi.UserAgent } return googleapi.UserAgent + " " + s.UserAgent } -func NewProjectsService(s *Service) *ProjectsService { +func NewProjectsService(s *APIService) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) return rs } type ProjectsService struct { - s *Service + s *APIService Locations *ProjectsLocationsService } -func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { +func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Applications = NewProjectsLocationsApplicationsService(s) + rs.DiscoveredServices = NewProjectsLocationsDiscoveredServicesService(s) + rs.DiscoveredWorkloads = NewProjectsLocationsDiscoveredWorkloadsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.ServiceProjectAttachments = NewProjectsLocationsServiceProjectAttachmentsService(s) return rs } type ProjectsLocationsService struct { - s *Service + s *APIService Applications *ProjectsLocationsApplicationsService + DiscoveredServices *ProjectsLocationsDiscoveredServicesService + + DiscoveredWorkloads *ProjectsLocationsDiscoveredWorkloadsService + Operations *ProjectsLocationsOperationsService + + ServiceProjectAttachments *ProjectsLocationsServiceProjectAttachmentsService } -func NewProjectsLocationsApplicationsService(s *Service) *ProjectsLocationsApplicationsService { +func NewProjectsLocationsApplicationsService(s *APIService) *ProjectsLocationsApplicationsService { rs := &ProjectsLocationsApplicationsService{s: s} + rs.Services = NewProjectsLocationsApplicationsServicesService(s) + rs.Workloads = NewProjectsLocationsApplicationsWorkloadsService(s) return rs } type ProjectsLocationsApplicationsService struct { - s *Service + s *APIService + + Services *ProjectsLocationsApplicationsServicesService + + Workloads *ProjectsLocationsApplicationsWorkloadsService +} + +func NewProjectsLocationsApplicationsServicesService(s *APIService) *ProjectsLocationsApplicationsServicesService { + rs := &ProjectsLocationsApplicationsServicesService{s: s} + return rs +} + +type ProjectsLocationsApplicationsServicesService struct { + s *APIService +} + +func NewProjectsLocationsApplicationsWorkloadsService(s *APIService) *ProjectsLocationsApplicationsWorkloadsService { + rs := &ProjectsLocationsApplicationsWorkloadsService{s: s} + return rs +} + +type ProjectsLocationsApplicationsWorkloadsService struct { + s *APIService } -func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { +func NewProjectsLocationsDiscoveredServicesService(s *APIService) *ProjectsLocationsDiscoveredServicesService { + rs := &ProjectsLocationsDiscoveredServicesService{s: s} + return rs +} + +type ProjectsLocationsDiscoveredServicesService struct { + s *APIService +} + +func NewProjectsLocationsDiscoveredWorkloadsService(s *APIService) *ProjectsLocationsDiscoveredWorkloadsService { + rs := &ProjectsLocationsDiscoveredWorkloadsService{s: s} + return rs +} + +type ProjectsLocationsDiscoveredWorkloadsService struct { + s *APIService +} + +func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs } type ProjectsLocationsOperationsService struct { - s *Service + s *APIService +} + +func NewProjectsLocationsServiceProjectAttachmentsService(s *APIService) *ProjectsLocationsServiceProjectAttachmentsService { + rs := &ProjectsLocationsServiceProjectAttachmentsService{s: s} + return rs +} + +type ProjectsLocationsServiceProjectAttachmentsService struct { + s *APIService +} + +// Application: Application defines the governance boundary for App Hub +// Entities that perform a logical end-to-end business function. App Hub +// supports application level IAM permission to align with governance +// requirements. +type Application struct { + // Attributes: Optional. Consumer provided attributes. + Attributes *Attributes `json:"attributes,omitempty"` + + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-defined description of an Application. + // Can have a maximum length of 2048 characters. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. User-defined name for the Application. Can + // have a maximum length of 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Identifier. The resource name of an Application. Format: + // "projects/{host-project-id}/locations/{location}/applications/{applica + // tion-id}" + Name string `json:"name,omitempty"` + + // Scope: Required. Immutable. Defines what data can be included into + // this Application. Limits which Services and Workloads can be + // registered. + Scope *Scope `json:"scope,omitempty"` + + // State: Output only. Application state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The Application is being created. + // "ACTIVE" - The Application is ready to register Services and + // Workloads. + // "DELETING" - The Application is being deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A universally unique identifier (in UUID4 format) + // for the `Application`. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Application) MarshalJSON() ([]byte, error) { + type NoMethod Application + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Attributes: Consumer provided attributes. +type Attributes struct { + // BusinessOwners: Optional. Business team that ensures user needs are + // met and value is delivered + BusinessOwners []*ContactInfo `json:"businessOwners,omitempty"` + + // Criticality: Optional. User-defined criticality information. + Criticality *Criticality `json:"criticality,omitempty"` + + // DeveloperOwners: Optional. Developer team that owns development and + // coding. + DeveloperOwners []*ContactInfo `json:"developerOwners,omitempty"` + + // Environment: Optional. User-defined environment information. + Environment *Environment `json:"environment,omitempty"` + + // OperatorOwners: Optional. Operator team that ensures runtime and + // operations. + OperatorOwners []*ContactInfo `json:"operatorOwners,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BusinessOwners") 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. "BusinessOwners") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Attributes) MarshalJSON() ([]byte, error) { + type NoMethod Attributes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // AuditConfig: Specifies the audit configuration for a service. The @@ -412,6 +589,178 @@ func (s *Binding) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ContactInfo: Contact information of stakeholders. +type ContactInfo struct { + // DisplayName: Optional. Contact's name. Can have a maximum length of + // 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Email: Required. Email address of the contacts. + Email string `json:"email,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ContactInfo) MarshalJSON() ([]byte, error) { + type NoMethod ContactInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Criticality: Criticality of the Application, Service, or Workload +type Criticality struct { + // Type: Required. Criticality Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "MISSION_CRITICAL" - Mission critical service, application or + // workload. + // "HIGH" - High impact. + // "MEDIUM" - Medium impact. + // "LOW" - Low impact. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") 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. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Criticality) MarshalJSON() ([]byte, error) { + type NoMethod Criticality + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DetachServiceProjectAttachmentRequest: Request for +// DetachServiceProjectAttachment. +type DetachServiceProjectAttachmentRequest struct { +} + +// DetachServiceProjectAttachmentResponse: Response for +// DetachServiceProjectAttachment. +type DetachServiceProjectAttachmentResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// DiscoveredService: DiscoveredService is a network/api interface that +// exposes some functionality to clients for consumption over the +// network. A discovered service can be registered to a App Hub service. +type DiscoveredService struct { + // Name: Identifier. The resource name of the discovered service. + // Format: + // "projects/{host-project-id}/locations/{location}/discoveredServices/{u + // uid}"" + Name string `json:"name,omitempty"` + + // ServiceProperties: Output only. Properties of an underlying compute + // resource that can comprise a Service. These are immutable. + ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"` + + // ServiceReference: Output only. Reference to an underlying networking + // resource that can comprise a Service. These are immutable. + ServiceReference *ServiceReference `json:"serviceReference,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DiscoveredService) MarshalJSON() ([]byte, error) { + type NoMethod DiscoveredService + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiscoveredWorkload: DiscoveredWorkload is a binary deployment (such +// as managed instance groups (MIGs) and GKE deployments) that performs +// the smallest logical subset of business functionality. A discovered +// workload can be registered to an App Hub Workload. +type DiscoveredWorkload struct { + // Name: Identifier. The resource name of the discovered workload. + // Format: + // "projects/{host-project-id}/locations/{location}/discoveredWorkloads/{ + // uuid}" + Name string `json:"name,omitempty"` + + // WorkloadProperties: Output only. Properties of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"` + + // WorkloadReference: Output only. Reference of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DiscoveredWorkload) MarshalJSON() ([]byte, error) { + type NoMethod DiscoveredWorkload + 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 @@ -423,6 +772,41 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// Environment: Environment of the Application, Service, or Workload +type Environment struct { + // Type: Required. Environment Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "PRODUCTION" - Production environment. + // "STAGING" - Staging environment. + // "TEST" - Test environment. + // "DEVELOPMENT" - Development environment. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") 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. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Environment) MarshalJSON() ([]byte, error) { + type NoMethod Environment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // 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 @@ -483,21 +867,23 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` +// ListApplicationsResponse: Response for ListApplications. +type ListApplicationsResponse struct { + // Applications: List of Applications. + Applications []*Application `json:"applications,omitempty"` - // NextPageToken: The standard List next-page token. + // NextPageToken: A token identifying a page of results the server + // should return. NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Locations") to + // ForceSendFields is a list of field names (e.g. "Applications") 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 @@ -505,51 +891,169 @@ type ListLocationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Applications") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *ListApplicationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListApplicationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. +// ListDiscoveredServicesResponse: Response for ListDiscoveredServices. +type ListDiscoveredServicesResponse struct { + // DiscoveredServices: List of discovered services. + DiscoveredServices []*DiscoveredService `json:"discoveredServices,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,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 + // ForceSendFields is a list of field names (e.g. "DiscoveredServices") + // 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:"-"` -} + // NullFields is a list of field names (e.g. "DiscoveredServices") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDiscoveredServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDiscoveredServicesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDiscoveredWorkloadsResponse: Response for +// ListDiscoveredWorkloads. +type ListDiscoveredWorkloadsResponse struct { + // DiscoveredWorkloads: List of discovered workloads. + DiscoveredWorkloads []*DiscoveredWorkload `json:"discoveredWorkloads,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DiscoveredWorkloads") + // 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. "DiscoveredWorkloads") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDiscoveredWorkloadsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDiscoveredWorkloadsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { type NoMethod ListOperationsResponse @@ -557,6 +1061,124 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListServiceProjectAttachmentsResponse: Response for +// ListServiceProjectAttachments. +type ListServiceProjectAttachmentsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServiceProjectAttachments: List of service project attachments. + ServiceProjectAttachments []*ServiceProjectAttachment `json:"serviceProjectAttachments,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,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 *ListServiceProjectAttachmentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceProjectAttachmentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListServicesResponse: Response for ListServices. +type ListServicesResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Services: List of Services. + Services []*Service `json:"services,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,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 *ListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServicesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkloadsResponse: Response for ListWorkloads. +type ListWorkloadsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // Workloads: List of Workloads. + Workloads []*Workload `json:"workloads,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 *ListWorkloadsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkloadsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby @@ -607,6 +1229,42 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LookupServiceProjectAttachmentResponse: Response for +// LookupServiceProjectAttachment. +type LookupServiceProjectAttachmentResponse struct { + // ServiceProjectAttachment: Service project attachment for a project if + // exists, empty otherwise. + ServiceProjectAttachment *ServiceProjectAttachment `json:"serviceProjectAttachment,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ServiceProjectAttachment") 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. "ServiceProjectAttachment") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LookupServiceProjectAttachmentResponse) MarshalJSON() ([]byte, error) { + type NoMethod LookupServiceProjectAttachmentResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -669,6 +1327,58 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: An Identity and Access Management (IAM) policy, which // specifies access controls for Google Cloud resources. A `Policy` is a // collection of `bindings`. A `binding` binds one or more `members`, or @@ -822,21 +1532,16 @@ func (s *ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the - // `resource`. The size of the policy is limited to a few 10s of KB. An - // empty policy is a valid policy but certain Google Cloud services - // (such as Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only the fields in the mask will be modified. If no - // mask is provided, the following default mask is used: `paths: - // "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` +// Scope: Scope of an application. +type Scope struct { + // Type: Required. Scope Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "REGIONAL" - Regional type. + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // ForceSendFields is a list of field names (e.g. "Type") 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 @@ -844,7 +1549,7 @@ type SetIamPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API + // NullFields is a list of field names (e.g. "Type") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -853,8 +1558,256 @@ type SetIamPolicyRequest struct { NullFields []string `json:"-"` } -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest +func (s *Scope) MarshalJSON() ([]byte, error) { + type NoMethod Scope + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Service: Service is an App Hub data model that contains a discovered +// service, which represents a network/api interface that exposes some +// functionality to clients for consumption over the network. +type Service struct { + // Attributes: Optional. Consumer provided attributes. + Attributes *Attributes `json:"attributes,omitempty"` + + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-defined description of a Service. Can + // have a maximum length of 2048 characters. + Description string `json:"description,omitempty"` + + // DiscoveredService: Required. Immutable. The resource name of the + // original discovered service. + DiscoveredService string `json:"discoveredService,omitempty"` + + // DisplayName: Optional. User-defined name for the Service. Can have a + // maximum length of 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Identifier. The resource name of a Service. Format: + // "projects/{host-project-id}/locations/{location}/applications/{applica + // tion-id}/services/{service-id}" + Name string `json:"name,omitempty"` + + // ServiceProperties: Output only. Properties of an underlying compute + // resource that can comprise a Service. These are immutable. + ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"` + + // ServiceReference: Output only. Reference to an underlying networking + // resource that can comprise a Service. These are immutable. + ServiceReference *ServiceReference `json:"serviceReference,omitempty"` + + // State: Output only. Service state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The service is being created. + // "ACTIVE" - The service is ready. + // "DELETING" - The service is being deleted. + // "DETACHED" - The underlying networking resources have been deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A universally unique identifier (UUID) for the + // `Service` in the UUID4 format. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Service) MarshalJSON() ([]byte, error) { + type NoMethod Service + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceProjectAttachment: ServiceProjectAttachment represents an +// attachment from a service project to a host project. Service projects +// contain the underlying cloud infrastructure resources, and expose +// these resources to the host project through a +// ServiceProjectAttachment. With the attachments, the host project can +// provide an aggregated view of resources across all service projects. +type ServiceProjectAttachment struct { + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Name: Identifier. The resource name of a ServiceProjectAttachment. + // Format: + // "projects/{host-project-id}/locations/global/serviceProjectAttachments + // /{service-project-id}." + Name string `json:"name,omitempty"` + + // ServiceProject: Required. Immutable. Service project name in the + // format: "projects/abc" or "projects/123". As input, project name with + // either project id or number are accepted. As output, this field will + // contain project number. + ServiceProject string `json:"serviceProject,omitempty"` + + // State: Output only. ServiceProjectAttachment state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The ServiceProjectAttachment is being created. + // "ACTIVE" - The ServiceProjectAttachment is ready. This means + // Services and Workloads under the corresponding + // ServiceProjectAttachment is ready for registration. + // "DELETING" - The ServiceProjectAttachment is being deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A globally unique identifier (in UUID4 format) for + // the `ServiceProjectAttachment`. + Uid string `json:"uid,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 *ServiceProjectAttachment) MarshalJSON() ([]byte, error) { + type NoMethod ServiceProjectAttachment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceProperties: Properties of an underlying cloud resource that +// can comprise a Service. +type ServiceProperties struct { + // GcpProject: Output only. The service project identifier that the + // underlying cloud resource resides in. + GcpProject string `json:"gcpProject,omitempty"` + + // Location: Output only. The location that the underlying resource + // resides in, for example, us-west1. + Location string `json:"location,omitempty"` + + // Zone: Output only. The location that the underlying resource resides + // in if it is zonal, for example, us-west1-a). + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcpProject") 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. "GcpProject") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceProperties) MarshalJSON() ([]byte, error) { + type NoMethod ServiceProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceReference: Reference to an underlying networking resource that +// can comprise a Service. +type ServiceReference struct { + // Uri: Output only. The underlying resource URI (For example, URI of + // Forwarding Rule, URL Map, and Backend Service). + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") 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. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceReference) MarshalJSON() ([]byte, error) { + type NoMethod ServiceReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -880,99 +1833,4379 @@ type Status struct { // in the google.rpc.Status.details field, or localized by the client. Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty 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:"-"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Workload: Workload is an App Hub data model that contains a +// discovered workload, which represents a binary deployment (such as +// managed instance groups (MIGs) and GKE deployments) that performs the +// smallest logical subset of business functionality. +type Workload struct { + // Attributes: Optional. Consumer provided attributes. + Attributes *Attributes `json:"attributes,omitempty"` + + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-defined description of a Workload. Can + // have a maximum length of 2048 characters. + Description string `json:"description,omitempty"` + + // DiscoveredWorkload: Required. Immutable. The resource name of the + // original discovered workload. + DiscoveredWorkload string `json:"discoveredWorkload,omitempty"` + + // DisplayName: Optional. User-defined name for the Workload. Can have a + // maximum length of 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Identifier. The resource name of the Workload. Format: + // "projects/{host-project-id}/locations/{location}/applications/{applica + // tion-id}/workloads/{workload-id}" + Name string `json:"name,omitempty"` + + // State: Output only. Workload state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The Workload is being created. + // "ACTIVE" - The Workload is ready. + // "DELETING" - The Workload is being deleted. + // "DETACHED" - The underlying compute resources have been deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A universally unique identifier (UUID) for the + // `Workload` in the UUID4 format. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time. + UpdateTime string `json:"updateTime,omitempty"` + + // WorkloadProperties: Output only. Properties of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"` + + // WorkloadReference: Output only. Reference of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Workload) MarshalJSON() ([]byte, error) { + type NoMethod Workload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkloadProperties: Properties of an underlying compute resource +// represented by the Workload. +type WorkloadProperties struct { + // GcpProject: Output only. The service project identifier that the + // underlying cloud resource resides in. Empty for non cloud resources. + GcpProject string `json:"gcpProject,omitempty"` + + // Location: Output only. The location that the underlying compute + // resource resides in (e.g us-west1). + Location string `json:"location,omitempty"` + + // Zone: Output only. The location that the underlying compute resource + // resides in if it is zonal (e.g us-west1-a). + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcpProject") 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. "GcpProject") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkloadProperties) MarshalJSON() ([]byte, error) { + type NoMethod WorkloadProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkloadReference: Reference of an underlying compute resource +// represented by the Workload. +type WorkloadReference struct { + // Uri: Output only. The underlying compute resource uri. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") 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. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkloadReference) MarshalJSON() ([]byte, error) { + type NoMethod WorkloadReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "apphub.projects.locations.detachServiceProjectAttachment": + +type ProjectsLocationsDetachServiceProjectAttachmentCall struct { + s *APIService + name string + detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DetachServiceProjectAttachment: Detaches a service project from a +// host project. You can call this API from either a host or service +// project. +// +// - name: Value for name. +func (r *ProjectsLocationsService) DetachServiceProjectAttachment(name string, detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest) *ProjectsLocationsDetachServiceProjectAttachmentCall { + c := &ProjectsLocationsDetachServiceProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.detachserviceprojectattachmentrequest = detachserviceprojectattachmentrequest + 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 *ProjectsLocationsDetachServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDetachServiceProjectAttachmentCall { + 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 *ProjectsLocationsDetachServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsDetachServiceProjectAttachmentCall { + 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 *ProjectsLocationsDetachServiceProjectAttachmentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) 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.detachserviceprojectattachmentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:detachServiceProjectAttachment") + 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 "apphub.projects.locations.detachServiceProjectAttachment" call. +// Exactly one of *DetachServiceProjectAttachmentResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *DetachServiceProjectAttachmentResponse.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 *ProjectsLocationsDetachServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*DetachServiceProjectAttachmentResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &DetachServiceProjectAttachmentResponse{ + 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": "Detaches a service project from a host project. You can call this API from either a host or service project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:detachServiceProjectAttachment", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.detachServiceProjectAttachment", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:detachServiceProjectAttachment", + // "request": { + // "$ref": "DetachServiceProjectAttachmentRequest" + // }, + // "response": { + // "$ref": "DetachServiceProjectAttachmentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) 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/{+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 "apphub.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) 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/{+name}/locations") + 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 "apphub.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListLocationsResponse{ + 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 information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 "apphub.projects.locations.lookupServiceProjectAttachment": + +type ProjectsLocationsLookupServiceProjectAttachmentCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// LookupServiceProjectAttachment: Looks up a service project +// attachment. You can call this API from either a host or service +// project. +// +// - name: Value for name. +func (r *ProjectsLocationsService) LookupServiceProjectAttachment(name string) *ProjectsLocationsLookupServiceProjectAttachmentCall { + c := &ProjectsLocationsLookupServiceProjectAttachmentCall{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 *ProjectsLocationsLookupServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupServiceProjectAttachmentCall { + 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 *ProjectsLocationsLookupServiceProjectAttachmentCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupServiceProjectAttachmentCall { + 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 *ProjectsLocationsLookupServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsLookupServiceProjectAttachmentCall { + 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 *ProjectsLocationsLookupServiceProjectAttachmentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) 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/{+name}:lookupServiceProjectAttachment") + 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 "apphub.projects.locations.lookupServiceProjectAttachment" call. +// Exactly one of *LookupServiceProjectAttachmentResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *LookupServiceProjectAttachmentResponse.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 *ProjectsLocationsLookupServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*LookupServiceProjectAttachmentResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &LookupServiceProjectAttachmentResponse{ + 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": "Looks up a service project attachment. You can call this API from either a host or service project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:lookupServiceProjectAttachment", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.lookupServiceProjectAttachment", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:lookupServiceProjectAttachment", + // "response": { + // "$ref": "LookupServiceProjectAttachmentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.create": + +type ProjectsLocationsApplicationsCreateCall struct { + s *APIService + parent string + application *Application + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Application in a host project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsService) Create(parent string, application *Application) *ProjectsLocationsApplicationsCreateCall { + c := &ProjectsLocationsApplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.application = application + return c +} + +// ApplicationId sets the optional parameter "applicationId": Required. +// The Application identifier. Must contain only lowercase letters, +// numbers or hyphens, with the first character a letter, the last a +// letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsApplicationsCreateCall { + c.urlParams_.Set("applicationId", applicationId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsCreateCall { + 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 *ProjectsLocationsApplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsCreateCall { + 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 *ProjectsLocationsApplicationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsCreateCall) 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.application) + 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}/applications") + 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 "apphub.projects.locations.applications.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsCreateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "applicationId": { + // "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/applications", + // "request": { + // "$ref": "Application" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.delete": + +type ProjectsLocationsApplicationsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an Application in a host project and location. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsService) Delete(name string) *ProjectsLocationsApplicationsDeleteCall { + c := &ProjectsLocationsApplicationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsDeleteCall { + 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 *ProjectsLocationsApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsDeleteCall { + 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 *ProjectsLocationsApplicationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsDeleteCall) 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsDeleteCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + // "httpMethod": "DELETE", + // "id": "apphub.projects.locations.applications.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.get": + +type ProjectsLocationsApplicationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an Application in a host project and location. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsService) Get(name string) *ProjectsLocationsApplicationsGetCall { + c := &ProjectsLocationsApplicationsGetCall{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 *ProjectsLocationsApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetCall { + 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 *ProjectsLocationsApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetCall { + 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 *ProjectsLocationsApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetCall { + 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 *ProjectsLocationsApplicationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsGetCall) 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/{+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 "apphub.projects.locations.applications.get" call. +// Exactly one of *Application or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Application.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 *ProjectsLocationsApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Application{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Application" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.getIamPolicy": + +type ProjectsLocationsApplicationsGetIamPolicyCall struct { + s *APIService + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall { + c := &ProjectsLocationsApplicationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall { + 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 *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall { + 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 *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall { + 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 *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) 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/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.list": + +type ProjectsLocationsApplicationsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Applications in a host project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsService) List(parent string) *ProjectsLocationsApplicationsListCall { + c := &ProjectsLocationsApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsApplicationsListCall) Filter(filter string) *ProjectsLocationsApplicationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsListCall { + 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 *ProjectsLocationsApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsListCall { + 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 *ProjectsLocationsApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsListCall { + 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 *ProjectsLocationsApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsListCall { + 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 *ProjectsLocationsApplicationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsListCall) 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}/applications") + 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 "apphub.projects.locations.applications.list" call. +// Exactly one of *ListApplicationsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListApplicationsResponse.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 *ProjectsLocationsApplicationsListCall) Do(opts ...googleapi.CallOption) (*ListApplicationsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListApplicationsResponse{ + 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 Applications in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/applications", + // "response": { + // "$ref": "ListApplicationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsApplicationsListCall) Pages(ctx context.Context, f func(*ListApplicationsResponse) 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 "apphub.projects.locations.applications.patch": + +type ProjectsLocationsApplicationsPatchCall struct { + s *APIService + name string + application *Application + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an Application in a host project and location. +// +// - name: Identifier. The resource name of an Application. Format: +// "projects/{host-project-id}/locations/{location}/applications/{appli +// cation-id}". +func (r *ProjectsLocationsApplicationsService) Patch(name string, application *Application) *ProjectsLocationsApplicationsPatchCall { + c := &ProjectsLocationsApplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.application = application + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// Application resource by the update. The fields specified in the +// update_mask are relative to the resource, not the full request. The +// API changes the values of the fields as specified in the update_mask. +// The API ignores the values of all fields not covered by the +// update_mask. You can also unset a field by not specifying it in the +// updated message, but adding the field to the mask. This clears +// whatever value the field previously had. +func (c *ProjectsLocationsApplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsPatchCall { + 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 *ProjectsLocationsApplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsPatchCall { + 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 *ProjectsLocationsApplicationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsPatchCall) 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.application) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsPatchCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + // "httpMethod": "PATCH", + // "id": "apphub.projects.locations.applications.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. The resource name of an Application. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the Application resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Application" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.setIamPolicy": + +type ProjectsLocationsApplicationsSetIamPolicyCall struct { + s *APIService + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall { + c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall { + 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 *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall { + 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 *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) 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.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.testIamPermissions": + +type ProjectsLocationsApplicationsTestIamPermissionsCall struct { + s *APIService + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall { + c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall { + 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 *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall { + 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 *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) 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.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.create": + +type ProjectsLocationsApplicationsServicesCreateCall struct { + s *APIService + parent string + service *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Service in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsServicesService) Create(parent string, service *Service) *ProjectsLocationsApplicationsServicesCreateCall { + c := &ProjectsLocationsApplicationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.service = service + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The +// Service identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. +func (c *ProjectsLocationsApplicationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsApplicationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + 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 *ProjectsLocationsApplicationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesCreateCall { + 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 *ProjectsLocationsApplicationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesCreateCall { + 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 *ProjectsLocationsApplicationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesCreateCall) 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.service) + 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}/services") + 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 "apphub.projects.locations.applications.services.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesCreateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.services.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "serviceId": { + // "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/services", + // "request": { + // "$ref": "Service" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.delete": + +type ProjectsLocationsApplicationsServicesDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Service in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsServicesService) Delete(name string) *ProjectsLocationsApplicationsServicesDeleteCall { + c := &ProjectsLocationsApplicationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesDeleteCall { + 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 *ProjectsLocationsApplicationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesDeleteCall { + 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 *ProjectsLocationsApplicationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesDeleteCall) 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.services.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + // "httpMethod": "DELETE", + // "id": "apphub.projects.locations.applications.services.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.get": + +type ProjectsLocationsApplicationsServicesGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Service in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsServicesService) Get(name string) *ProjectsLocationsApplicationsServicesGetCall { + c := &ProjectsLocationsApplicationsServicesGetCall{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 *ProjectsLocationsApplicationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesGetCall { + 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 *ProjectsLocationsApplicationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesGetCall { + 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 *ProjectsLocationsApplicationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesGetCall { + 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 *ProjectsLocationsApplicationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesGetCall) 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/{+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 "apphub.projects.locations.applications.services.get" call. +// Exactly one of *Service or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Service.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 *ProjectsLocationsApplicationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Service{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.services.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Service" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.list": + +type ProjectsLocationsApplicationsServicesListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List Services in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsServicesService) List(parent string) *ProjectsLocationsApplicationsServicesListCall { + c := &ProjectsLocationsApplicationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsApplicationsServicesListCall) Filter(filter string) *ProjectsLocationsApplicationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsApplicationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsApplicationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsApplicationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsServicesListCall { + 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 *ProjectsLocationsApplicationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesListCall { + 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 *ProjectsLocationsApplicationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesListCall { + 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 *ProjectsLocationsApplicationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesListCall { + 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 *ProjectsLocationsApplicationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesListCall) 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}/services") + 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 "apphub.projects.locations.applications.services.list" call. +// Exactly one of *ListServicesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListServicesResponse.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 *ProjectsLocationsApplicationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListServicesResponse{ + 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 Services in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.services.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/services", + // "response": { + // "$ref": "ListServicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsApplicationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) 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 "apphub.projects.locations.applications.services.patch": + +type ProjectsLocationsApplicationsServicesPatchCall struct { + s *APIService + name string + service *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Service in an Application. +// +// - name: Identifier. The resource name of a Service. Format: +// "projects/{host-project-id}/locations/{location}/applications/{appli +// cation-id}/services/{service-id}". +func (r *ProjectsLocationsApplicationsServicesService) Patch(name string, service *Service) *ProjectsLocationsApplicationsServicesPatchCall { + c := &ProjectsLocationsApplicationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.service = service + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the Service +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. The API changes the +// values of the fields as specified in the update_mask. The API ignores +// the values of all fields not covered by the update_mask. You can also +// unset a field by not specifying it in the updated message, but adding +// the field to the mask. This clears whatever value the field +// previously had. +func (c *ProjectsLocationsApplicationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesPatchCall { + 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 *ProjectsLocationsApplicationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesPatchCall { + 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 *ProjectsLocationsApplicationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesPatchCall) 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.service) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.services.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesPatchCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + // "httpMethod": "PATCH", + // "id": "apphub.projects.locations.applications.services.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. The resource name of a Service. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Service" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.create": + +type ProjectsLocationsApplicationsWorkloadsCreateCall struct { + s *APIService + parent string + workload *Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Workload in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsWorkloadsService) Create(parent string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c := &ProjectsLocationsApplicationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workload = workload + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// WorkloadId sets the optional parameter "workloadId": Required. The +// Workload identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) WorkloadId(workloadId string) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c.urlParams_.Set("workloadId", workloadId) + 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 *ProjectsLocationsApplicationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsCreateCall { + 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 *ProjectsLocationsApplicationsWorkloadsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsCreateCall { + 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 *ProjectsLocationsApplicationsWorkloadsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) 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.workload) + 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}/workloads") + 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 "apphub.projects.locations.applications.workloads.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.workloads.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "workloadId": { + // "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workloads", + // "request": { + // "$ref": "Workload" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.delete": + +type ProjectsLocationsApplicationsWorkloadsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Workload in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsWorkloadsService) Delete(name string) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + c := &ProjectsLocationsApplicationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + 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 *ProjectsLocationsApplicationsWorkloadsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + 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 *ProjectsLocationsApplicationsWorkloadsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.workloads.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + // "httpMethod": "DELETE", + // "id": "apphub.projects.locations.applications.workloads.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.get": + +type ProjectsLocationsApplicationsWorkloadsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Workload in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsWorkloadsService) Get(name string) *ProjectsLocationsApplicationsWorkloadsGetCall { + c := &ProjectsLocationsApplicationsWorkloadsGetCall{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 *ProjectsLocationsApplicationsWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsGetCall { + 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 *ProjectsLocationsApplicationsWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsGetCall { + 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 *ProjectsLocationsApplicationsWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsGetCall { + 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 *ProjectsLocationsApplicationsWorkloadsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsGetCall) 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/{+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 "apphub.projects.locations.applications.workloads.get" call. +// Exactly one of *Workload or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Workload.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 *ProjectsLocationsApplicationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*Workload, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Workload{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.workloads.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Workload" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.list": + +type ProjectsLocationsApplicationsWorkloadsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Workloads in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsWorkloadsService) List(parent string) *ProjectsLocationsApplicationsWorkloadsListCall { + c := &ProjectsLocationsApplicationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Filter(filter string) *ProjectsLocationsApplicationsWorkloadsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsApplicationsWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsWorkloadsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsWorkloadsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsWorkloadsListCall { + 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 *ProjectsLocationsApplicationsWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsListCall { + 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 *ProjectsLocationsApplicationsWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsListCall { + 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 *ProjectsLocationsApplicationsWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsListCall { + 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 *ProjectsLocationsApplicationsWorkloadsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsListCall) 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}/workloads") + 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 "apphub.projects.locations.applications.workloads.list" call. +// Exactly one of *ListWorkloadsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListWorkloadsResponse.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 *ProjectsLocationsApplicationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadsResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListWorkloadsResponse{ + 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 Workloads in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.workloads.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workloads", + // "response": { + // "$ref": "ListWorkloadsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Pages(ctx context.Context, f func(*ListWorkloadsResponse) 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 "apphub.projects.locations.applications.workloads.patch": + +type ProjectsLocationsApplicationsWorkloadsPatchCall struct { + s *APIService + name string + workload *Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Workload in an Application. +// +// - name: Identifier. The resource name of the Workload. Format: +// "projects/{host-project-id}/locations/{location}/applications/{appli +// cation-id}/workloads/{workload-id}". +func (r *ProjectsLocationsApplicationsWorkloadsService) Patch(name string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c := &ProjectsLocationsApplicationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workload = workload + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the Workload +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. The API changes the +// values of the fields as specified in the update_mask. The API ignores +// the values of all fields not covered by the update_mask. You can also +// unset a field by not specifying it in the updated message, but adding +// the field to the mask. This clears whatever value the field +// previously had. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsPatchCall { + 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 *ProjectsLocationsApplicationsWorkloadsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsPatchCall { + 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 *ProjectsLocationsApplicationsWorkloadsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) 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.workload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.workloads.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + // "httpMethod": "PATCH", + // "id": "apphub.projects.locations.applications.workloads.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. The resource name of the Workload. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the Workload resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Workload" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.discoveredServices.get": + +type ProjectsLocationsDiscoveredServicesGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a discovered service in a host project and location. +// +// - name: Value for name. +func (r *ProjectsLocationsDiscoveredServicesService) Get(name string) *ProjectsLocationsDiscoveredServicesGetCall { + c := &ProjectsLocationsDiscoveredServicesGetCall{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 *ProjectsLocationsDiscoveredServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesGetCall { + 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 *ProjectsLocationsDiscoveredServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesGetCall { + 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 *ProjectsLocationsDiscoveredServicesGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesGetCall { + 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 *ProjectsLocationsDiscoveredServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDiscoveredServicesGetCall) 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/{+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 "apphub.projects.locations.discoveredServices.get" call. +// Exactly one of *DiscoveredService or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DiscoveredService.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 *ProjectsLocationsDiscoveredServicesGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredService, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &DiscoveredService{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a discovered service in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices/{discoveredServicesId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.discoveredServices.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DiscoveredService" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.discoveredServices.list": + +type ProjectsLocationsDiscoveredServicesListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists discovered services that can be added to an application +// in a host project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsDiscoveredServicesService) List(parent string) *ProjectsLocationsDiscoveredServicesListCall { + c := &ProjectsLocationsDiscoveredServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsDiscoveredServicesListCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsDiscoveredServicesListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsDiscoveredServicesListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsDiscoveredServicesListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} - // ForceSendFields is a list of field names (e.g. "Permissions") 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:"-"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDiscoveredServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// 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 *ProjectsLocationsDiscoveredServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesListCall { + c.ifNoneMatch_ = entityTag + return c } -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDiscoveredServicesListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesListCall { + c.ctx_ = ctx + return c } -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDiscoveredServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +func (c *ProjectsLocationsDiscoveredServicesListCall) 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}/discoveredServices") + 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) +} - // ForceSendFields is a list of field names (e.g. "Permissions") 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:"-"` +// Do executes the "apphub.projects.locations.discoveredServices.list" call. +// Exactly one of *ListDiscoveredServicesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDiscoveredServicesResponse.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 *ProjectsLocationsDiscoveredServicesListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredServicesResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &ListDiscoveredServicesResponse{ + 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 discovered services that can be added to an application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.discoveredServices.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/discoveredServices", + // "response": { + // "$ref": "ListDiscoveredServicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` } -func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *ProjectsLocationsDiscoveredServicesListCall) Pages(ctx context.Context, f func(*ListDiscoveredServicesResponse) 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 "apphub.projects.locations.get": +// method id "apphub.projects.locations.discoveredWorkloads.get": -type ProjectsLocationsGetCall struct { - s *Service +type ProjectsLocationsDiscoveredWorkloadsGetCall struct { + s *APIService name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -980,11 +6213,11 @@ type ProjectsLocationsGetCall struct { header_ http.Header } -// Get: Gets information about a location. +// Get: Gets a discovered workload in a host project and location. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Value for name. +func (r *ProjectsLocationsDiscoveredWorkloadsService) Get(name string) *ProjectsLocationsDiscoveredWorkloadsGetCall { + c := &ProjectsLocationsDiscoveredWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -992,7 +6225,7 @@ func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1002,7 +6235,7 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1010,21 +6243,21 @@ func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocati // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsGetCall { 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 *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) 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_ { @@ -1050,14 +6283,14 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +// Do executes the "apphub.projects.locations.discoveredWorkloads.get" call. +// Exactly one of *DiscoveredWorkload or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DiscoveredWorkload.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 *ProjectsLocationsDiscoveredWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredWorkload, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1076,7 +6309,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &DiscoveredWorkload{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1088,25 +6321,25 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "description": "Gets a discovered workload in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads/{discoveredWorkloadsId}", // "httpMethod": "GET", - // "id": "apphub.projects.locations.get", + // "id": "apphub.projects.locations.discoveredWorkloads.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Resource name for the location.", + // "description": "Required. Value for name.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Location" + // "$ref": "DiscoveredWorkload" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1115,48 +6348,51 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "apphub.projects.locations.list": +// method id "apphub.projects.locations.discoveredWorkloads.list": -type ProjectsLocationsListCall struct { - s *Service - name string +type ProjectsLocationsDiscoveredWorkloadsListCall struct { + s *APIService + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// List: Lists discovered workloads that can be added to an application +// in a host project and location. // -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Value for parent. +func (r *ProjectsLocationsDiscoveredWorkloadsService) List(parent string) *ProjectsLocationsDiscoveredWorkloadsListCall { + c := &ProjectsLocationsDiscoveredWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1164,7 +6400,7 @@ func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1174,7 +6410,7 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1182,21 +6418,21 @@ func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsListCall { 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 *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) 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_ { @@ -1209,7 +6445,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/discoveredWorkloads") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1217,19 +6453,19 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.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 +// Do executes the "apphub.projects.locations.discoveredWorkloads.list" call. +// Exactly one of *ListDiscoveredWorkloadsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDiscoveredWorkloadsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredWorkloadsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1248,7 +6484,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &ListDiscoveredWorkloadsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1260,41 +6496,46 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", + // "description": "Lists discovered workloads that can be added to an application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", // "httpMethod": "GET", - // "id": "apphub.projects.locations.list", + // "id": "apphub.projects.locations.discoveredWorkloads.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "description": "Optional. Filtering results", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "description": "Optional. A token identifying a page of results the server should return.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/locations", + // "path": "v1/{+parent}/discoveredWorkloads", // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "ListDiscoveredWorkloadsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1306,7 +6547,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat // 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Pages(ctx context.Context, f func(*ListDiscoveredWorkloadsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -1324,118 +6565,235 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -// method id "apphub.projects.locations.applications.getIamPolicy": +// method id "apphub.projects.locations.operations.cancel": -type ProjectsLocationsApplicationsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *APIService + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall { - c := &ProjectsLocationsApplicationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest 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 *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 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 *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) 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.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.operations.cancel" 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 *ProjectsLocationsOperationsCancelCall) 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, gensupport.WrapError(&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, gensupport.WrapError(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": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { 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 *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) 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/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.applications.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "apphub.projects.locations.operations.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 -// *Policy.ServerResponse.Header or (if a response was returned at all) +// *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 *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1454,7 +6812,7 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1466,31 +6824,25 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "apphub.projects.locations.applications.getIamPolicy", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "apphub.projects.locations.operations.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1499,93 +6851,97 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "apphub.projects.locations.applications.setIamPolicy": +// method id "apphub.projects.locations.operations.get": -type ProjectsLocationsApplicationsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall { - c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 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 *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) 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.setiampolicyrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.applications.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "apphub.projects.locations.operations.get" 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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1604,7 +6960,7 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1616,28 +6972,25 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "apphub.projects.locations.applications.setIamPolicy", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.operations.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1646,96 +6999,118 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "apphub.projects.locations.applications.testIamPermissions": +// method id "apphub.projects.locations.operations.list": -type ProjectsLocationsApplicationsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall { - c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 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 *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsListCall) 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.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.applications.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apphub.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1754,7 +7129,7 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1766,28 +7141,41 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "apphub.projects.locations.applications.testIamPermissions", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.operations.list", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}/operations", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1796,40 +7184,80 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea } -// method id "apphub.projects.locations.operations.cancel": +// 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + 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) + } +} -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apphub.projects.locations.serviceProjectAttachments.create": + +type ProjectsLocationsServiceProjectAttachmentsCreateCall struct { + s *APIService + parent string + serviceprojectattachment *ServiceProjectAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Create: Attaches a service project to the host project. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: Value for parent. +func (r *ProjectsLocationsServiceProjectAttachmentsService) Create(parent string, serviceprojectattachment *ServiceProjectAttachment) *ProjectsLocationsServiceProjectAttachmentsCreateCall { + c := &ProjectsLocationsServiceProjectAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.serviceprojectattachment = serviceprojectattachment + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceProjectAttachmentId sets the optional parameter +// "serviceProjectAttachmentId": Required. The service project +// attachment identifier must contain the project_id of the service +// project specified in the service_project_attachment.service_project +// field. Hint: "projects/{project_id}" +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) ServiceProjectAttachmentId(serviceProjectAttachmentId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall { + c.urlParams_.Set("serviceProjectAttachmentId", serviceProjectAttachmentId) 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1837,21 +7265,21 @@ func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsCreateCall { 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) 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_ { @@ -1859,14 +7287,14 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceprojectattachment) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceProjectAttachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -1874,19 +7302,19 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.cancel" 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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "apphub.projects.locations.serviceProjectAttachments.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1905,7 +7333,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1917,28 +7345,38 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "description": "Attaches a service project to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", // "httpMethod": "POST", - // "id": "apphub.projects.locations.operations.cancel", + // "id": "apphub.projects.locations.serviceProjectAttachments.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "parent": { + // "description": "Required. Value for parent.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "serviceProjectAttachmentId": { + // "description": "Required. The service project attachment identifier must contain the project_id of the service project specified in the service_project_attachment.service_project field. Hint: \"projects/{project_id}\"", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", + // "path": "v1/{+parent}/serviceProjectAttachments", // "request": { - // "$ref": "CancelOperationRequest" + // "$ref": "ServiceProjectAttachment" // }, // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1947,32 +7385,47 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "apphub.projects.locations.operations.delete": +// method id "apphub.projects.locations.serviceProjectAttachments.delete": -type ProjectsLocationsOperationsDeleteCall struct { - s *Service +type ProjectsLocationsServiceProjectAttachmentsDeleteCall struct { + s *APIService name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Delete: Deletes a service project attached to the host project. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Value for name. +func (r *ProjectsLocationsServiceProjectAttachmentsService) Delete(name string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { + c := &ProjectsLocationsServiceProjectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1980,21 +7433,21 @@ func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { 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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) 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_ { @@ -2017,14 +7470,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "apphub.projects.locations.serviceProjectAttachments.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2043,7 +7496,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2055,25 +7508,30 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Deletes a service project attached to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", // "httpMethod": "DELETE", - // "id": "apphub.projects.locations.operations.delete", + // "id": "apphub.projects.locations.serviceProjectAttachments.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. Value for name.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2082,10 +7540,10 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "apphub.projects.locations.operations.get": +// method id "apphub.projects.locations.serviceProjectAttachments.get": -type ProjectsLocationsOperationsGetCall struct { - s *Service +type ProjectsLocationsServiceProjectAttachmentsGetCall struct { + s *APIService name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -2093,13 +7551,11 @@ type ProjectsLocationsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a service project attached to the host project. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Value for name. +func (r *ProjectsLocationsServiceProjectAttachmentsService) Get(name string) *ProjectsLocationsServiceProjectAttachmentsGetCall { + c := &ProjectsLocationsServiceProjectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2107,7 +7563,7 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2117,7 +7573,7 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2125,21 +7581,21 @@ func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsGetCall { 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) 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_ { @@ -2165,14 +7621,14 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.get" 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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "apphub.projects.locations.serviceProjectAttachments.get" call. +// Exactly one of *ServiceProjectAttachment or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ServiceProjectAttachment.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 *ProjectsLocationsServiceProjectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*ServiceProjectAttachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2191,7 +7647,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ServiceProjectAttachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2203,25 +7659,25 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Gets a service project attached to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", // "httpMethod": "GET", - // "id": "apphub.projects.locations.operations.get", + // "id": "apphub.projects.locations.serviceProjectAttachments.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Value for name.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "ServiceProjectAttachment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2230,45 +7686,50 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "apphub.projects.locations.operations.list": +// method id "apphub.projects.locations.serviceProjectAttachments.list": -type ProjectsLocationsOperationsListCall struct { - s *Service - name string +type ProjectsLocationsServiceProjectAttachmentsListCall struct { + s *APIService + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: List service projects attached to the host project. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Value for parent. +func (r *ProjectsLocationsServiceProjectAttachmentsService) List(parent string) *ProjectsLocationsServiceProjectAttachmentsListCall { + c := &ProjectsLocationsServiceProjectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Filter(filter string) *ProjectsLocationsServiceProjectAttachmentsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) OrderBy(orderBy string) *ProjectsLocationsServiceProjectAttachmentsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceProjectAttachmentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) PageToken(pageToken string) *ProjectsLocationsServiceProjectAttachmentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2276,7 +7737,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2286,7 +7747,7 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2294,21 +7755,21 @@ func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsListCall { 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 *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) 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_ { @@ -2321,7 +7782,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceProjectAttachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2329,19 +7790,20 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apphub.projects.locations.serviceProjectAttachments.list" call. +// Exactly one of *ListServiceProjectAttachmentsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListServiceProjectAttachmentsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListServiceProjectAttachmentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2360,7 +7822,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &ListServiceProjectAttachmentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2372,41 +7834,46 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "description": "List service projects attached to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", // "httpMethod": "GET", - // "id": "apphub.projects.locations.operations.list", + // "id": "apphub.projects.locations.serviceProjectAttachments.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "Optional. Filtering results", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "Optional. A token identifying a page of results the server should return.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+parent}/serviceProjectAttachments", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "ListServiceProjectAttachmentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2418,7 +7885,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Pages(ctx context.Context, f func(*ListServiceProjectAttachmentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/apphub/v1alpha/apphub-api.json b/apphub/v1alpha/apphub-api.json index 54d8ab7d81c..d1d3f3ff4b2 100644 --- a/apphub/v1alpha/apphub-api.json +++ b/apphub/v1alpha/apphub-api.json @@ -242,7 +242,7 @@ ], "parameters": { "applicationId": { - "description": "Required. The Application identifier.", + "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", "location": "query", "type": "string" }, @@ -523,7 +523,7 @@ "type": "string" }, "serviceId": { - "description": "Required. The Service identifier.", + "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", "location": "query", "type": "string" } @@ -705,7 +705,7 @@ "type": "string" }, "workloadId": { - "description": "Required. The Workload identifier.", + "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", "location": "query", "type": "string" } @@ -939,7 +939,7 @@ ] }, "list": { - "description": "Lists discovered services in a host project and location.", + "description": "Lists discovered services that can be added to an application in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices", "httpMethod": "GET", "id": "apphub.projects.locations.discoveredServices.list", @@ -1060,7 +1060,7 @@ ] }, "list": { - "description": "Lists discovered workloads in a host project and location.", + "description": "Lists discovered workloads that can be added to an application in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", "httpMethod": "GET", "id": "apphub.projects.locations.discoveredWorkloads.list", @@ -1378,7 +1378,7 @@ } } }, - "revision": "20240211", + "revision": "20240217", "rootUrl": "https://apphub.googleapis.com/", "schemas": { "Application": { @@ -1396,11 +1396,11 @@ "type": "string" }, "description": { - "description": "Optional. User-defined description of an Application.", + "description": "Optional. User-defined description of an Application. Can have a maximum length of 2048 characters.", "type": "string" }, "displayName": { - "description": "Optional. User-defined name for the Application.", + "description": "Optional. User-defined name for the Application. Can have a maximum length of 63 characters.", "type": "string" }, "name": { @@ -1574,7 +1574,7 @@ "description": "Optional. Communication channel of the contacts." }, "displayName": { - "description": "Optional. Contact's name.", + "description": "Optional. Contact's name. Can have a maximum length of 63 characters.", "type": "string" }, "email": { @@ -1589,12 +1589,30 @@ "id": "Criticality", "properties": { "level": { - "description": "Required. Criticality level.", + "description": "Optional. Criticality level. Can contain only lowercase letters, numeric characters, underscores, and dashes. Can have a maximum length of 63 characters.", "type": "string" }, "missionCritical": { - "description": "Required. Indicates mission-critical Application, Service, or Workload.", + "description": "Optional. Indicates mission-critical Application, Service, or Workload.", "type": "boolean" + }, + "type": { + "description": "Required. Criticality Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "MISSION_CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "Unspecified type.", + "Mission critical service, application or workload.", + "High impact.", + "Medium impact.", + "Low impact." + ], + "type": "string" } }, "type": "object" @@ -1664,7 +1682,25 @@ "id": "Environment", "properties": { "environment": { - "description": "Required. Environment name.", + "description": "Optional. Environment name. Can contain only lowercase letters, numeric characters, underscores, and dashes. Can have a maximum length of 63 characters.", + "type": "string" + }, + "type": { + "description": "Required. Environment Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "PRODUCTION", + "STAGING", + "TEST", + "DEVELOPMENT" + ], + "enumDescriptions": [ + "Unspecified type.", + "Production environment.", + "Staging environment.", + "Test environment.", + "Development environment." + ], "type": "string" } }, @@ -2118,7 +2154,7 @@ "type": "string" }, "description": { - "description": "Optional. User-defined description of a Service.", + "description": "Optional. User-defined description of a Service. Can have a maximum length of 2048 characters.", "type": "string" }, "discoveredService": { @@ -2126,7 +2162,7 @@ "type": "string" }, "displayName": { - "description": "Optional. User-defined name for the Service.", + "description": "Optional. User-defined name for the Service. Can have a maximum length of 63 characters.", "type": "string" }, "name": { @@ -2344,7 +2380,7 @@ "type": "string" }, "description": { - "description": "Optional. User-defined description of a Workload.", + "description": "Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters.", "type": "string" }, "discoveredWorkload": { @@ -2352,7 +2388,7 @@ "type": "string" }, "displayName": { - "description": "Optional. User-defined name for the Workload.", + "description": "Optional. User-defined name for the Workload. Can have a maximum length of 63 characters.", "type": "string" }, "name": { diff --git a/apphub/v1alpha/apphub-gen.go b/apphub/v1alpha/apphub-gen.go index 427fc717a70..630658f8536 100644 --- a/apphub/v1alpha/apphub-gen.go +++ b/apphub/v1alpha/apphub-gen.go @@ -272,9 +272,11 @@ type Application struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. User-defined description of an Application. + // Can have a maximum length of 2048 characters. Description string `json:"description,omitempty"` - // DisplayName: Optional. User-defined name for the Application. + // DisplayName: Optional. User-defined name for the Application. Can + // have a maximum length of 63 characters. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The resource name of an Application. Format: @@ -621,7 +623,8 @@ type ContactInfo struct { // Channel: Optional. Communication channel of the contacts. Channel *Channel `json:"channel,omitempty"` - // DisplayName: Optional. Contact's name. + // DisplayName: Optional. Contact's name. Can have a maximum length of + // 63 characters. DisplayName string `json:"displayName,omitempty"` // Email: Required. Email address of the contacts. @@ -652,13 +655,26 @@ func (s *ContactInfo) MarshalJSON() ([]byte, error) { // Criticality: Criticality of the Application, Service, or Workload type Criticality struct { - // Level: Required. Criticality level. + // Level: Optional. Criticality level. Can contain only lowercase + // letters, numeric characters, underscores, and dashes. Can have a + // maximum length of 63 characters. Level string `json:"level,omitempty"` - // MissionCritical: Required. Indicates mission-critical Application, + // MissionCritical: Optional. Indicates mission-critical Application, // Service, or Workload. MissionCritical bool `json:"missionCritical,omitempty"` + // Type: Required. Criticality Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "MISSION_CRITICAL" - Mission critical service, application or + // workload. + // "HIGH" - High impact. + // "MEDIUM" - Medium impact. + // "LOW" - Low impact. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Level") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -799,9 +815,21 @@ type Empty struct { // Environment: Environment of the Application, Service, or Workload type Environment struct { - // Environment: Required. Environment name. + // Environment: Optional. Environment name. Can contain only lowercase + // letters, numeric characters, underscores, and dashes. Can have a + // maximum length of 63 characters. Environment string `json:"environment,omitempty"` + // Type: Required. Environment Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "PRODUCTION" - Production environment. + // "STAGING" - Staging environment. + // "TEST" - Test environment. + // "DEVELOPMENT" - Development environment. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Environment") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1631,14 +1659,16 @@ type Service struct { // CreateTime: Output only. Create time. CreateTime string `json:"createTime,omitempty"` - // Description: Optional. User-defined description of a Service. + // Description: Optional. User-defined description of a Service. Can + // have a maximum length of 2048 characters. Description string `json:"description,omitempty"` // DiscoveredService: Required. Immutable. The resource name of the // original discovered service. DiscoveredService string `json:"discoveredService,omitempty"` - // DisplayName: Optional. User-defined name for the Service. + // DisplayName: Optional. User-defined name for the Service. Can have a + // maximum length of 63 characters. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The resource name of a Service. Format: @@ -1993,14 +2023,16 @@ type Workload struct { // CreateTime: Output only. Create time. CreateTime string `json:"createTime,omitempty"` - // Description: Optional. User-defined description of a Workload. + // Description: Optional. User-defined description of a Workload. Can + // have a maximum length of 2048 characters. Description string `json:"description,omitempty"` // DiscoveredWorkload: Required. Immutable. The resource name of the // original discovered workload. DiscoveredWorkload string `json:"discoveredWorkload,omitempty"` - // DisplayName: Optional. User-defined name for the Workload. + // DisplayName: Optional. User-defined name for the Workload. Can have a + // maximum length of 63 characters. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The resource name of the Workload. Format: @@ -2798,7 +2830,9 @@ func (r *ProjectsLocationsApplicationsService) Create(parent string, application } // ApplicationId sets the optional parameter "applicationId": Required. -// The Application identifier. +// The Application identifier. Must contain only lowercase letters, +// numbers or hyphens, with the first character a letter, the last a +// letter or a number, and a 63 character maximum. func (c *ProjectsLocationsApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsApplicationsCreateCall { c.urlParams_.Set("applicationId", applicationId) return c @@ -2922,7 +2956,7 @@ func (c *ProjectsLocationsApplicationsCreateCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "applicationId": { - // "description": "Required. The Application identifier.", + // "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", // "location": "query", // "type": "string" // }, @@ -4169,7 +4203,9 @@ func (c *ProjectsLocationsApplicationsServicesCreateCall) RequestId(requestId st } // ServiceId sets the optional parameter "serviceId": Required. The -// Service identifier. +// Service identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. func (c *ProjectsLocationsApplicationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsApplicationsServicesCreateCall { c.urlParams_.Set("serviceId", serviceId) return c @@ -4287,7 +4323,7 @@ func (c *ProjectsLocationsApplicationsServicesCreateCall) Do(opts ...googleapi.C // "type": "string" // }, // "serviceId": { - // "description": "Required. The Service identifier.", + // "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", // "location": "query", // "type": "string" // } @@ -5050,7 +5086,9 @@ func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) RequestId(requestId s } // WorkloadId sets the optional parameter "workloadId": Required. The -// Workload identifier. +// Workload identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) WorkloadId(workloadId string) *ProjectsLocationsApplicationsWorkloadsCreateCall { c.urlParams_.Set("workloadId", workloadId) return c @@ -5168,7 +5206,7 @@ func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Do(opts ...googleapi. // "type": "string" // }, // "workloadId": { - // "description": "Required. The Workload identifier.", + // "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", // "location": "query", // "type": "string" // } @@ -6265,7 +6303,8 @@ type ProjectsLocationsDiscoveredServicesListCall struct { header_ http.Header } -// List: Lists discovered services in a host project and location. +// List: Lists discovered services that can be added to an application +// in a host project and location. // // - parent: Value for parent. func (r *ProjectsLocationsDiscoveredServicesService) List(parent string) *ProjectsLocationsDiscoveredServicesListCall { @@ -6401,7 +6440,7 @@ func (c *ProjectsLocationsDiscoveredServicesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists discovered services in a host project and location.", + // "description": "Lists discovered services that can be added to an application in a host project and location.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices", // "httpMethod": "GET", // "id": "apphub.projects.locations.discoveredServices.list", @@ -6845,7 +6884,8 @@ type ProjectsLocationsDiscoveredWorkloadsListCall struct { header_ http.Header } -// List: Lists discovered workloads in a host project and location. +// List: Lists discovered workloads that can be added to an application +// in a host project and location. // // - parent: Value for parent. func (r *ProjectsLocationsDiscoveredWorkloadsService) List(parent string) *ProjectsLocationsDiscoveredWorkloadsListCall { @@ -6981,7 +7021,7 @@ func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists discovered workloads in a host project and location.", + // "description": "Lists discovered workloads that can be added to an application in a host project and location.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", // "httpMethod": "GET", // "id": "apphub.projects.locations.discoveredWorkloads.list", diff --git a/bigqueryreservation/v1/bigqueryreservation-api.json b/bigqueryreservation/v1/bigqueryreservation-api.json index 8eed5b840b3..dcee28a13ab 100644 --- a/bigqueryreservation/v1/bigqueryreservation-api.json +++ b/bigqueryreservation/v1/bigqueryreservation-api.json @@ -23,6 +23,26 @@ "description": "Regional Endpoint", "endpointUrl": "https://bigqueryreservation.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-west1.rep.googleapis.com/", + "location": "us-west1" } ], "fullyEncodeReservedExpansion": true, @@ -831,7 +851,7 @@ } } }, - "revision": "20230928", + "revision": "20240217", "rootUrl": "https://bigqueryreservation.googleapis.com/", "schemas": { "Assignment": { diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 9ffb3e8bf2f..3f4dd5e6d9a 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1040,7 +1040,7 @@ } } }, - "revision": "20231110", + "revision": "20240220", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -1340,9 +1340,9 @@ ], "enumDescriptions": [ "Health unknown.", - "Battery is healthy.", - "Battery is moderately unhealthy and should be replaced soon.", - "Battery is unhealthy and should be replaced." + "Battery is healthy, full charge capacity / design capacity \u003e 80%", + "Battery is moderately unhealthy and should be replaced soon, full charge capacity / design capacity 75% - 80%", + "Battery is unhealthy and should be replaced, full charge capacity / design capacity \u003c 75%" ], "readOnly": true, "type": "string" diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index f53599c3953..1bf45da3f9a 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -666,11 +666,12 @@ type GoogleChromeManagementV1BatteryStatusReport struct { // // Possible values: // "BATTERY_HEALTH_UNSPECIFIED" - Health unknown. - // "BATTERY_HEALTH_NORMAL" - Battery is healthy. + // "BATTERY_HEALTH_NORMAL" - Battery is healthy, full charge capacity + // / design capacity > 80% // "BATTERY_REPLACE_SOON" - Battery is moderately unhealthy and should - // be replaced soon. + // be replaced soon, full charge capacity / design capacity 75% - 80% // "BATTERY_REPLACE_NOW" - Battery is unhealthy and should be - // replaced. + // replaced, full charge capacity / design capacity < 75% BatteryHealth string `json:"batteryHealth,omitempty"` // CycleCount: Output only. Cycle count. diff --git a/container/v1/container-api.json b/container/v1/container-api.json index b9c73429c53..7824cdf89b5 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240116", + "revision": "20240206", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -5165,6 +5165,10 @@ "description": "Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is 'pd-standard'", "type": "string" }, + "enableConfidentialStorage": { + "description": "Optional. Reserved for future use.", + "type": "boolean" + }, "ephemeralStorageLocalSsdConfig": { "$ref": "EphemeralStorageLocalSsdConfig", "description": "Parameters for the node ephemeral storage using Local SSDs. If unspecified, ephemeral storage is backed by the boot disk." @@ -7210,6 +7214,10 @@ "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", "type": "string" }, + "queuedProvisioning": { + "$ref": "QueuedProvisioning", + "description": "Specifies the configuration of queued provisioning." + }, "resourceLabels": { "$ref": "ResourceLabels", "description": "The resource labels for the node pool to use to annotate any related Google Compute Engine resources." diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 77468acd130..3884f153550 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -4667,6 +4667,9 @@ type NodeConfig struct { // 'pd-standard' DiskType string `json:"diskType,omitempty"` + // EnableConfidentialStorage: Optional. Reserved for future use. + EnableConfidentialStorage bool `json:"enableConfidentialStorage,omitempty"` + // EphemeralStorageLocalSsdConfig: Parameters for the node ephemeral // storage using Local SSDs. If unspecified, ephemeral storage is backed // by the boot disk. @@ -8038,6 +8041,10 @@ type UpdateNodePoolRequest struct { // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` + // QueuedProvisioning: Specifies the configuration of queued + // provisioning. + QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` + // ResourceLabels: The resource labels for the node pool to use to // annotate any related Google Compute Engine resources. ResourceLabels *ResourceLabels `json:"resourceLabels,omitempty"` diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 140fa4d3093..30344ba7341 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20240116", + "revision": "20240206", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -5546,7 +5546,7 @@ "type": "string" }, "enableConfidentialStorage": { - "description": "Optional. Enable confidential storage on Hyperdisk. boot_disk_kms_key is required when enable_confidential_storage is true. This is only available for private preview.", + "description": "Optional. Reserved for future use.", "type": "boolean" }, "ephemeralStorageConfig": { @@ -7714,6 +7714,10 @@ "description": "Required. Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", "type": "string" }, + "queuedProvisioning": { + "$ref": "QueuedProvisioning", + "description": "Specifies the configuration of queued provisioning." + }, "resourceLabels": { "$ref": "ResourceLabels", "description": "The resource labels for the node pool to use to annotate any related Google Compute Engine resources." diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index e89ea82e756..e5ccb3b5ca6 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -5204,10 +5204,7 @@ type NodeConfig struct { // 'pd-standard' DiskType string `json:"diskType,omitempty"` - // EnableConfidentialStorage: Optional. Enable confidential storage on - // Hyperdisk. boot_disk_kms_key is required when - // enable_confidential_storage is true. This is only available for - // private preview. + // EnableConfidentialStorage: Optional. Reserved for future use. EnableConfidentialStorage bool `json:"enableConfidentialStorage,omitempty"` // EphemeralStorageConfig: Parameters for the ephemeral storage @@ -8786,6 +8783,10 @@ type UpdateNodePoolRequest struct { // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` + // QueuedProvisioning: Specifies the configuration of queued + // provisioning. + QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` + // ResourceLabels: The resource labels for the node pool to use to // annotate any related Google Compute Engine resources. ResourceLabels *ResourceLabels `json:"resourceLabels,omitempty"` diff --git a/language/v1/language-api.json b/language/v1/language-api.json index 98ac48b01d8..1bd3a68d51f 100644 --- a/language/v1/language-api.json +++ b/language/v1/language-api.json @@ -246,7 +246,7 @@ } } }, - "revision": "20240211", + "revision": "20240217", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -465,47 +465,12 @@ "type": "string" }, "features": { - "$ref": "AnnotateTextRequestFeatures", + "$ref": "Features", "description": "Required. The enabled features." } }, "type": "object" }, - "AnnotateTextRequestFeatures": { - "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.", - "id": "AnnotateTextRequestFeatures", - "properties": { - "classificationModelOptions": { - "$ref": "ClassificationModelOptions", - "description": "Optional. The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true." - }, - "classifyText": { - "description": "Classify the full document into categories.", - "type": "boolean" - }, - "extractDocumentSentiment": { - "description": "Extract document-level sentiment.", - "type": "boolean" - }, - "extractEntities": { - "description": "Extract entities.", - "type": "boolean" - }, - "extractEntitySentiment": { - "description": "Extract entities and their associated sentiment.", - "type": "boolean" - }, - "extractSyntax": { - "description": "Extract syntax information.", - "type": "boolean" - }, - "moderateText": { - "description": "Moderate the document for harmful and sensitive categories.", - "type": "boolean" - } - }, - "type": "object" - }, "AnnotateTextResponse": { "description": "The text annotations response message.", "id": "AnnotateTextResponse", @@ -577,43 +542,16 @@ "id": "ClassificationModelOptions", "properties": { "v1Model": { - "$ref": "ClassificationModelOptionsV1Model", + "$ref": "V1Model", "description": "Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future." }, "v2Model": { - "$ref": "ClassificationModelOptionsV2Model", + "$ref": "V2Model", "description": "Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model." } }, "type": "object" }, - "ClassificationModelOptionsV1Model": { - "description": "Options for the V1 model.", - "id": "ClassificationModelOptionsV1Model", - "properties": {}, - "type": "object" - }, - "ClassificationModelOptionsV2Model": { - "description": "Options for the V2 model.", - "id": "ClassificationModelOptionsV2Model", - "properties": { - "contentCategoriesVersion": { - "description": "The content categories used for classification.", - "enum": [ - "CONTENT_CATEGORIES_VERSION_UNSPECIFIED", - "V1", - "V2" - ], - "enumDescriptions": [ - "If `ContentCategoriesVersion` is not specified, this option will default to `V1`.", - "Legacy content categories of our initial launch in 2017.", - "Updated content categories in 2022." - ], - "type": "string" - } - }, - "type": "object" - }, "ClassifyTextRequest": { "description": "The document classification request message.", "id": "ClassifyTextRequest", @@ -643,419 +581,6 @@ }, "type": "object" }, - "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", - "id": "Color", - "properties": { - "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", - "format": "float", - "type": "number" - }, - "blue": { - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "green": { - "description": "The amount of green in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "red": { - "description": "The amount of red in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "CpuMetric": { - "description": "Metric for billing reports.", - "id": "CpuMetric", - "properties": { - "coreNumber": { - "description": "Required. Number of CPU cores.", - "format": "int64", - "type": "string" - }, - "coreSec": { - "description": "Required. Total seconds of core usage, e.g. 4.", - "format": "int64", - "type": "string" - }, - "cpuType": { - "description": "Required. Type of cpu, e.g. N2.", - "enum": [ - "UNKNOWN_CPU_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "GPU-based machine, skip quota reporting.", - "GPU-based machine, skip quota reporting.", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "GPU-based machine, skip quota reporting.", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, "DependencyEdge": { "description": "Represents dependency parse tree information for a token. (For more information on dependency labels, see http://www.aclweb.org/anthology/P13-2017", "id": "DependencyEdge", @@ -1242,37 +767,6 @@ }, "type": "object" }, - "DiskMetric": { - "id": "DiskMetric", - "properties": { - "diskType": { - "description": "Required. Type of Disk, e.g. REGIONAL_SSD.", - "enum": [ - "UNKNOWN_DISK_TYPE", - "REGIONAL_SSD", - "REGIONAL_STORAGE", - "PD_SSD", - "PD_STANDARD", - "STORAGE_SNAPSHOT" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "gibSec": { - "description": "Required. Seconds of physical disk usage, e.g. 3600.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "Document": { "description": "Represents the input to API methods.", "id": "Document", @@ -1403,414 +897,37 @@ }, "type": "object" }, - "GpuMetric": { - "id": "GpuMetric", + "Features": { + "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.", + "id": "Features", "properties": { - "gpuSec": { - "description": "Required. Seconds of GPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "gpuType": { - "description": "Required. Type of GPU, e.g. NVIDIA_TESLA_V100.", - "enum": [ - "UNKNOWN_GPU_TYPE", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_TESLA_K80", - "NVIDIA_L4", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_V100", - "NVIDIA_H100_80GB" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" + "classificationModelOptions": { + "$ref": "ClassificationModelOptions", + "description": "Optional. The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true." }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" + "classifyText": { + "description": "Classify the full document into categories.", + "type": "boolean" }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, - "InfraUsage": { - "description": "Infra Usage of billing metrics. Next ID: 6", - "id": "InfraUsage", - "properties": { - "cpuMetrics": { - "description": "Aggregated core metrics since requested start_time.", - "items": { - "$ref": "CpuMetric" - }, - "type": "array" + "extractDocumentSentiment": { + "description": "Extract document-level sentiment.", + "type": "boolean" }, - "diskMetrics": { - "description": "Aggregated persistent disk metrics since requested start_time.", - "items": { - "$ref": "DiskMetric" - }, - "type": "array" + "extractEntities": { + "description": "Extract entities.", + "type": "boolean" }, - "gpuMetrics": { - "description": "Aggregated gpu metrics since requested start_time.", - "items": { - "$ref": "GpuMetric" - }, - "type": "array" + "extractEntitySentiment": { + "description": "Extract entities and their associated sentiment.", + "type": "boolean" }, - "ramMetrics": { - "description": "Aggregated ram metrics since requested start_time.", - "items": { - "$ref": "RamMetric" - }, - "type": "array" + "extractSyntax": { + "description": "Extract syntax information.", + "type": "boolean" }, - "tpuMetrics": { - "description": "Aggregated tpu metrics since requested start_time.", - "items": { - "$ref": "TpuMetric" - }, - "type": "array" + "moderateText": { + "description": "Moderate the document for harmful and sensitive categories.", + "type": "boolean" } }, "type": "object" @@ -2107,391 +1224,6 @@ }, "type": "object" }, - "RamMetric": { - "id": "RamMetric", - "properties": { - "gibSec": { - "description": "Required. VM memory in Gigabyte second, e.g. 3600. Using int64 type to match billing metrics definition.", - "format": "int64", - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "memories": { - "description": "Required. VM memory in gb.", - "format": "double", - "type": "number" - }, - "ramType": { - "description": "Required. Type of ram.", - "enum": [ - "UNKNOWN_RAM_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "", - "", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, "Sentence": { "description": "Represents a sentence in the input document.", "id": "Sentence", @@ -2590,3079 +1322,32 @@ }, "type": "object" }, - "TpuMetric": { - "id": "TpuMetric", + "V1Model": { + "description": "Options for the V1 model.", + "id": "V1Model", + "properties": {}, + "type": "object" + }, + "V2Model": { + "description": "Options for the V2 model.", + "id": "V2Model", "properties": { - "tpuSec": { - "description": "Required. Seconds of TPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "tpuType": { - "description": "Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD.", + "contentCategoriesVersion": { + "description": "The content categories used for classification.", "enum": [ - "UNKNOWN_TPU_TYPE", - "TPU_V2_POD", - "TPU_V2", - "TPU_V3_POD", - "TPU_V3", - "TPU_V5_LITEPOD" + "CONTENT_CATEGORIES_VERSION_UNSPECIFIED", + "V1", + "V2" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "" + "If `ContentCategoriesVersion` is not specified, this option will default to `V1`.", + "Legacy content categories of our initial launch in 2017.", + "Updated content categories in 2022." ], "type": "string" } }, "type": "object" - }, - "XPSArrayStats": { - "description": "The data statistics of a series of ARRAY values.", - "id": "XPSArrayStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "memberStats": { - "$ref": "XPSDataStats", - "description": "Stats of all the values of all arrays, as if they were a single long series of data. The type depends on the element type of the array." - } - }, - "type": "object" - }, - "XPSBatchPredictResponse": { - "id": "XPSBatchPredictResponse", - "properties": { - "exampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples for batch prediction result. Under full API implementation, results are stored in shared RecordIO of AnnotatedExample protobufs, the annotations field of which is populated by XPS backend." - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntry": { - "description": "Bounding box matching model metrics for a single intersection-over-union threshold and multiple label match confidence thresholds.", - "id": "XPSBoundingBoxMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "The intersection-over-union threshold value used to compute this metrics entry.", - "format": "float", - "type": "number" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSCategoryStats": { - "description": "The data statistics of a series of CATEGORY values.", - "id": "XPSCategoryStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topCategoryStats": { - "description": "The statistics of the top 20 CATEGORY values, ordered by CategoryStats.SingleCategoryStats.count.", - "items": { - "$ref": "XPSCategoryStatsSingleCategoryStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCategoryStatsSingleCategoryStats": { - "description": "The statistics of a single CATEGORY value.", - "id": "XPSCategoryStatsSingleCategoryStats", - "properties": { - "count": { - "description": "The number of occurrences of this value in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The CATEGORY value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSClassificationEvaluationMetrics": { - "description": "Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9.", - "id": "XPSClassificationEvaluationMetrics", - "properties": { - "auPrc": { - "description": "The Area under precision recall curve metric.", - "format": "float", - "type": "number" - }, - "auRoc": { - "description": "The Area Under Receiver Operating Characteristic curve metric. Micro-averaged for the overall evaluation.", - "format": "float", - "type": "number" - }, - "baseAuPrc": { - "description": "The Area under precision recall curve metric based on priors.", - "format": "float", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the evaluation. Only set for MULTICLASS classification problems where number of annotation specs is no more than 10. Only set for model level evaluation, not for evaluation per label." - }, - "evaluatedExamplesCount": { - "description": "The number of examples used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "logLoss": { - "description": "The Log Loss metric.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSColorMap": { - "description": "Map from color to display name. Will only be used by Image Segmentation for uCAIP.", - "id": "XPSColorMap", - "properties": { - "annotationSpecIdToken": { - "description": "Should be used during training.", - "type": "string" - }, - "color": { - "$ref": "Color", - "deprecated": true, - "description": "This type is deprecated in favor of the IntColor below. This is because google.type.Color represent color has a float which semantically does not reflect discrete classes/categories concept. Moreover, to handle it well we need to have some tolerance when converting to a discretized color. As such, the recommendation is to have API surface still use google.type.Color while internally IntColor is used." - }, - "displayName": { - "description": "Should be used during preprocessing.", - "type": "string" - }, - "intColor": { - "$ref": "XPSColorMapIntColor" - } - }, - "type": "object" - }, - "XPSColorMapIntColor": { - "description": "RGB color and each channel is represented by an integer.", - "id": "XPSColorMapIntColor", - "properties": { - "blue": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "green": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "red": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSColumnSpec": { - "id": "XPSColumnSpec", - "properties": { - "columnId": { - "description": "The unique id of the column. When Preprocess, the Tables BE will popuate the order id of the column, which reflects the order of the column inside the table, i.e. 0 means the first column in the table, N-1 means the last column. AutoML BE will persist this order id in Spanner and set the order id here when calling RefreshTablesStats and Train. Note: it's different than the column_spec_id that is generated in AutoML BE.", - "format": "int32", - "type": "integer" - }, - "dataStats": { - "$ref": "XPSDataStats", - "description": "The data stats of the column. It's outputed in RefreshTablesStats and a required input for Train." - }, - "dataType": { - "$ref": "XPSDataType", - "description": "The data type of the column. It's outputed in Preprocess rpc and a required input for RefreshTablesStats and Train." - }, - "displayName": { - "description": "The display name of the column. It's outputed in Preprocess and a required input for RefreshTablesStats and Train.", - "type": "string" - }, - "forecastingMetadata": { - "$ref": "XPSColumnSpecForecastingMetadata" - }, - "topCorrelatedColumns": { - "description": "It's outputed in RefreshTablesStats, and a required input in Train.", - "items": { - "$ref": "XPSColumnSpecCorrelatedColumn" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSColumnSpecCorrelatedColumn": { - "description": "Identifies a table's column, and its correlation with the column this ColumnSpec describes.", - "id": "XPSColumnSpecCorrelatedColumn", - "properties": { - "columnId": { - "format": "int32", - "type": "integer" - }, - "correlationStats": { - "$ref": "XPSCorrelationStats" - } - }, - "type": "object" - }, - "XPSColumnSpecForecastingMetadata": { - "description": "=========================================================================== # The fields below are used exclusively for Forecasting.", - "id": "XPSColumnSpecForecastingMetadata", - "properties": { - "columnType": { - "description": "The type of the column for FORECASTING model training purposes.", - "enum": [ - "COLUMN_TYPE_UNSPECIFIED", - "KEY", - "KEY_METADATA", - "TIME_SERIES_AVAILABLE_PAST_ONLY", - "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - ], - "enumDescriptions": [ - "An un-set value of this enum.", - "Key columns are used to identify timeseries.", - "This column contains information describing static properties of the entities identified by the key column(s) (e.g. city's ZIP code).", - "This column contains information for the given entity, at any time poinrt, they are only available in the time series before.", - "This column contains information for the given entity is known both for the past and the sufficiently far future." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSCommonStats": { - "description": "Common statistics for a column with a specified data type.", - "id": "XPSCommonStats", - "properties": { - "distinctValueCount": { - "format": "int64", - "type": "string" - }, - "nullValueCount": { - "format": "int64", - "type": "string" - }, - "validValueCount": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfidenceMetricsEntry": { - "description": "ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next tag: 16.", - "id": "XPSConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Metrics are computed with an assumption that the model never return predictions with score lower than this value.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "f1ScoreAt1": { - "description": "The harmonic mean of recall_at1 and precision_at1.", - "format": "float", - "type": "number" - }, - "falseNegativeCount": { - "description": "The number of ground truth labels that are not matched by a model created label.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "The number of model created labels that do not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "False Positive Rate for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "falsePositiveRateAt1": { - "description": "The False Positive Rate when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "positionThreshold": { - "description": "Metrics are computed with an assumption that the model always returns at most this many predictions (ordered by their score, descendingly), but they all still need to meet the confidence_threshold.", - "format": "int32", - "type": "integer" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "precisionAt1": { - "description": "The precision when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall (true positive rate) for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recallAt1": { - "description": "The recall (true positive rate) when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "trueNegativeCount": { - "description": "The number of labels that were not created by the model, but if they would, they would not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "The number of model created labels that match a ground truth label.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfusionMatrix": { - "description": "Confusion matrix of the model running the classification.", - "id": "XPSConfusionMatrix", - "properties": { - "annotationSpecIdToken": { - "description": "For the following three repeated fields, only one is intended to be set. annotation_spec_id_token is preferable to be set. ID tokens of the annotation specs used in the confusion matrix.", - "items": { - "type": "string" - }, - "type": "array" - }, - "category": { - "description": "Category (mainly for segmentation). Set only for image segmentation models. Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "row": { - "description": "Rows in the confusion matrix. The number of rows is equal to the size of `annotation_spec_id_token`. `row[i].value[j]` is the number of examples that have ground truth of the `annotation_spec_id_token[i]` and are predicted as `annotation_spec_id_token[j]` by the model being evaluated.", - "items": { - "$ref": "XPSConfusionMatrixRow" - }, - "type": "array" - }, - "sentimentLabel": { - "description": "Sentiment labels used in the confusion matrix. Set only for text sentiment models. For AutoML Text Revamp, use `annotation_spec_id_token` instead and leave this field empty.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSConfusionMatrixRow": { - "description": "A row in the confusion matrix.", - "id": "XPSConfusionMatrixRow", - "properties": { - "count": { - "description": "Same as above except intended to represent other counts (for e.g. for segmentation this is pixel count). NOTE(params): Only example_count or count is set (oneoff does not support repeated fields unless they are embedded inside another message).", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "exampleCount": { - "description": "Value of the specific cell in the confusion matrix. The number of values each row has (i.e. the length of the row) is equal to the length of the annotation_spec_id_token field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCoreMlFormat": { - "description": "A model format used for iOS mobile devices.", - "id": "XPSCoreMlFormat", - "properties": {}, - "type": "object" - }, - "XPSCorrelationStats": { - "description": "A correlation statistics between two series of DataType values. The series may have differing DataType-s, but within a single series the DataType must be the same.", - "id": "XPSCorrelationStats", - "properties": { - "cramersV": { - "description": "The correlation value using the Cramer's V measure.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSDataErrors": { - "description": "Different types of errors and the stats associatesd with each error.", - "id": "XPSDataErrors", - "properties": { - "count": { - "description": "Number of records having errors associated with the enum.", - "format": "int32", - "type": "integer" - }, - "errorType": { - "description": "Type of the error.", - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "UNSUPPORTED_AUDIO_FORMAT", - "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT", - "FILE_TOO_LARGE", - "MISSING_TRANSCRIPTION" - ], - "enumDescriptions": [ - "Not specified.", - "Audio format not in the formats by cloud-speech AutoML. Currently only wav and flac file formats are supported.", - "File format differnt from what is specified in the file name extension.", - "File too large. Maximum allowed size is 50 MB.", - "Transcript is missing." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDataStats": { - "description": "The data statistics of a series of values that share the same DataType.", - "id": "XPSDataStats", - "properties": { - "arrayStats": { - "$ref": "XPSArrayStats", - "description": "The statistics for ARRAY DataType." - }, - "categoryStats": { - "$ref": "XPSCategoryStats", - "description": "The statistics for CATEGORY DataType." - }, - "distinctValueCount": { - "description": "The number of distinct values.", - "format": "int64", - "type": "string" - }, - "float64Stats": { - "$ref": "XPSFloat64Stats", - "description": "The statistics for FLOAT64 DataType." - }, - "nullValueCount": { - "description": "The number of values that are null.", - "format": "int64", - "type": "string" - }, - "stringStats": { - "$ref": "XPSStringStats", - "description": "The statistics for STRING DataType." - }, - "structStats": { - "$ref": "XPSStructStats", - "description": "The statistics for STRUCT DataType." - }, - "timestampStats": { - "$ref": "XPSTimestampStats", - "description": "The statistics for TIMESTAMP DataType." - }, - "validValueCount": { - "description": "The number of values that are valid.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSDataType": { - "description": "Indicated the type of data that can be stored in a structured data entity (e.g. a table).", - "id": "XPSDataType", - "properties": { - "compatibleDataTypes": { - "description": "The highly compatible data types to this data type.", - "items": { - "$ref": "XPSDataType" - }, - "type": "array" - }, - "listElementType": { - "$ref": "XPSDataType", - "description": "If type_code == ARRAY, then `list_element_type` is the type of the elements." - }, - "nullable": { - "description": "If true, this DataType can also be `null`.", - "type": "boolean" - }, - "structType": { - "$ref": "XPSStructType", - "description": "If type_code == STRUCT, then `struct_type` provides type information for the struct's fields." - }, - "timeFormat": { - "description": "If type_code == TIMESTAMP then `time_format` provides the format in which that time field is expressed. The time_format must be written in `strftime` syntax. If time_format is not set, then the default format as described on the field is used.", - "type": "string" - }, - "typeCode": { - "description": "Required. The TypeCode for this type.", - "enum": [ - "TYPE_CODE_UNSPECIFIED", - "FLOAT64", - "TIMESTAMP", - "STRING", - "ARRAY", - "STRUCT", - "CATEGORY" - ], - "enumDescriptions": [ - "Not specified. Should not be used.", - "Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or `\"-Infinity\"`.", - "Must be between 0AD and 9999AD. Encoded as `string` according to time_format, or, if that format is not set, then in RFC 3339 `date-time` format, where `time-offset` = `\"Z\"` (e.g. 1985-04-12T23:20:50.52Z).", - "Encoded as `string`.", - "Encoded as `list`, where the list elements are represented according to list_element_type.", - "Encoded as `struct`, where field values are represented according to struct_type.", - "Values of this type are not further understood by AutoML, e.g. AutoML is unable to tell the order of values (as it could with FLOAT64), or is unable to say if one value contains another (as it could with STRING). Encoded as `string` (bytes should be base64-encoded, as described in RFC 4648, section 4)." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDockerFormat": { - "description": "A model format used for Docker containers. Use the params field to customize the container. The container is verified to work correctly on ubuntu 16.04 operating system.", - "id": "XPSDockerFormat", - "properties": { - "cpuArchitecture": { - "description": "Optional. Additional cpu information describing the requirements for the to be exported model files.", - "enum": [ - "CPU_ARCHITECTURE_UNSPECIFIED", - "CPU_ARCHITECTURE_X86_64" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "gpuArchitecture": { - "description": "Optional. Additional gpu information describing the requirements for the to be exported model files.", - "enum": [ - "GPU_ARCHITECTURE_UNSPECIFIED", - "GPU_ARCHITECTURE_NVIDIA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSEdgeTpuTfLiteFormat": { - "description": "A model format used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "id": "XPSEdgeTpuTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSEvaluationMetrics": { - "description": "Contains xPS-specific model evaluation metrics either for a single annotation spec (label), or for the model overall. Next tag: 18.", - "id": "XPSEvaluationMetrics", - "properties": { - "annotationSpecIdToken": { - "description": "The annotation_spec for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The value comes from the input annotations in AnnotatedExample. For MVP product or for text sentiment models where annotation_spec_id_token is not available, set label instead.", - "type": "string" - }, - "category": { - "description": "The integer category label for which this evaluation metric instance had been created. Valid categories are 0 or higher. Overall model evaluation should set this to negative values (rather than implicit zero). Only used for Image Segmentation (prefer to set annotation_spec_id_token instead). Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "format": "int32", - "type": "integer" - }, - "evaluatedExampleCount": { - "description": "The number of examples used to create this evaluation metrics instance.", - "format": "int32", - "type": "integer" - }, - "imageClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "imageObjectDetectionEvalMetrics": { - "$ref": "XPSImageObjectDetectionEvaluationMetrics" - }, - "imageSegmentationEvalMetrics": { - "$ref": "XPSImageSegmentationEvaluationMetrics" - }, - "label": { - "description": "The label for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The label maps to AnnotationSpec.display_name in Public API protos. Only used by MVP implementation and text sentiment FULL implementation.", - "type": "string" - }, - "regressionEvalMetrics": { - "$ref": "XPSRegressionEvaluationMetrics" - }, - "tablesClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "tablesEvalMetrics": { - "$ref": "XPSTablesEvaluationMetrics" - }, - "textClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "textExtractionEvalMetrics": { - "$ref": "XPSTextExtractionEvaluationMetrics" - }, - "textSentimentEvalMetrics": { - "$ref": "XPSTextSentimentEvaluationMetrics" - }, - "translationEvalMetrics": { - "$ref": "XPSTranslationEvaluationMetrics" - }, - "videoActionRecognitionEvalMetrics": { - "$ref": "XPSVideoActionRecognitionEvaluationMetrics" - }, - "videoClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "videoObjectTrackingEvalMetrics": { - "$ref": "XPSVideoObjectTrackingEvaluationMetrics" - } - }, - "type": "object" - }, - "XPSEvaluationMetricsSet": { - "description": "Specifies location of model evaluation metrics.", - "id": "XPSEvaluationMetricsSet", - "properties": { - "evaluationMetrics": { - "description": "Inline EvaluationMetrics - should be relatively small. For passing large quantities of exhaustive metrics, use file_spec.", - "items": { - "$ref": "XPSEvaluationMetrics" - }, - "type": "array" - }, - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec containing evaluation metrics of a model, must point to RecordIO file(s) of intelligence.cloud.automl.xps.EvaluationMetrics messages." - }, - "numEvaluationMetrics": { - "description": "Number of the evaluation metrics (usually one per label plus overall).", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExampleSet": { - "description": "Set of examples or input sources.", - "id": "XPSExampleSet", - "properties": { - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec of the examples or input sources." - }, - "fingerprint": { - "description": "Fingerprint of the example set.", - "format": "int64", - "type": "string" - }, - "numExamples": { - "description": "Number of examples.", - "format": "int64", - "type": "string" - }, - "numInputSources": { - "description": "Number of input sources.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExportModelOutputConfig": { - "id": "XPSExportModelOutputConfig", - "properties": { - "coreMlFormat": { - "$ref": "XPSCoreMlFormat" - }, - "dockerFormat": { - "$ref": "XPSDockerFormat" - }, - "edgeTpuTfLiteFormat": { - "$ref": "XPSEdgeTpuTfLiteFormat" - }, - "exportFirebaseAuxiliaryInfo": { - "description": "For any model and format: If true, will additionally export FirebaseExportedModelInfo in a firebase.txt file.", - "type": "boolean" - }, - "outputGcrUri": { - "description": "The Google Contained Registry (GCR) path the exported files to be pushed to. This location is set if the exported format is DOCKDER.", - "type": "string" - }, - "outputGcsUri": { - "description": "The Google Cloud Storage (GCS) directory where XPS will output the exported models and related files. Format: gs://bucket/directory", - "type": "string" - }, - "tfJsFormat": { - "$ref": "XPSTfJsFormat" - }, - "tfLiteFormat": { - "$ref": "XPSTfLiteFormat" - }, - "tfSavedModelFormat": { - "$ref": "XPSTfSavedModelFormat" - } - }, - "type": "object" - }, - "XPSFileSpec": { - "description": "Spec of input and output files, on external file systems (CNS, GCS, etc).", - "id": "XPSFileSpec", - "properties": { - "directoryPath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - }, - "fileFormat": { - "enum": [ - "FILE_FORMAT_UNKNOWN", - "FILE_FORMAT_SSTABLE", - "FILE_FORMAT_TRANSLATION_RKV", - "FILE_FORMAT_RECORDIO", - "FILE_FORMAT_RAW_CSV", - "FILE_FORMAT_RAW_CAPACITOR" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "Internal format for parallel text data used by Google Translate. go/rkvtools", - "", - "Only the lexicographically first file described by the file_spec contains the header line.", - "" - ], - "type": "string" - }, - "fileSpec": { - "description": "Single file path, or file pattern of format \"/path/to/file@shard_count\". E.g. /cns/cell-d/somewhere/file@2 is expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and /cns/cell-d/somewhere/file-00001-of-00002.", - "type": "string" - }, - "singleFilePath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - } - }, - "type": "object" - }, - "XPSFloat64Stats": { - "description": "The data statistics of a series of FLOAT64 values.", - "id": "XPSFloat64Stats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "histogramBuckets": { - "description": "Histogram buckets of the data series. Sorted by the min value of the bucket, ascendingly, and the number of the buckets is dynamically generated. The buckets are non-overlapping and completely cover whole FLOAT64 range with min of first bucket being `\"-Infinity\"`, and max of the last one being `\"Infinity\"`.", - "items": { - "$ref": "XPSFloat64StatsHistogramBucket" - }, - "type": "array" - }, - "mean": { - "description": "The mean of the series.", - "format": "double", - "type": "number" - }, - "quantiles": { - "description": "Ordered from 0 to k k-quantile values of the data series of n values. The value at index i is, approximately, the i*n/k-th smallest value in the series; for i = 0 and i = k these are, respectively, the min and max values.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - }, - "standardDeviation": { - "description": "The standard deviation of the series.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSFloat64StatsHistogramBucket": { - "description": "A bucket of a histogram.", - "id": "XPSFloat64StatsHistogramBucket", - "properties": { - "count": { - "description": "The number of data values that are in the bucket, i.e. are between min and max values.", - "format": "int64", - "type": "string" - }, - "max": { - "description": "The maximum value of the bucket, exclusive unless max = `\"Infinity\"`, in which case it's inclusive.", - "format": "double", - "type": "number" - }, - "min": { - "description": "The minimum value of the bucket, inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageClassificationTrainResponse": { - "id": "XPSImageClassificationTrainResponse", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Populated for AutoMl requests." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostInNodeTime": { - "description": "The actual cost to create this model. - For edge type model, the cost is expressed in node hour. - For cloud type model,the cost is expressed in compute hour. - Populated for models created before GA. To be deprecated after GA.", - "format": "google-duration", - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual training cost, expressed in node seconds. Populated for models trained in node time.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSImageExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageModelArtifactSpec": { - "description": "Stores the locations and related metadata of the model artifacts. Populated for uCAIP requests only.", - "id": "XPSImageModelArtifactSpec", - "properties": { - "checkpointArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The Tensorflow checkpoint files. e.g. Used for resumable training." - }, - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "labelGcsUri": { - "description": "GCS uri of decoded labels file for model export 'dict.txt'.", - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud AI Platform API." - }, - "tfJsBinaryGcsPrefix": { - "description": "GCS uri prefix of Tensorflow JavaScript binary files 'groupX-shardXofX.bin' Deprecated.", - "type": "string" - }, - "tfLiteMetadataGcsUri": { - "description": "GCS uri of Tensorflow Lite metadata 'tflite_metadata.json'.", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpec": { - "description": "Serving specification for image models.", - "id": "XPSImageModelServingSpec", - "properties": { - "modelThroughputEstimation": { - "description": "Populate under uCAIP request scope.", - "items": { - "$ref": "XPSImageModelServingSpecModelThroughputEstimation" - }, - "type": "array" - }, - "nodeQps": { - "description": "An estimated value of how much traffic a node can serve. Populated for AutoMl request only.", - "format": "double", - "type": "number" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpecModelThroughputEstimation": { - "id": "XPSImageModelServingSpecModelThroughputEstimation", - "properties": { - "computeEngineAcceleratorType": { - "enum": [ - "UNSPECIFIED", - "NVIDIA_TESLA_K80", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_V100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_L4", - "NVIDIA_H100_80GB", - "TPU_V2", - "TPU_V3", - "TPU_V4_POD", - "TPU_V5_LITEPOD" - ], - "enumDescriptions": [ - "", - "Nvidia Tesla K80 GPU.", - "Nvidia Tesla P100 GPU.", - "Nvidia Tesla V100 GPU.", - "Nvidia Tesla P4 GPU.", - "Nvidia Tesla T4 GPU.", - "Nvidia Tesla A100 GPU.", - "Nvidia A100 80GB GPU.", - "Nvidia L4 GPU.", - "Nvidia H100 80Gb GPU.", - "TPU v2 (JellyFish).", - "TPU v3 (DragonFish).", - "TPU_v4 (PufferFish).", - "TPU v5 Lite Pods." - ], - "type": "string" - }, - "latencyInMilliseconds": { - "description": "Estimated latency.", - "format": "double", - "type": "number" - }, - "nodeQps": { - "description": "The approximate qps a deployed node can serve.", - "format": "double", - "type": "number" - }, - "servomaticPartitionType": { - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionEvaluationMetrics": { - "description": "Model evaluation metrics for image object detection problems. Evaluates prediction quality of labeled bounding boxes.", - "id": "XPSImageObjectDetectionEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingBoxCount": { - "description": "The total number of bounding boxes (i.e. summed over all images) the ground truth used to create this evaluation had.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionModelSpec": { - "id": "XPSImageObjectDetectionModelSpec", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec" - }, - "maxBoundingBoxCount": { - "description": "Max number of bounding box.", - "format": "int64", - "type": "string" - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetrics": { - "description": "Model evaluation metrics for image segmentation problems. Next tag: 4.", - "id": "XPSImageSegmentationEvaluationMetrics", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the per confidence_threshold evaluation. Pixel counts are set here. Only set for model level evaluation, not for evaluation per label." - }, - "diceScoreCoefficient": { - "description": "DSC or the F1 score: The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "iouScore": { - "description": "IOU score.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageSegmentationTrainResponse": { - "id": "XPSImageSegmentationTrainResponse", - "properties": { - "colorMaps": { - "description": "Color map of the model.", - "items": { - "$ref": "XPSColorMap" - }, - "type": "array" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "NOTE: These fields are not used/needed in EAP but will be set later." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope. Model artifact spec stores and model gcs pathes and related metadata" - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSIntegratedGradientsAttribution": { - "deprecated": true, - "description": "An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365", - "id": "XPSIntegratedGradientsAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSMetricEntry": { - "id": "XPSMetricEntry", - "properties": { - "argentumMetricId": { - "description": "For billing metrics that are using legacy sku's, set the legacy billing metric id here. This will be sent to Chemist as the \"cloudbilling.googleapis.com/argentum_metric_id\" label. Otherwise leave empty.", - "type": "string" - }, - "doubleValue": { - "description": "A double value.", - "format": "double", - "type": "number" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "format": "int64", - "type": "string" - }, - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" - }, - "systemLabels": { - "description": "Billing system labels for this (metric, value) pair.", - "items": { - "$ref": "XPSMetricEntryLabel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSMetricEntryLabel": { - "id": "XPSMetricEntryLabel", - "properties": { - "labelName": { - "description": "The name of the label.", - "type": "string" - }, - "labelValue": { - "description": "The value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "XPSModelArtifactItem": { - "description": "A single model artifact item.", - "id": "XPSModelArtifactItem", - "properties": { - "artifactFormat": { - "description": "The model artifact format.", - "enum": [ - "ARTIFACT_FORMAT_UNSPECIFIED", - "TF_CHECKPOINT", - "TF_SAVED_MODEL", - "TF_LITE", - "EDGE_TPU_TF_LITE", - "TF_JS", - "CORE_ML" - ], - "enumDescriptions": [ - "Should not be used.", - "The Tensorflow checkpoints. See https://www.tensorflow.org/guide/checkpoint.", - "The Tensorflow SavedModel binary.", - "Model artifact in generic TensorFlow Lite (.tflite) format. See https://www.tensorflow.org/lite.", - "Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "Used for iOS mobile devices in (.mlmodel) format. See https://developer.apple.com/documentation/coreml" - ], - "type": "string" - }, - "gcsUri": { - "description": "The Google Cloud Storage (GCS) uri that stores the model binary files.", - "type": "string" - } - }, - "type": "object" - }, - "XPSPreprocessResponse": { - "description": "Next ID: 8", - "id": "XPSPreprocessResponse", - "properties": { - "outputExampleSet": { - "$ref": "XPSExampleSet", - "description": "Preprocessed examples, that are to be imported into AutoML storage. This should point to RecordIO file(s) of PreprocessedExample messages. The PreprocessedExample.mvp_training_data-s returned here are later verbatim passed to Train() call in TrainExample.mvp_training_data." - }, - "speechPreprocessResp": { - "$ref": "XPSSpeechPreprocessResponse" - }, - "tablesPreprocessResponse": { - "$ref": "XPSTablesPreprocessResponse" - }, - "translationPreprocessResp": { - "$ref": "XPSTranslationPreprocessResponse" - } - }, - "type": "object" - }, - "XPSRegressionEvaluationMetrics": { - "description": "Model evaluation metrics for regression problems. It can be used for Tables.", - "id": "XPSRegressionEvaluationMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean Absolute Error (MAE).", - "format": "float", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error. Only set if all ground truth values are positive.", - "format": "float", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "float", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root Mean Squared Error (RMSE).", - "format": "float", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSRegressionMetricsEntry": { - "description": "A pair of actual \u0026 observed values for the model being evaluated.", - "id": "XPSRegressionMetricsEntry", - "properties": { - "predictedValue": { - "description": "The observed value for a row in the dataset.", - "format": "float", - "type": "number" - }, - "trueValue": { - "description": "The actual target value for a row in the dataset.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSReportingMetrics": { - "id": "XPSReportingMetrics", - "properties": { - "effectiveTrainingDuration": { - "deprecated": true, - "description": "The effective time training used. If set, this is used for quota management and billing. Deprecated. AutoML BE doesn't use this. Don't set.", - "format": "google-duration", - "type": "string" - }, - "metricEntries": { - "description": "One entry per metric name. The values must be aggregated per metric name.", - "items": { - "$ref": "XPSMetricEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadata": { - "deprecated": true, - "id": "XPSResponseExplanationMetadata", - "properties": { - "inputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataInputMetadata" - }, - "description": "Metadata of the input.", - "type": "object" - }, - "outputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataOutputMetadata" - }, - "description": "Metadata of the output.", - "type": "object" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataInputMetadata": { - "description": "Metadata of the input of a feature.", - "id": "XPSResponseExplanationMetadataInputMetadata", - "properties": { - "inputTensorName": { - "description": "Name of the input tensor for this model. Only needed in train response.", - "type": "string" - }, - "modality": { - "description": "Modality of the feature. Valid values are: numeric, image. Defaults to numeric.", - "enum": [ - "MODALITY_UNSPECIFIED", - "NUMERIC", - "IMAGE", - "CATEGORICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "visualizationConfig": { - "$ref": "XPSVisualization", - "description": "Visualization configurations for image explanation." - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataOutputMetadata": { - "description": "Metadata of the prediction output to be explained.", - "id": "XPSResponseExplanationMetadataOutputMetadata", - "properties": { - "outputTensorName": { - "description": "Name of the output tensor. Only needed in train response.", - "type": "string" - } - }, - "type": "object" - }, - "XPSResponseExplanationParameters": { - "deprecated": true, - "id": "XPSResponseExplanationParameters", - "properties": { - "integratedGradientsAttribution": { - "$ref": "XPSIntegratedGradientsAttribution", - "description": "An attribution method that computes Aumann-Shapley values taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365" - }, - "xraiAttribution": { - "$ref": "XPSXraiAttribution", - "description": "An attribution method that redistributes Integrated Gradients attribution to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 XRAI currently performs better on natural images, like a picture of a house or an animal. If the images are taken in artificial environments, like a lab or manufacturing line, or from diagnostic equipment, like x-rays or quality-control cameras, use Integrated Gradients instead." - } - }, - "type": "object" - }, - "XPSResponseExplanationSpec": { - "deprecated": true, - "description": "Specification of Model explanation. Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 for context.", - "id": "XPSResponseExplanationSpec", - "properties": { - "explanationType": { - "description": "Explanation type. For AutoML Image Classification models, possible values are: * `image-integrated-gradients` * `image-xrai`", - "type": "string" - }, - "metadata": { - "$ref": "XPSResponseExplanationMetadata", - "description": "Metadata describing the Model's input and output for explanation." - }, - "parameters": { - "$ref": "XPSResponseExplanationParameters", - "description": "Parameters that configure explaining of the Model's predictions." - } - }, - "type": "object" - }, - "XPSRow": { - "id": "XPSRow", - "properties": { - "columnIds": { - "description": "The ids of the columns. Note: The below `values` field must match order of this field, if this field is set.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "values": { - "description": "The values of the row cells, given in the same order as the column_ids. If column_ids is not set, then in the same order as the input_feature_column_ids in TablesModelMetadata.", - "items": { - "type": "any" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetrics": { - "id": "XPSSpeechEvaluationMetrics", - "properties": { - "subModelEvaluationMetrics": { - "description": "Evaluation metrics for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetricsSubModelEvaluationMetric": { - "id": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - }, - "numDeletions": { - "format": "int32", - "type": "integer" - }, - "numInsertions": { - "format": "int32", - "type": "integer" - }, - "numSubstitutions": { - "format": "int32", - "type": "integer" - }, - "numUtterances": { - "description": "Number of utterances used in the wer computation.", - "format": "int32", - "type": "integer" - }, - "numWords": { - "description": "Number of words over which the word error rate was computed.", - "format": "int32", - "type": "integer" - }, - "sentenceAccuracy": { - "description": "Below fields are used for debugging purposes", - "format": "double", - "type": "number" - }, - "wer": { - "description": "Word error rate (standard error metric used for speech recognition).", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSSpeechModelSpec": { - "id": "XPSSpeechModelSpec", - "properties": { - "datasetId": { - "description": "Required for speech xps backend. Speech xps has to use dataset_id and model_id as the primary key in db so that speech API can query the db directly.", - "format": "int64", - "type": "string" - }, - "language": { - "type": "string" - }, - "subModelSpecs": { - "description": "Model specs for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechModelSpecSubModelSpec" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechModelSpecSubModelSpec": { - "id": "XPSSpeechModelSpecSubModelSpec", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "clientId": { - "description": "In S3, Recognition ClientContextId.client_id", - "type": "string" - }, - "contextId": { - "description": "In S3, Recognition ClientContextId.context_id", - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - } - }, - "type": "object" - }, - "XPSSpeechPreprocessResponse": { - "id": "XPSSpeechPreprocessResponse", - "properties": { - "cnsTestDataPath": { - "description": "Location od shards of sstables (test data) of DataUtterance protos.", - "type": "string" - }, - "cnsTrainDataPath": { - "description": "Location of shards of sstables (training data) of DataUtterance protos.", - "type": "string" - }, - "prebuiltModelEvaluationMetrics": { - "$ref": "XPSSpeechEvaluationMetrics", - "description": "The metrics for prebuilt speech models. They are included here because there is no prebuilt speech models stored in the AutoML." - }, - "speechPreprocessStats": { - "$ref": "XPSSpeechPreprocessStats", - "description": "Stats associated with the data." - } - }, - "type": "object" - }, - "XPSSpeechPreprocessStats": { - "id": "XPSSpeechPreprocessStats", - "properties": { - "dataErrors": { - "description": "Different types of data errors and the counts associated with them.", - "items": { - "$ref": "XPSDataErrors" - }, - "type": "array" - }, - "numHumanLabeledExamples": { - "description": "The number of rows marked HUMAN_LABELLED", - "format": "int32", - "type": "integer" - }, - "numLogsExamples": { - "description": "The number of samples found in the previously recorded logs data.", - "format": "int32", - "type": "integer" - }, - "numMachineTranscribedExamples": { - "description": "The number of rows marked as MACHINE_TRANSCRIBED", - "format": "int32", - "type": "integer" - }, - "testExamplesCount": { - "description": "The number of examples labelled as TEST by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "testSentencesCount": { - "description": "The number of sentences in the test data set.", - "format": "int32", - "type": "integer" - }, - "testWordsCount": { - "description": "The number of words in the test data set.", - "format": "int32", - "type": "integer" - }, - "trainExamplesCount": { - "description": "The number of examples labeled as TRAIN by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "trainSentencesCount": { - "description": "The number of sentences in the training data set.", - "format": "int32", - "type": "integer" - }, - "trainWordsCount": { - "description": "The number of words in the training data set.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSStringStats": { - "description": "The data statistics of a series of STRING values.", - "id": "XPSStringStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topUnigramStats": { - "description": "The statistics of the top 20 unigrams, ordered by StringStats.UnigramStats.count.", - "items": { - "$ref": "XPSStringStatsUnigramStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSStringStatsUnigramStats": { - "description": "The statistics of a unigram.", - "id": "XPSStringStatsUnigramStats", - "properties": { - "count": { - "description": "The number of occurrences of this unigram in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The unigram.", - "type": "string" - } - }, - "type": "object" - }, - "XPSStructStats": { - "description": "The data statistics of a series of STRUCT values.", - "id": "XPSStructStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "fieldStats": { - "additionalProperties": { - "$ref": "XPSDataStats" - }, - "description": "Map from a field name of the struct to data stats aggregated over series of all data in that field across all the structs.", - "type": "object" - } - }, - "type": "object" - }, - "XPSStructType": { - "description": "`StructType` defines the DataType-s of a STRUCT type.", - "id": "XPSStructType", - "properties": { - "fields": { - "additionalProperties": { - "$ref": "XPSDataType" - }, - "description": "Unordered map of struct field names to their data types.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTableSpec": { - "id": "XPSTableSpec", - "properties": { - "columnSpecs": { - "additionalProperties": { - "$ref": "XPSColumnSpec" - }, - "description": "Mapping from column id to column spec.", - "type": "object" - }, - "importedDataSizeInBytes": { - "description": "The total size of imported data of the table.", - "format": "int64", - "type": "string" - }, - "rowCount": { - "description": "The number of rows in the table.", - "format": "int64", - "type": "string" - }, - "timeColumnId": { - "description": "The id of the time column.", - "format": "int32", - "type": "integer" - }, - "validRowCount": { - "description": "The number of valid rows.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetrics": { - "description": "Metrics for Tables classification problems.", - "id": "XPSTablesClassificationMetrics", - "properties": { - "curveMetrics": { - "description": "Metrics building a curve.", - "items": { - "$ref": "XPSTablesClassificationMetricsCurveMetrics" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetricsCurveMetrics": { - "description": "Metrics curve data point for a single value.", - "id": "XPSTablesClassificationMetricsCurveMetrics", - "properties": { - "aucPr": { - "description": "The area under the precision-recall curve.", - "format": "double", - "type": "number" - }, - "aucRoc": { - "description": "The area under receiver operating characteristic curve.", - "format": "double", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve and ROC curve can be derived from them.", - "items": { - "$ref": "XPSTablesConfidenceMetricsEntry" - }, - "type": "array" - }, - "logLoss": { - "description": "The Log loss metric.", - "format": "double", - "type": "number" - }, - "positionThreshold": { - "description": "The position threshold value used to compute the metrics.", - "format": "int32", - "type": "integer" - }, - "value": { - "description": "The CATEGORY row value (for ARRAY unnested) the curve metrics are for.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSTablesConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "double", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision. (2 * precision * recall) / (precision + recall)", - "format": "double", - "type": "number" - }, - "falseNegativeCount": { - "description": "False negative count.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "False positive count.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "FPR = #false positives / (#false positives + #true negatives)", - "format": "double", - "type": "number" - }, - "precision": { - "description": "Precision = #true positives / (#true positives + #false positives).", - "format": "double", - "type": "number" - }, - "recall": { - "description": "Recall = #true positives / (#true positives + #false negatives).", - "format": "double", - "type": "number" - }, - "trueNegativeCount": { - "description": "True negative count.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "True positive count.", - "format": "int64", - "type": "string" - }, - "truePositiveRate": { - "description": "TPR = #true positives / (#true positives + #false negatvies)", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesDatasetMetadata": { - "description": "Metadata for a dataset used for AutoML Tables. Next ID: 6", - "id": "XPSTablesDatasetMetadata", - "properties": { - "mlUseColumnId": { - "description": "Id the column to split the table.", - "format": "int32", - "type": "integer" - }, - "primaryTableSpec": { - "$ref": "XPSTableSpec", - "description": "Primary table." - }, - "targetColumnCorrelations": { - "additionalProperties": { - "$ref": "XPSCorrelationStats" - }, - "description": "(the column id : its CorrelationStats with target column).", - "type": "object" - }, - "targetColumnId": { - "description": "Id of the primary table column that should be used as the training label.", - "format": "int32", - "type": "integer" - }, - "weightColumnId": { - "description": "Id of the primary table column that should be used as the weight column.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSTablesEvaluationMetrics": { - "id": "XPSTablesEvaluationMetrics", - "properties": { - "classificationMetrics": { - "$ref": "XPSTablesClassificationMetrics", - "description": "Classification metrics." - }, - "regressionMetrics": { - "$ref": "XPSTablesRegressionMetrics", - "description": "Regression metrics." - } - }, - "type": "object" - }, - "XPSTablesModelColumnInfo": { - "description": "An information specific to given column and Tables Model, in context of the Model and the predictions created by it.", - "id": "XPSTablesModelColumnInfo", - "properties": { - "columnId": { - "description": "The ID of the column.", - "format": "int32", - "type": "integer" - }, - "featureImportance": { - "description": "When given as part of a Model: Measurement of how much model predictions correctness on the TEST data depend on values in this column. A value between 0 and 1, higher means higher influence. These values are normalized - for all input feature columns of a given model they add to 1. When given back by Predict or Batch Predict: Measurement of how impactful for the prediction returned for the given row the value in this column was. Specifically, the feature importance specifies the marginal contribution that the feature made to the prediction score compared to the baseline score. These values are computed using the Sampled Shapley method.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesModelStructure": { - "description": "A description of Tables model structure.", - "id": "XPSTablesModelStructure", - "properties": { - "modelParameters": { - "description": "A list of models.", - "items": { - "$ref": "XPSTablesModelStructureModelParameters" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParameters": { - "description": "Model hyper-parameters for a model.", - "id": "XPSTablesModelStructureModelParameters", - "properties": { - "hyperparameters": { - "items": { - "$ref": "XPSTablesModelStructureModelParametersParameter" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParametersParameter": { - "id": "XPSTablesModelStructureModelParametersParameter", - "properties": { - "floatValue": { - "description": "Float type parameter value.", - "format": "double", - "type": "number" - }, - "intValue": { - "description": "Integer type parameter value.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Parameter name.", - "type": "string" - }, - "stringValue": { - "description": "String type parameter value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesPreprocessResponse": { - "id": "XPSTablesPreprocessResponse", - "properties": { - "tablesDatasetMetadata": { - "$ref": "XPSTablesDatasetMetadata", - "description": "The table/column id, column_name and the DataTypes of the columns will be populated." - } - }, - "type": "object" - }, - "XPSTablesRegressionMetrics": { - "description": "Metrics for Tables regression problems.", - "id": "XPSTablesRegressionMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean absolute error.", - "format": "double", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error, only set if all of the target column's values are positive.", - "format": "double", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "double", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root mean squared error.", - "format": "double", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesTrainResponse": { - "id": "XPSTablesTrainResponse", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure" - }, - "predictionSampleRows": { - "description": "Sample rows from the dataset this model was trained.", - "items": { - "$ref": "XPSRow" - }, - "type": "array" - }, - "tablesModelColumnInfo": { - "description": "Output only. Auxiliary information for each of the input_feature_column_specs, with respect to this particular model.", - "items": { - "$ref": "XPSTablesModelColumnInfo" - }, - "type": "array" - }, - "trainCostMilliNodeHours": { - "description": "The actual training cost of the model, expressed in milli node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed to not exceed the train budget.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesTrainingOperationMetadata": { - "id": "XPSTablesTrainingOperationMetadata", - "properties": { - "createModelStage": { - "description": "Current stage of creating model.", - "enum": [ - "CREATE_MODEL_STAGE_UNSPECIFIED", - "DATA_PREPROCESSING", - "TRAINING", - "EVALUATING", - "MODEL_POST_PROCESSING" - ], - "enumDescriptions": [ - "Unspecified stage.", - "Prepare the model training pipeline and run data processing.", - "Training model.", - "Run evaluation.", - "Finalizing model training pipeline." - ], - "type": "string" - }, - "optimizationObjective": { - "description": "The optimization objective for model.", - "type": "string" - }, - "topTrials": { - "description": "This field is for training. When the operation is terminated successfully, AutoML Backend post this field to operation metadata in spanner. If the metadata has no trials returned, the training operation is supposed to be a failure.", - "items": { - "$ref": "XPSTuningTrial" - }, - "type": "array" - }, - "trainBudgetMilliNodeHours": { - "description": "Creating model budget.", - "format": "int64", - "type": "string" - }, - "trainingObjectivePoints": { - "description": "This field records the training objective value with respect to time, giving insight into how the model architecture search is performing as training time elapses.", - "items": { - "$ref": "XPSTrainingObjectivePoint" - }, - "type": "array" - }, - "trainingStartTime": { - "description": "Timestamp when training process starts.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextComponentModel": { - "description": "Component model. Next ID: 10", - "id": "XPSTextComponentModel", - "properties": { - "batchPredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold batch prediction model.", - "type": "string" - }, - "onlinePredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold online prediction model.", - "type": "string" - }, - "partition": { - "description": "The partition where the model is deployed. Populated by uCAIP BE as part of online PredictRequest.", - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud Ai Platform API." - }, - "servoModelName": { - "description": "The name of servo model. Populated by uCAIP BE as part of online PredictRequest.", - "type": "string" - }, - "submodelName": { - "description": "The name of the trained NL submodel.", - "type": "string" - }, - "submodelType": { - "description": "The type of trained NL submodel", - "enum": [ - "TEXT_MODEL_TYPE_UNSPECIFIED", - "TEXT_MODEL_TYPE_DEFAULT", - "TEXT_MODEL_TYPE_META_ARCHITECT", - "TEXT_MODEL_TYPE_ATC", - "TEXT_MODEL_TYPE_CLARA2", - "TEXT_MODEL_TYPE_CHATBASE", - "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING", - "TEXT_MODEL_TYPE_TEXT_EXTRACTION", - "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION", - "TEXT_MODEL_TYPE_COMPOSITE", - "TEXT_MODEL_TYPE_ALL_MODELS", - "TEXT_MODEL_TYPE_BERT", - "TEXT_MODEL_TYPE_ENC_PALM" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "Model type for entity extraction.", - "Model type for relationship extraction.", - "A composite model represents a set of component models that have to be used together for prediction. A composite model appears to be a single model to the model user. It may contain only one component model. Please refer to go/cnl-composite-models for more information.", - "Model type used to train default, MA, and ATC models in a single batch worker pipeline.", - "BERT pipeline needs a specific model type, since it uses a different TFX configuration compared with DEFAULT (despite sharing most of the code).", - "Model type for EncPaLM." - ], - "type": "string" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - }, - "versionNumber": { - "description": "The servomatic model version number. Populated by uCAIP BE as part of online PredictRequest.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextExtractionEvaluationMetrics": { - "id": "XPSTextExtractionEvaluationMetrics", - "properties": { - "bestF1ConfidenceMetrics": { - "$ref": "XPSConfidenceMetricsEntry", - "deprecated": true, - "description": "Values are at the highest F1 score on the precision-recall curve. Only confidence_threshold, recall, precision, and f1_score will be set." - }, - "confidenceMetricsEntries": { - "description": "If the enclosing EvaluationMetrics.label is empty, confidence_metrics_entries is an evaluation of the entire model across all labels. If the enclosing EvaluationMetrics.label is set, confidence_metrics_entries applies to that label.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the model, at the default confidence threshold (0.0). Only set for whole-model evaluation, not for evaluation per label." - }, - "perLabelConfidenceMetrics": { - "additionalProperties": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "deprecated": true, - "description": "Only recall, precision, and f1_score will be set.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTextSentimentEvaluationMetrics": { - "description": "Model evaluation metrics for text sentiment problems.", - "id": "XPSTextSentimentEvaluationMetrics", - "properties": { - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Output only. Confusion matrix of the evaluation. Only set for the overall model evaluation, not for evaluation of a single annotation spec." - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "linearKappa": { - "description": "Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanAbsoluteError": { - "description": "Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanSquaredError": { - "description": "Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision.", - "format": "float", - "type": "number" - }, - "quadraticKappa": { - "description": "Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTextToSpeechTrainResponse": { - "description": "TextToSpeech train response", - "id": "XPSTextToSpeechTrainResponse", - "properties": {}, - "type": "object" - }, - "XPSTextTrainResponse": { - "id": "XPSTextTrainResponse", - "properties": { - "componentModel": { - "description": "Component submodels.", - "items": { - "$ref": "XPSTextComponentModel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTfJsFormat": { - "description": "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "id": "XPSTfJsFormat", - "properties": {}, - "type": "object" - }, - "XPSTfLiteFormat": { - "description": "LINT.IfChange A model format used for mobile and IoT devices. See https://www.tensorflow.org/lite.", - "id": "XPSTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSTfSavedModelFormat": { - "description": "A tensorflow model format in SavedModel format.", - "id": "XPSTfSavedModelFormat", - "properties": {}, - "type": "object" - }, - "XPSTimestampStats": { - "description": "The data statistics of a series of TIMESTAMP values.", - "id": "XPSTimestampStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "granularStats": { - "additionalProperties": { - "$ref": "XPSTimestampStatsGranularStats" - }, - "description": "The string key is the pre-defined granularity. Currently supported: hour_of_day, day_of_week, month_of_year. Granularities finer that the granularity of timestamp data are not populated (e.g. if timestamps are at day granularity, then hour_of_day is not populated).", - "type": "object" - }, - "medianTimestampNanos": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTimestampStatsGranularStats": { - "description": "Stats split by a defined in context granularity.", - "id": "XPSTimestampStatsGranularStats", - "properties": { - "buckets": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "A map from granularity key to example count for that key. E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).", - "type": "object" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntry": { - "description": "Track matching model metrics for a single track match threshold and multiple label match confidence thresholds. Next tag: 6.", - "id": "XPSTrackMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Output only. Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is derived from them.", - "items": { - "$ref": "XPSTrackMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "Output only. The intersection-over-union threshold value between bounding boxes across frames used to compute this metric entry.", - "format": "float", - "type": "number" - }, - "meanBoundingBoxIou": { - "description": "Output only. The mean bounding box iou over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanMismatchRate": { - "description": "Output only. The mean mismatch rate over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanTrackingAveragePrecision": { - "description": "Output only. The mean average precision over all confidence thresholds.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold. Next tag: 6.", - "id": "XPSTrackMetricsEntryConfidenceMetricsEntry", - "properties": { - "boundingBoxIou": { - "description": "Output only. Bounding box intersection-over-union precision. Measures how well the bounding boxes overlap between each other (e.g. complete overlap or just barely above iou_threshold).", - "format": "float", - "type": "number" - }, - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "mismatchRate": { - "description": "Output only. Mismatch rate, which measures the tracking consistency, i.e. correctness of instance ID continuity.", - "format": "float", - "type": "number" - }, - "trackingPrecision": { - "description": "Output only. Tracking precision.", - "format": "float", - "type": "number" - }, - "trackingRecall": { - "description": "Output only. Tracking recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrainResponse": { - "description": "Next ID: 18", - "id": "XPSTrainResponse", - "properties": { - "deployedModelSizeBytes": { - "description": "Estimated model size in bytes once deployed.", - "format": "int64", - "type": "string" - }, - "errorAnalysisConfigs": { - "description": "Optional vision model error analysis configuration. The field is set when model error analysis is enabled in the training request. The results of error analysis will be binded together with evaluation results (in the format of AnnotatedExample).", - "items": { - "$ref": "XPSVisionErrorAnalysisConfig" - }, - "type": "array" - }, - "evaluatedExampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples used to evaluate the model (usually the test set), with the predicted annotations. The file_spec should point to recordio file(s) of AnnotatedExample. For each returned example, the example_id_token and annotations predicted by the model must be set. The example payload can and is recommended to be omitted." - }, - "evaluationMetricsSet": { - "$ref": "XPSEvaluationMetricsSet", - "description": "The trained model evaluation metrics. This can be optionally returned." - }, - "explanationConfigs": { - "deprecated": true, - "description": "VisionExplanationConfig for XAI on test set. Optional for when XAI is enable in training request.", - "items": { - "$ref": "XPSResponseExplanationSpec" - }, - "type": "array" - }, - "imageClassificationTrainResp": { - "$ref": "XPSImageClassificationTrainResponse" - }, - "imageObjectDetectionTrainResp": { - "$ref": "XPSImageObjectDetectionModelSpec" - }, - "imageSegmentationTrainResp": { - "$ref": "XPSImageSegmentationTrainResponse" - }, - "modelToken": { - "description": "Token that represents the trained model. This is considered immutable and is persisted in AutoML. xPS can put their own proto in the byte string, to e.g. point to the model checkpoints. The token is passed to other xPS APIs to refer to the model.", - "format": "byte", - "type": "string" - }, - "speechTrainResp": { - "$ref": "XPSSpeechModelSpec" - }, - "tablesTrainResp": { - "$ref": "XPSTablesTrainResponse" - }, - "textToSpeechTrainResp": { - "$ref": "XPSTextToSpeechTrainResponse" - }, - "textTrainResp": { - "$ref": "XPSTextTrainResponse", - "description": "Will only be needed for uCAIP from Beta." - }, - "translationTrainResp": { - "$ref": "XPSTranslationTrainResponse" - }, - "videoActionRecognitionTrainResp": { - "$ref": "XPSVideoActionRecognitionTrainResponse" - }, - "videoClassificationTrainResp": { - "$ref": "XPSVideoClassificationTrainResponse" - }, - "videoObjectTrackingTrainResp": { - "$ref": "XPSVideoObjectTrackingTrainResponse" - } - }, - "type": "object" - }, - "XPSTrainingObjectivePoint": { - "id": "XPSTrainingObjectivePoint", - "properties": { - "createTime": { - "description": "The time at which this point was recorded.", - "format": "google-datetime", - "type": "string" - }, - "value": { - "description": "The objective value when this point was recorded.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationEvaluationMetrics": { - "description": "Evaluation metrics for the dataset.", - "id": "XPSTranslationEvaluationMetrics", - "properties": { - "baseBleuScore": { - "description": "BLEU score for base model.", - "format": "double", - "type": "number" - }, - "bleuScore": { - "description": "BLEU score.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationPreprocessResponse": { - "description": "Translation preprocess response.", - "id": "XPSTranslationPreprocessResponse", - "properties": { - "parsedExampleCount": { - "description": "Total example count parsed.", - "format": "int64", - "type": "string" - }, - "validExampleCount": { - "description": "Total valid example count.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTranslationTrainResponse": { - "description": "Train response for translation.", - "id": "XPSTranslationTrainResponse", - "properties": { - "modelType": { - "description": "Type of the model.", - "enum": [ - "MODEL_TYPE_UNSPECIFIED", - "LEGACY", - "CURRENT" - ], - "enumDescriptions": [ - "Default", - "Legacy model. Will be deprecated.", - "Current model." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSTuningTrial": { - "description": "Metrics for a tuning job generated, will get forwarded to Stackdriver as model tuning logs. Setting this as a standalone message out of CreateModelMetadata to avoid confusion as we expose this message only to users.", - "id": "XPSTuningTrial", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure", - "description": "Model parameters for the trial." - }, - "trainingObjectivePoint": { - "$ref": "XPSTrainingObjectivePoint", - "description": "The optimization objective evaluation of the eval split data." - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntry": { - "description": "The Evaluation metrics entry given a specific precision_window_length.", - "id": "XPSVideoActionMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSVideoActionMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - }, - "precisionWindowLength": { - "description": "This VideoActionMetricsEntry is calculated based on this prediction window length. If the predicted action's timestamp is inside the time window whose center is the ground truth action's timestamp with this specific length, the prediction result is treated as a true positive.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSVideoActionMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionEvaluationMetrics": { - "description": "Model evaluation metrics for video action recognition.", - "id": "XPSVideoActionRecognitionEvaluationMetrics", - "properties": { - "evaluatedActionCount": { - "description": "Output only. The number of ground truth actions used to create this evaluation.", - "format": "int32", - "type": "integer" - }, - "videoActionMetricsEntries": { - "description": "Output only. The metric entries for precision window lengths: 1s,2s,3s,4s, 5s.", - "items": { - "$ref": "XPSVideoActionMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionTrainResponse": { - "id": "XPSVideoActionRecognitionTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoBatchPredictOperationMetadata": { - "id": "XPSVideoBatchPredictOperationMetadata", - "properties": { - "outputExamples": { - "description": "All the partial batch prediction results that are completed at the moment. Output examples are sorted by completion time. The order will not be changed. Each output example should be the path of a single RecordIO file of AnnotatedExamples.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoClassificationTrainResponse": { - "id": "XPSVideoClassificationTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSVideoExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoModelArtifactSpec": { - "id": "XPSVideoModelArtifactSpec", - "properties": { - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. batch predict) via public Cloud AI Platform API." - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingEvaluationMetrics": { - "description": "Model evaluation metrics for ObjectTracking problems. Next tag: 10.", - "id": "XPSVideoObjectTrackingEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "Output only. The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "Output only. The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingboxCount": { - "description": "The number of bounding boxes used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedFrameCount": { - "description": "The number of video frames used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedTrackCount": { - "description": "The number of tracks used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "trackMeanAveragePrecision": { - "description": "Output only. The single metric for tracks accuracy evaluation: the mean_average_precision averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanBoundingBoxIou": { - "description": "Output only. The single metric for tracks bounding box iou evaluation: the mean_bounding_box_iou averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanMismatchRate": { - "description": "Output only. The single metric for tracking consistency evaluation: the mean_mismatch_rate averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMetricsEntries": { - "description": "Output only. The tracks match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSTrackMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingTrainResponse": { - "id": "XPSVideoObjectTrackingTrainResponse", - "properties": { - "exportModelSpec": { - "$ref": "XPSVideoExportModelSpec", - "description": "Populated for AutoML request only." - }, - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoTrainingOperationMetadata": { - "id": "XPSVideoTrainingOperationMetadata", - "properties": { - "trainCostMilliNodeHour": { - "description": "This is an estimation of the node hours necessary for training a model, expressed in milli node hours (i.e. 1,000 value in this field means 1 node hour). A node hour represents the time a virtual machine spends running your training job. The cost of one node running for one hour is a node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionErrorAnalysisConfig": { - "description": "The vision model error analysis configuration. Next tag: 3", - "id": "XPSVisionErrorAnalysisConfig", - "properties": { - "exampleCount": { - "description": "The number of query examples in error analysis.", - "format": "int32", - "type": "integer" - }, - "queryType": { - "description": "The query type used in retrieval. The enum values are frozen in the foreseeable future.", - "enum": [ - "QUERY_TYPE_UNSPECIFIED", - "QUERY_TYPE_ALL_SIMILAR", - "QUERY_TYPE_SAME_CLASS_SIMILAR", - "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - ], - "enumDescriptions": [ - "Unspecified query type for model error analysis.", - "Query similar samples across all classes in the dataset.", - "Query similar samples from the same class of the input sample.", - "Query dissimilar samples from the same class of the input sample." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionTrainingOperationMetadata": { - "deprecated": true, - "id": "XPSVisionTrainingOperationMetadata", - "properties": { - "explanationUsage": { - "$ref": "InfraUsage", - "description": "Aggregated infra usage within certain time period, for billing report purpose if XAI is enable in training request." - } - }, - "type": "object" - }, - "XPSVisualization": { - "deprecated": true, - "description": "Visualization configurations for image explanation.", - "id": "XPSVisualization", - "properties": { - "clipPercentLowerbound": { - "description": "Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62.", - "format": "float", - "type": "number" - }, - "clipPercentUpperbound": { - "description": "Excludes attributions above the specified percentile from the highlighted areas. Using the clip_percent_upperbound and clip_percent_lowerbound together can be useful for filtering out noise and making it easier to see areas of strong attribution. Defaults to 99.9.", - "format": "float", - "type": "number" - }, - "colorMap": { - "description": "The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue.", - "enum": [ - "COLOR_MAP_UNSPECIFIED", - "PINK_GREEN", - "VIRIDIS", - "RED", - "GREEN", - "RED_GREEN", - "PINK_WHITE_GREEN" - ], - "enumDescriptions": [ - "Should not be used.", - "Positive: green. Negative: pink.", - "Viridis color map: A perceptually uniform color mapping which is easier to see by those with colorblindness and progresses from yellow to green to blue. Positive: yellow. Negative: blue.", - "Positive: red. Negative: red.", - "Positive: green. Negative: green.", - "Positive: green. Negative: red.", - "PiYG palette." - ], - "type": "string" - }, - "overlayType": { - "description": "How the original image is displayed in the visualization. Adjusting the overlay can help increase visual clarity if the original image makes it difficult to view the visualization. Defaults to NONE.", - "enum": [ - "OVERLAY_TYPE_UNSPECIFIED", - "NONE", - "ORIGINAL", - "GRAYSCALE", - "MASK_BLACK" - ], - "enumDescriptions": [ - "Default value. This is the same as NONE.", - "No overlay.", - "The attributions are shown on top of the original image.", - "The attributions are shown on top of grayscaled version of the original image.", - "The attributions are used as a mask to reveal predictive parts of the image and hide the un-predictive parts." - ], - "type": "string" - }, - "polarity": { - "description": "Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE.", - "enum": [ - "POLARITY_UNSPECIFIED", - "POSITIVE", - "NEGATIVE", - "BOTH" - ], - "enumDescriptions": [ - "Default value. This is the same as POSITIVE.", - "Highlights the pixels/outlines that were most influential to the model's prediction.", - "Setting polarity to negative highlights areas that does not lead to the models's current prediction.", - "Shows both positive and negative attributions." - ], - "type": "string" - }, - "type": { - "description": "Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES.", - "enum": [ - "TYPE_UNSPECIFIED", - "PIXELS", - "OUTLINES" - ], - "enumDescriptions": [ - "Should not be used.", - "Shows which pixel contributed to the image prediction.", - "Shows which region contributed to the image prediction by outlining the region." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSXpsOperationMetadata": { - "id": "XPSXpsOperationMetadata", - "properties": { - "exampleCount": { - "description": "Optional. XPS server can opt to provide example count of the long running operation (e.g. training, data importing, batch prediction).", - "format": "int64", - "type": "string" - }, - "reportingMetrics": { - "$ref": "XPSReportingMetrics", - "description": "Metrics for the operation. By the time the operation is terminated (whether succeeded or failed) as returned from XPS, AutoML BE assumes the metrics are finalized. AutoML BE transparently posts the metrics to Chemist if it's not empty, regardless of the response content or error type. If user is supposed to be charged in case of cancellation/error, this field should be set. In the case where the type of LRO doesn't require any billing, this field should be left unset." - }, - "tablesTrainingOperationMetadata": { - "$ref": "XPSTablesTrainingOperationMetadata" - }, - "videoBatchPredictOperationMetadata": { - "$ref": "XPSVideoBatchPredictOperationMetadata" - }, - "videoTrainingOperationMetadata": { - "$ref": "XPSVideoTrainingOperationMetadata" - }, - "visionTrainingOperationMetadata": { - "$ref": "XPSVisionTrainingOperationMetadata" - } - }, - "type": "object" - }, - "XPSXraiAttribution": { - "deprecated": true, - "description": "An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Only supports image Models (modality is IMAGE).", - "id": "XPSXraiAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/language/v1/language-gen.go b/language/v1/language-gen.go index 649ae0df129..8e18e4da79b 100644 --- a/language/v1/language-gen.go +++ b/language/v1/language-gen.go @@ -540,7 +540,7 @@ type AnnotateTextRequest struct { EncodingType string `json:"encodingType,omitempty"` // Features: Required. The enabled features. - Features *AnnotateTextRequestFeatures `json:"features,omitempty"` + Features *Features `json:"features,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with @@ -565,60 +565,6 @@ func (s *AnnotateTextRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AnnotateTextRequestFeatures: All available features for sentiment, -// syntax, and semantic analysis. Setting each one to true will enable -// that specific analysis for the input. -type AnnotateTextRequestFeatures struct { - // ClassificationModelOptions: Optional. The model options to use for - // classification. Defaults to v1 options if not specified. Only used if - // `classify_text` is set to true. - ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` - - // ClassifyText: Classify the full document into categories. - ClassifyText bool `json:"classifyText,omitempty"` - - // ExtractDocumentSentiment: Extract document-level sentiment. - ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - - // ExtractEntities: Extract entities. - ExtractEntities bool `json:"extractEntities,omitempty"` - - // ExtractEntitySentiment: Extract entities and their associated - // sentiment. - ExtractEntitySentiment bool `json:"extractEntitySentiment,omitempty"` - - // ExtractSyntax: Extract syntax information. - ExtractSyntax bool `json:"extractSyntax,omitempty"` - - // ModerateText: Moderate the document for harmful and sensitive - // categories. - ModerateText bool `json:"moderateText,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClassificationModelOptions") 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. - // "ClassificationModelOptions") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AnnotateTextRequestFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AnnotateTextRequestFeatures - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // AnnotateTextResponse: The text annotations response message. type AnnotateTextResponse struct { // Categories: Categories identified in the input document. @@ -734,12 +680,12 @@ type ClassificationModelOptions struct { // V1Model: Setting this field will use the V1 model and V1 content // categories version. The V1 model is a legacy model; support for this // will be discontinued in the future. - V1Model *ClassificationModelOptionsV1Model `json:"v1Model,omitempty"` + V1Model *V1Model `json:"v1Model,omitempty"` // V2Model: Setting this field will use the V2 model with the // appropriate content categories version. The V2 model is a better // performing model. - V2Model *ClassificationModelOptionsV2Model `json:"v2Model,omitempty"` + V2Model *V2Model `json:"v2Model,omitempty"` // ForceSendFields is a list of field names (e.g. "V1Model") to // unconditionally include in API requests. By default, fields with @@ -764,48 +710,6 @@ func (s *ClassificationModelOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ClassificationModelOptionsV1Model: Options for the V1 model. -type ClassificationModelOptionsV1Model struct { -} - -// ClassificationModelOptionsV2Model: Options for the V2 model. -type ClassificationModelOptionsV2Model struct { - // ContentCategoriesVersion: The content categories used for - // classification. - // - // Possible values: - // "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" - If - // `ContentCategoriesVersion` is not specified, this option will default - // to `V1`. - // "V1" - Legacy content categories of our initial launch in 2017. - // "V2" - Updated content categories in 2022. - ContentCategoriesVersion string `json:"contentCategoriesVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ContentCategoriesVersion") 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. "ContentCategoriesVersion") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ClassificationModelOptionsV2Model) MarshalJSON() ([]byte, error) { - type NoMethod ClassificationModelOptionsV2Model - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ClassifyTextRequest: The document classification request message. type ClassifyTextRequest struct { // ClassificationModelOptions: Optional. Model options to use for @@ -872,347 +776,6 @@ func (s *ClassifyTextResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Color: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to and from -// color representations in various languages over compactness. For -// example, the fields of this representation can be trivially provided -// to the constructor of `java.awt.Color` in Java; it can also be -// trivially provided to UIColor's `+colorWithRed:green:blue:alpha` -// method in iOS; and, with just a little work, it can be easily -// formatted into a CSS `rgba()` string in JavaScript. This reference -// page doesn't have information about the absolute color space that -// should be used to interpret the RGB value—for example, sRGB, Adobe -// RGB, DCI-P3, and BT.2020. By default, applications should assume the -// sRGB color space. When color equality needs to be decided, -// implementations, unless documented otherwise, treat two colors as -// equal if all their red, green, blue, and alpha values each differ by -// at most `1e-5`. Example (Java): import com.google.type.Color; // ... -// public static java.awt.Color fromProto(Color protocolor) { float -// alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : -// 1.0; return new java.awt.Color( protocolor.getRed(), -// protocolor.getGreen(), protocolor.getBlue(), alpha); } public static -// Color toProto(java.awt.Color color) { float red = (float) -// color.getRed(); float green = (float) color.getGreen(); float blue = -// (float) color.getBlue(); float denominator = 255.0; Color.Builder -// resultBuilder = Color .newBuilder() .setRed(red / denominator) -// .setGreen(green / denominator) .setBlue(blue / denominator); int -// alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( -// FloatValue .newBuilder() .setValue(((float) alpha) / denominator) -// .build()); } return resultBuilder.build(); } // ... Example (iOS / -// Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float -// red = [protocolor red]; float green = [protocolor green]; float blue -// = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; -// float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper -// value]; } return [UIColor colorWithRed:red green:green blue:blue -// alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, -// green, blue, alpha; if (![color getRed:&red green:&green blue:&blue -// alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; -// [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; -// if (alpha <= 0.9999) { [result -// setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; -// return result; } // ... Example (JavaScript): // ... var -// protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red -// || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = -// rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green -// = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); -// if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, -// blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams -// = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', -// alphaFrac, ')'].join(”); }; var rgbToCssColor = function(red, green, -// blue) { var rgbNumber = new Number((red << 16) | (green << 8) | -// blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - -// hexString.length; var resultBuilder = ['#']; for (var i = 0; i < -// missingZeros; i++) { resultBuilder.push('0'); } -// resultBuilder.push(hexString); return resultBuilder.join(”); }; // -// ... -type Color struct { - // Alpha: The fraction of this color that should be applied to the - // pixel. That is, the final pixel color is defined by the equation: - // `pixel color = alpha * (this color) + (1.0 - alpha) * (background - // color)` This means that a value of 1.0 corresponds to a solid color, - // whereas a value of 0.0 corresponds to a completely transparent color. - // This uses a wrapper message rather than a simple float scalar so that - // it is possible to distinguish between a default value and the value - // being unset. If omitted, this color object is rendered as a solid - // color (as if the alpha value had been explicitly given a value of - // 1.0). - Alpha float64 `json:"alpha,omitempty"` - - // Blue: The amount of blue in the color as a value in the interval [0, - // 1]. - Blue float64 `json:"blue,omitempty"` - - // Green: The amount of green in the color as a value in the interval - // [0, 1]. - Green float64 `json:"green,omitempty"` - - // Red: The amount of red in the color as a value in the interval [0, - // 1]. - Red float64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Color) MarshalJSON() ([]byte, error) { - type NoMethod Color - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Color) UnmarshalJSON(data []byte) error { - type NoMethod Color - var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Alpha = float64(s1.Alpha) - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) - return nil -} - -// CpuMetric: Metric for billing reports. -type CpuMetric struct { - // CoreNumber: Required. Number of CPU cores. - CoreNumber int64 `json:"coreNumber,omitempty,string"` - - // CoreSec: Required. Total seconds of core usage, e.g. 4. - CoreSec int64 `json:"coreSec,omitempty,string"` - - // CpuType: Required. Type of cpu, e.g. N2. - // - // Possible values: - // "UNKNOWN_CPU_TYPE" - // "A2" - GPU-based machine, skip quota reporting. - // "A3" - GPU-based machine, skip quota reporting. - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - GPU-based machine, skip quota reporting. - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - CpuType string `json:"cpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreNumber") 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. "CoreNumber") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod CpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // DependencyEdge: Represents dependency parse tree information for a // token. (For more information on dependency labels, see // http://www.aclweb.org/anthology/P13-2017 @@ -1338,44 +901,6 @@ func (s *DependencyEdge) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type DiskMetric struct { - // DiskType: Required. Type of Disk, e.g. REGIONAL_SSD. - // - // Possible values: - // "UNKNOWN_DISK_TYPE" - // "REGIONAL_SSD" - // "REGIONAL_STORAGE" - // "PD_SSD" - // "PD_STANDARD" - // "STORAGE_SNAPSHOT" - DiskType string `json:"diskType,omitempty"` - - // GibSec: Required. Seconds of physical disk usage, e.g. 3600. - GibSec int64 `json:"gibSec,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DiskType") 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. "DiskType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskMetric) MarshalJSON() ([]byte, error) { - type NoMethod DiskMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Document: Represents the input to API methods. type Document struct { // Content: The content of the input in string format. Cloud audit @@ -1575,254 +1100,56 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GpuMetric struct { - // GpuSec: Required. Seconds of GPU usage, e.g. 3600. - GpuSec int64 `json:"gpuSec,omitempty,string"` - - // GpuType: Required. Type of GPU, e.g. NVIDIA_TESLA_V100. - // - // Possible values: - // "UNKNOWN_GPU_TYPE" - // "NVIDIA_TESLA_A100" - // "NVIDIA_A100_80GB" - // "NVIDIA_TESLA_K80" - // "NVIDIA_L4" - // "NVIDIA_TESLA_P100" - // "NVIDIA_TESLA_P4" - // "NVIDIA_TESLA_T4" - // "NVIDIA_TESLA_V100" - // "NVIDIA_H100_80GB" - GpuType string `json:"gpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GpuSec") 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. "GpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} +// Features: All available features for sentiment, syntax, and semantic +// analysis. Setting each one to true will enable that specific analysis +// for the input. +type Features struct { + // ClassificationModelOptions: Optional. The model options to use for + // classification. Defaults to v1 options if not specified. Only used if + // `classify_text` is set to true. + ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` -func (s *GpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod GpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // ClassifyText: Classify the full document into categories. + ClassifyText bool `json:"classifyText,omitempty"` -// InfraUsage: Infra Usage of billing metrics. Next ID: 6 -type InfraUsage struct { - // CpuMetrics: Aggregated core metrics since requested start_time. - CpuMetrics []*CpuMetric `json:"cpuMetrics,omitempty"` + // ExtractDocumentSentiment: Extract document-level sentiment. + ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - // DiskMetrics: Aggregated persistent disk metrics since requested - // start_time. - DiskMetrics []*DiskMetric `json:"diskMetrics,omitempty"` + // ExtractEntities: Extract entities. + ExtractEntities bool `json:"extractEntities,omitempty"` - // GpuMetrics: Aggregated gpu metrics since requested start_time. - GpuMetrics []*GpuMetric `json:"gpuMetrics,omitempty"` + // ExtractEntitySentiment: Extract entities and their associated + // sentiment. + ExtractEntitySentiment bool `json:"extractEntitySentiment,omitempty"` - // RamMetrics: Aggregated ram metrics since requested start_time. - RamMetrics []*RamMetric `json:"ramMetrics,omitempty"` + // ExtractSyntax: Extract syntax information. + ExtractSyntax bool `json:"extractSyntax,omitempty"` - // TpuMetrics: Aggregated tpu metrics since requested start_time. - TpuMetrics []*TpuMetric `json:"tpuMetrics,omitempty"` + // ModerateText: Moderate the document for harmful and sensitive + // categories. + ModerateText bool `json:"moderateText,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpuMetrics") 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. + // "ClassificationModelOptions") 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. "CpuMetrics") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. + // "ClassificationModelOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InfraUsage) MarshalJSON() ([]byte, error) { - type NoMethod InfraUsage +func (s *Features) MarshalJSON() ([]byte, error) { + type NoMethod Features raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2070,204 +1397,17 @@ func (s *PartOfSpeech) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RamMetric struct { - // GibSec: Required. VM memory in Gigabyte second, e.g. 3600. Using - // int64 type to match billing metrics definition. - GibSec int64 `json:"gibSec,omitempty,string"` +// Sentence: Represents a sentence in the input document. +type Sentence struct { + // Sentiment: For calls to AnalyzeSentiment or if + // AnnotateTextRequest.Features.extract_document_sentiment is set to + // true, this field will contain the sentiment for the sentence. + Sentiment *Sentiment `json:"sentiment,omitempty"` + + // Text: The sentence text. + Text *TextSpan `json:"text,omitempty"` - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // Memories: Required. VM memory in gb. - Memories float64 `json:"memories,omitempty"` - - // RamType: Required. Type of ram. - // - // Possible values: - // "UNKNOWN_RAM_TYPE" - // "A2" - // "A3" - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - RamType string `json:"ramType,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GibSec") to + // ForceSendFields is a list of field names (e.g. "Sentiment") 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 @@ -2275,8 +1415,8 @@ type RamMetric struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GibSec") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Sentiment") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2284,55 +1424,8 @@ type RamMetric struct { NullFields []string `json:"-"` } -func (s *RamMetric) MarshalJSON() ([]byte, error) { - type NoMethod RamMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *RamMetric) UnmarshalJSON(data []byte) error { - type NoMethod RamMetric - var s1 struct { - Memories gensupport.JSONFloat64 `json:"memories"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Memories = float64(s1.Memories) - return nil -} - -// Sentence: Represents a sentence in the input document. -type Sentence struct { - // Sentiment: For calls to AnalyzeSentiment or if - // AnnotateTextRequest.Features.extract_document_sentiment is set to - // true, this field will contain the sentiment for the sentence. - Sentiment *Sentiment `json:"sentiment,omitempty"` - - // Text: The sentence text. - Text *TextSpan `json:"text,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Sentiment") 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. "Sentiment") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Sentence) MarshalJSON() ([]byte, error) { - type NoMethod Sentence +func (s *Sentence) MarshalJSON() ([]byte, error) { + type NoMethod Sentence raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2505,123 +1598,25 @@ func (s *Token) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TpuMetric struct { - // TpuSec: Required. Seconds of TPU usage, e.g. 3600. - TpuSec int64 `json:"tpuSec,omitempty,string"` +// V1Model: Options for the V1 model. +type V1Model struct { +} - // TpuType: Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD. +// V2Model: Options for the V2 model. +type V2Model struct { + // ContentCategoriesVersion: The content categories used for + // classification. // // Possible values: - // "UNKNOWN_TPU_TYPE" - // "TPU_V2_POD" - // "TPU_V2" - // "TPU_V3_POD" - // "TPU_V3" - // "TPU_V5_LITEPOD" - TpuType string `json:"tpuType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TpuSec") 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. "TpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod TpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSArrayStats: The data statistics of a series of ARRAY values. -type XPSArrayStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // MemberStats: Stats of all the values of all arrays, as if they were a - // single long series of data. The type depends on the element type of - // the array. - MemberStats *XPSDataStats `json:"memberStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSArrayStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSArrayStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSBatchPredictResponse struct { - // ExampleSet: Examples for batch prediction result. Under full API - // implementation, results are stored in shared RecordIO of - // AnnotatedExample protobufs, the annotations field of which is - // populated by XPS backend. - ExampleSet *XPSExampleSet `json:"exampleSet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleSet") 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. "ExampleSet") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSBatchPredictResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSBatchPredictResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSBoundingBoxMetricsEntry: Bounding box matching model metrics for a -// single intersection-over-union threshold and multiple label match -// confidence thresholds. -type XPSBoundingBoxMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSBoundingBoxMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: The intersection-over-union threshold value used to - // compute this metrics entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` + // "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" - If + // `ContentCategoriesVersion` is not specified, this option will default + // to `V1`. + // "V1" - Legacy content categories of our initial launch in 2017. + // "V2" - Updated content categories in 2022. + ContentCategoriesVersion string `json:"contentCategoriesVersion,omitempty"` // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") to unconditionally include in API + // "ContentCategoriesVersion") 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 @@ -2629,7 +1624,7 @@ type XPSBoundingBoxMetricsEntry struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") + // NullFields is a list of field names (e.g. "ContentCategoriesVersion") // to include in API requests with the JSON null value. By default, // fields with empty values are omitted from API requests. However, any // field with an empty value appearing in NullFields will be sent to the @@ -2639,5017 +1634,8 @@ type XPSBoundingBoxMetricsEntry struct { NullFields []string `json:"-"` } -func (s *XPSBoundingBoxMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSBoundingBoxMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSBoundingBoxMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSCategoryStats: The data statistics of a series of CATEGORY values. -type XPSCategoryStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopCategoryStats: The statistics of the top 20 CATEGORY values, - // ordered by CategoryStats.SingleCategoryStats.count. - TopCategoryStats []*XPSCategoryStatsSingleCategoryStats `json:"topCategoryStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCategoryStatsSingleCategoryStats: The statistics of a single -// CATEGORY value. -type XPSCategoryStatsSingleCategoryStats struct { - // Count: The number of occurrences of this value in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The CATEGORY value. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStatsSingleCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStatsSingleCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSClassificationEvaluationMetrics: Model evaluation metrics for -// classification problems. It can be used for image and video -// classification. Next tag: 9. -type XPSClassificationEvaluationMetrics struct { - // AuPrc: The Area under precision recall curve metric. - AuPrc float64 `json:"auPrc,omitempty"` - - // AuRoc: The Area Under Receiver Operating Characteristic curve metric. - // Micro-averaged for the overall evaluation. - AuRoc float64 `json:"auRoc,omitempty"` - - // BaseAuPrc: The Area under precision recall curve metric based on - // priors. - BaseAuPrc float64 `json:"baseAuPrc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the evaluation. Only set for - // MULTICLASS classification problems where number of annotation specs - // is no more than 10. Only set for model level evaluation, not for - // evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // EvaluatedExamplesCount: The number of examples used for model - // evaluation. - EvaluatedExamplesCount int64 `json:"evaluatedExamplesCount,omitempty"` - - // LogLoss: The Log Loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuPrc") 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. "AuPrc") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSClassificationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSClassificationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSClassificationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSClassificationEvaluationMetrics - var s1 struct { - AuPrc gensupport.JSONFloat64 `json:"auPrc"` - AuRoc gensupport.JSONFloat64 `json:"auRoc"` - BaseAuPrc gensupport.JSONFloat64 `json:"baseAuPrc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AuPrc = float64(s1.AuPrc) - s.AuRoc = float64(s1.AuRoc) - s.BaseAuPrc = float64(s1.BaseAuPrc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSColorMap: Map from color to display name. Will only be used by -// Image Segmentation for uCAIP. -type XPSColorMap struct { - // AnnotationSpecIdToken: Should be used during training. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Color: This type is deprecated in favor of the IntColor below. This - // is because google.type.Color represent color has a float which - // semantically does not reflect discrete classes/categories concept. - // Moreover, to handle it well we need to have some tolerance when - // converting to a discretized color. As such, the recommendation is to - // have API surface still use google.type.Color while internally - // IntColor is used. - Color *Color `json:"color,omitempty"` - - // DisplayName: Should be used during preprocessing. - DisplayName string `json:"displayName,omitempty"` - - IntColor *XPSColorMapIntColor `json:"intColor,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMap) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMap - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColorMapIntColor: RGB color and each channel is represented by an -// integer. -type XPSColorMapIntColor struct { - // Blue: The value should be in range of [0, 255]. - Blue int64 `json:"blue,omitempty"` - - // Green: The value should be in range of [0, 255]. - Green int64 `json:"green,omitempty"` - - // Red: The value should be in range of [0, 255]. - Red int64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Blue") 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. "Blue") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMapIntColor) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMapIntColor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSColumnSpec struct { - // ColumnId: The unique id of the column. When Preprocess, the Tables BE - // will popuate the order id of the column, which reflects the order of - // the column inside the table, i.e. 0 means the first column in the - // table, N-1 means the last column. AutoML BE will persist this order - // id in Spanner and set the order id here when calling - // RefreshTablesStats and Train. Note: it's different than the - // column_spec_id that is generated in AutoML BE. - ColumnId int64 `json:"columnId,omitempty"` - - // DataStats: The data stats of the column. It's outputed in - // RefreshTablesStats and a required input for Train. - DataStats *XPSDataStats `json:"dataStats,omitempty"` - - // DataType: The data type of the column. It's outputed in Preprocess - // rpc and a required input for RefreshTablesStats and Train. - DataType *XPSDataType `json:"dataType,omitempty"` - - // DisplayName: The display name of the column. It's outputed in - // Preprocess and a required input for RefreshTablesStats and Train. - DisplayName string `json:"displayName,omitempty"` - - ForecastingMetadata *XPSColumnSpecForecastingMetadata `json:"forecastingMetadata,omitempty"` - - // TopCorrelatedColumns: It's outputed in RefreshTablesStats, and a - // required input in Train. - TopCorrelatedColumns []*XPSColumnSpecCorrelatedColumn `json:"topCorrelatedColumns,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecCorrelatedColumn: Identifies a table's column, and its -// correlation with the column this ColumnSpec describes. -type XPSColumnSpecCorrelatedColumn struct { - ColumnId int64 `json:"columnId,omitempty"` - - CorrelationStats *XPSCorrelationStats `json:"correlationStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecCorrelatedColumn) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecCorrelatedColumn - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecForecastingMetadata: -// ====================================================================== -// ===== # The fields below are used exclusively for Forecasting. -type XPSColumnSpecForecastingMetadata struct { - // ColumnType: The type of the column for FORECASTING model training - // purposes. - // - // Possible values: - // "COLUMN_TYPE_UNSPECIFIED" - An un-set value of this enum. - // "KEY" - Key columns are used to identify timeseries. - // "KEY_METADATA" - This column contains information describing static - // properties of the entities identified by the key column(s) (e.g. - // city's ZIP code). - // "TIME_SERIES_AVAILABLE_PAST_ONLY" - This column contains - // information for the given entity, at any time poinrt, they are only - // available in the time series before. - // "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - This column contains - // information for the given entity is known both for the past and the - // sufficiently far future. - ColumnType string `json:"columnType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnType") 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. "ColumnType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecForecastingMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecForecastingMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCommonStats: Common statistics for a column with a specified data -// type. -type XPSCommonStats struct { - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DistinctValueCount") - // 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. "DistinctValueCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSCommonStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCommonStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfidenceMetricsEntry: ConfidenceMetricsEntry includes generic -// precision, recall, f1 score etc. Next tag: 16. -type XPSConfidenceMetricsEntry struct { - // ConfidenceThreshold: Metrics are computed with an assumption that the - // model never return predictions with score lower than this value. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // F1ScoreAt1: The harmonic mean of recall_at1 and precision_at1. - F1ScoreAt1 float64 `json:"f1ScoreAt1,omitempty"` - - // FalseNegativeCount: The number of ground truth labels that are not - // matched by a model created label. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: The number of model created labels that do not - // match a ground truth label. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: False Positive Rate for the given confidence - // threshold. - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // FalsePositiveRateAt1: The False Positive Rate when only considering - // the label that has the highest prediction score and not below the - // confidence threshold for each example. - FalsePositiveRateAt1 float64 `json:"falsePositiveRateAt1,omitempty"` - - // PositionThreshold: Metrics are computed with an assumption that the - // model always returns at most this many predictions (ordered by their - // score, descendingly), but they all still need to meet the - // confidence_threshold. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // PrecisionAt1: The precision when only considering the label that has - // the highest prediction score and not below the confidence threshold - // for each example. - PrecisionAt1 float64 `json:"precisionAt1,omitempty"` - - // Recall: Recall (true positive rate) for the given confidence - // threshold. - Recall float64 `json:"recall,omitempty"` - - // RecallAt1: The recall (true positive rate) when only considering the - // label that has the highest prediction score and not below the - // confidence threshold for each example. - RecallAt1 float64 `json:"recallAt1,omitempty"` - - // TrueNegativeCount: The number of labels that were not created by the - // model, but if they would, they would not match a ground truth label. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: The number of model created labels that match a - // ground truth label. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - F1ScoreAt1 gensupport.JSONFloat64 `json:"f1ScoreAt1"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - FalsePositiveRateAt1 gensupport.JSONFloat64 `json:"falsePositiveRateAt1"` - Precision gensupport.JSONFloat64 `json:"precision"` - PrecisionAt1 gensupport.JSONFloat64 `json:"precisionAt1"` - Recall gensupport.JSONFloat64 `json:"recall"` - RecallAt1 gensupport.JSONFloat64 `json:"recallAt1"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.F1ScoreAt1 = float64(s1.F1ScoreAt1) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.FalsePositiveRateAt1 = float64(s1.FalsePositiveRateAt1) - s.Precision = float64(s1.Precision) - s.PrecisionAt1 = float64(s1.PrecisionAt1) - s.Recall = float64(s1.Recall) - s.RecallAt1 = float64(s1.RecallAt1) - return nil -} - -// XPSConfusionMatrix: Confusion matrix of the model running the -// classification. -type XPSConfusionMatrix struct { - // AnnotationSpecIdToken: For the following three repeated fields, only - // one is intended to be set. annotation_spec_id_token is preferable to - // be set. ID tokens of the annotation specs used in the confusion - // matrix. - AnnotationSpecIdToken []string `json:"annotationSpecIdToken,omitempty"` - - // Category: Category (mainly for segmentation). Set only for image - // segmentation models. Note: uCAIP Image Segmentation should use - // annotation_spec_id_token. - Category []int64 `json:"category,omitempty"` - - // Row: Rows in the confusion matrix. The number of rows is equal to the - // size of `annotation_spec_id_token`. `row[i].value[j]` is the number - // of examples that have ground truth of the - // `annotation_spec_id_token[i]` and are predicted as - // `annotation_spec_id_token[j]` by the model being evaluated. - Row []*XPSConfusionMatrixRow `json:"row,omitempty"` - - // SentimentLabel: Sentiment labels used in the confusion matrix. Set - // only for text sentiment models. For AutoML Text Revamp, use - // `annotation_spec_id_token` instead and leave this field empty. - SentimentLabel []int64 `json:"sentimentLabel,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrix) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrix - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfusionMatrixRow: A row in the confusion matrix. -type XPSConfusionMatrixRow struct { - // Count: Same as above except intended to represent other counts (for - // e.g. for segmentation this is pixel count). NOTE(params): Only - // example_count or count is set (oneoff does not support repeated - // fields unless they are embedded inside another message). - Count googleapi.Int64s `json:"count,omitempty"` - - // ExampleCount: Value of the specific cell in the confusion matrix. The - // number of values each row has (i.e. the length of the row) is equal - // to the length of the annotation_spec_id_token field. - ExampleCount []int64 `json:"exampleCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrixRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrixRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCoreMlFormat: A model format used for iOS mobile devices. -type XPSCoreMlFormat struct { -} - -// XPSCorrelationStats: A correlation statistics between two series of -// DataType values. The series may have differing DataType-s, but within -// a single series the DataType must be the same. -type XPSCorrelationStats struct { - // CramersV: The correlation value using the Cramer's V measure. - CramersV float64 `json:"cramersV,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CramersV") 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. "CramersV") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCorrelationStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCorrelationStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSCorrelationStats) UnmarshalJSON(data []byte) error { - type NoMethod XPSCorrelationStats - var s1 struct { - CramersV gensupport.JSONFloat64 `json:"cramersV"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CramersV = float64(s1.CramersV) - return nil -} - -// XPSDataErrors: Different types of errors and the stats associatesd -// with each error. -type XPSDataErrors struct { - // Count: Number of records having errors associated with the enum. - Count int64 `json:"count,omitempty"` - - // ErrorType: Type of the error. - // - // Possible values: - // "ERROR_TYPE_UNSPECIFIED" - Not specified. - // "UNSUPPORTED_AUDIO_FORMAT" - Audio format not in the formats by - // cloud-speech AutoML. Currently only wav and flac file formats are - // supported. - // "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT" - File format differnt - // from what is specified in the file name extension. - // "FILE_TOO_LARGE" - File too large. Maximum allowed size is 50 MB. - // "MISSING_TRANSCRIPTION" - Transcript is missing. - ErrorType string `json:"errorType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataErrors) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataStats: The data statistics of a series of values that share -// the same DataType. -type XPSDataStats struct { - // ArrayStats: The statistics for ARRAY DataType. - ArrayStats *XPSArrayStats `json:"arrayStats,omitempty"` - - // CategoryStats: The statistics for CATEGORY DataType. - CategoryStats *XPSCategoryStats `json:"categoryStats,omitempty"` - - // DistinctValueCount: The number of distinct values. - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - // Float64Stats: The statistics for FLOAT64 DataType. - Float64Stats *XPSFloat64Stats `json:"float64Stats,omitempty"` - - // NullValueCount: The number of values that are null. - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - // StringStats: The statistics for STRING DataType. - StringStats *XPSStringStats `json:"stringStats,omitempty"` - - // StructStats: The statistics for STRUCT DataType. - StructStats *XPSStructStats `json:"structStats,omitempty"` - - // TimestampStats: The statistics for TIMESTAMP DataType. - TimestampStats *XPSTimestampStats `json:"timestampStats,omitempty"` - - // ValidValueCount: The number of values that are valid. - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ArrayStats") 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. "ArrayStats") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataType: Indicated the type of data that can be stored in a -// structured data entity (e.g. a table). -type XPSDataType struct { - // CompatibleDataTypes: The highly compatible data types to this data - // type. - CompatibleDataTypes []*XPSDataType `json:"compatibleDataTypes,omitempty"` - - // ListElementType: If type_code == ARRAY, then `list_element_type` is - // the type of the elements. - ListElementType *XPSDataType `json:"listElementType,omitempty"` - - // Nullable: If true, this DataType can also be `null`. - Nullable bool `json:"nullable,omitempty"` - - // StructType: If type_code == STRUCT, then `struct_type` provides type - // information for the struct's fields. - StructType *XPSStructType `json:"structType,omitempty"` - - // TimeFormat: If type_code == TIMESTAMP then `time_format` provides the - // format in which that time field is expressed. The time_format must be - // written in `strftime` syntax. If time_format is not set, then the - // default format as described on the field is used. - TimeFormat string `json:"timeFormat,omitempty"` - - // TypeCode: Required. The TypeCode for this type. - // - // Possible values: - // "TYPE_CODE_UNSPECIFIED" - Not specified. Should not be used. - // "FLOAT64" - Encoded as `number`, or the strings "NaN", - // "Infinity", or "-Infinity". - // "TIMESTAMP" - Must be between 0AD and 9999AD. Encoded as `string` - // according to time_format, or, if that format is not set, then in RFC - // 3339 `date-time` format, where `time-offset` = "Z" (e.g. - // 1985-04-12T23:20:50.52Z). - // "STRING" - Encoded as `string`. - // "ARRAY" - Encoded as `list`, where the list elements are - // represented according to list_element_type. - // "STRUCT" - Encoded as `struct`, where field values are represented - // according to struct_type. - // "CATEGORY" - Values of this type are not further understood by - // AutoML, e.g. AutoML is unable to tell the order of values (as it - // could with FLOAT64), or is unable to say if one value contains - // another (as it could with STRING). Encoded as `string` (bytes should - // be base64-encoded, as described in RFC 4648, section 4). - TypeCode string `json:"typeCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CompatibleDataTypes") - // 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. "CompatibleDataTypes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataType) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDockerFormat: A model format used for Docker containers. Use the -// params field to customize the container. The container is verified to -// work correctly on ubuntu 16.04 operating system. -type XPSDockerFormat struct { - // CpuArchitecture: Optional. Additional cpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "CPU_ARCHITECTURE_UNSPECIFIED" - // "CPU_ARCHITECTURE_X86_64" - CpuArchitecture string `json:"cpuArchitecture,omitempty"` - - // GpuArchitecture: Optional. Additional gpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "GPU_ARCHITECTURE_UNSPECIFIED" - // "GPU_ARCHITECTURE_NVIDIA" - GpuArchitecture string `json:"gpuArchitecture,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CpuArchitecture") 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. "CpuArchitecture") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDockerFormat) MarshalJSON() ([]byte, error) { - type NoMethod XPSDockerFormat - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEdgeTpuTfLiteFormat: A model format used for Edge TPU -// (https://cloud.google.com/edge-tpu/) devices. -type XPSEdgeTpuTfLiteFormat struct { -} - -// XPSEvaluationMetrics: Contains xPS-specific model evaluation metrics -// either for a single annotation spec (label), or for the model -// overall. Next tag: 18. -type XPSEvaluationMetrics struct { - // AnnotationSpecIdToken: The annotation_spec for which this evaluation - // metrics instance had been created. Empty iff this is an overall model - // evaluation (like Tables evaluation metrics), i.e. aggregated across - // all labels. The value comes from the input annotations in - // AnnotatedExample. For MVP product or for text sentiment models where - // annotation_spec_id_token is not available, set label instead. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Category: The integer category label for which this evaluation metric - // instance had been created. Valid categories are 0 or higher. Overall - // model evaluation should set this to negative values (rather than - // implicit zero). Only used for Image Segmentation (prefer to set - // annotation_spec_id_token instead). Note: uCAIP Image Segmentation - // should use annotation_spec_id_token. - Category int64 `json:"category,omitempty"` - - // EvaluatedExampleCount: The number of examples used to create this - // evaluation metrics instance. - EvaluatedExampleCount int64 `json:"evaluatedExampleCount,omitempty"` - - ImageClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"imageClassificationEvalMetrics,omitempty"` - - ImageObjectDetectionEvalMetrics *XPSImageObjectDetectionEvaluationMetrics `json:"imageObjectDetectionEvalMetrics,omitempty"` - - ImageSegmentationEvalMetrics *XPSImageSegmentationEvaluationMetrics `json:"imageSegmentationEvalMetrics,omitempty"` - - // Label: The label for which this evaluation metrics instance had been - // created. Empty iff this is an overall model evaluation (like Tables - // evaluation metrics), i.e. aggregated across all labels. The label - // maps to AnnotationSpec.display_name in Public API protos. Only used - // by MVP implementation and text sentiment FULL implementation. - Label string `json:"label,omitempty"` - - RegressionEvalMetrics *XPSRegressionEvaluationMetrics `json:"regressionEvalMetrics,omitempty"` - - TablesClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"tablesClassificationEvalMetrics,omitempty"` - - TablesEvalMetrics *XPSTablesEvaluationMetrics `json:"tablesEvalMetrics,omitempty"` - - TextClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"textClassificationEvalMetrics,omitempty"` - - TextExtractionEvalMetrics *XPSTextExtractionEvaluationMetrics `json:"textExtractionEvalMetrics,omitempty"` - - TextSentimentEvalMetrics *XPSTextSentimentEvaluationMetrics `json:"textSentimentEvalMetrics,omitempty"` - - TranslationEvalMetrics *XPSTranslationEvaluationMetrics `json:"translationEvalMetrics,omitempty"` - - VideoActionRecognitionEvalMetrics *XPSVideoActionRecognitionEvaluationMetrics `json:"videoActionRecognitionEvalMetrics,omitempty"` - - VideoClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"videoClassificationEvalMetrics,omitempty"` - - VideoObjectTrackingEvalMetrics *XPSVideoObjectTrackingEvaluationMetrics `json:"videoObjectTrackingEvalMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEvaluationMetricsSet: Specifies location of model evaluation -// metrics. -type XPSEvaluationMetricsSet struct { - // EvaluationMetrics: Inline EvaluationMetrics - should be relatively - // small. For passing large quantities of exhaustive metrics, use - // file_spec. - EvaluationMetrics []*XPSEvaluationMetrics `json:"evaluationMetrics,omitempty"` - - // FileSpec: File spec containing evaluation metrics of a model, must - // point to RecordIO file(s) of - // intelligence.cloud.automl.xps.EvaluationMetrics messages. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // NumEvaluationMetrics: Number of the evaluation metrics (usually one - // per label plus overall). - NumEvaluationMetrics int64 `json:"numEvaluationMetrics,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "EvaluationMetrics") - // 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. "EvaluationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetricsSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetricsSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSExampleSet: Set of examples or input sources. -type XPSExampleSet struct { - // FileSpec: File spec of the examples or input sources. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // Fingerprint: Fingerprint of the example set. - Fingerprint int64 `json:"fingerprint,omitempty,string"` - - // NumExamples: Number of examples. - NumExamples int64 `json:"numExamples,omitempty,string"` - - // NumInputSources: Number of input sources. - NumInputSources int64 `json:"numInputSources,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "FileSpec") 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. "FileSpec") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExampleSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSExampleSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSExportModelOutputConfig struct { - CoreMlFormat *XPSCoreMlFormat `json:"coreMlFormat,omitempty"` - - DockerFormat *XPSDockerFormat `json:"dockerFormat,omitempty"` - - EdgeTpuTfLiteFormat *XPSEdgeTpuTfLiteFormat `json:"edgeTpuTfLiteFormat,omitempty"` - - // ExportFirebaseAuxiliaryInfo: For any model and format: If true, will - // additionally export FirebaseExportedModelInfo in a firebase.txt file. - ExportFirebaseAuxiliaryInfo bool `json:"exportFirebaseAuxiliaryInfo,omitempty"` - - // OutputGcrUri: The Google Contained Registry (GCR) path the exported - // files to be pushed to. This location is set if the exported format is - // DOCKDER. - OutputGcrUri string `json:"outputGcrUri,omitempty"` - - // OutputGcsUri: The Google Cloud Storage (GCS) directory where XPS will - // output the exported models and related files. Format: - // gs://bucket/directory - OutputGcsUri string `json:"outputGcsUri,omitempty"` - - TfJsFormat *XPSTfJsFormat `json:"tfJsFormat,omitempty"` - - TfLiteFormat *XPSTfLiteFormat `json:"tfLiteFormat,omitempty"` - - TfSavedModelFormat *XPSTfSavedModelFormat `json:"tfSavedModelFormat,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreMlFormat") 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. "CoreMlFormat") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExportModelOutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSExportModelOutputConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFileSpec: Spec of input and output files, on external file systems -// (CNS, GCS, etc). -type XPSFileSpec struct { - // DirectoryPath: Deprecated. Use file_spec. - DirectoryPath string `json:"directoryPath,omitempty"` - - // Possible values: - // "FILE_FORMAT_UNKNOWN" - // "FILE_FORMAT_SSTABLE" - // "FILE_FORMAT_TRANSLATION_RKV" - Internal format for parallel text - // data used by Google Translate. go/rkvtools - // "FILE_FORMAT_RECORDIO" - // "FILE_FORMAT_RAW_CSV" - Only the lexicographically first file - // described by the file_spec contains the header line. - // "FILE_FORMAT_RAW_CAPACITOR" - FileFormat string `json:"fileFormat,omitempty"` - - // FileSpec: Single file path, or file pattern of format - // "/path/to/file@shard_count". E.g. /cns/cell-d/somewhere/file@2 is - // expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and - // /cns/cell-d/somewhere/file-00001-of-00002. - FileSpec string `json:"fileSpec,omitempty"` - - // SingleFilePath: Deprecated. Use file_spec. - SingleFilePath string `json:"singleFilePath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DirectoryPath") 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. "DirectoryPath") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFileSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSFileSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFloat64Stats: The data statistics of a series of FLOAT64 values. -type XPSFloat64Stats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // HistogramBuckets: Histogram buckets of the data series. Sorted by the - // min value of the bucket, ascendingly, and the number of the buckets - // is dynamically generated. The buckets are non-overlapping and - // completely cover whole FLOAT64 range with min of first bucket being - // "-Infinity", and max of the last one being "Infinity". - HistogramBuckets []*XPSFloat64StatsHistogramBucket `json:"histogramBuckets,omitempty"` - - // Mean: The mean of the series. - Mean float64 `json:"mean,omitempty"` - - // Quantiles: Ordered from 0 to k k-quantile values of the data series - // of n values. The value at index i is, approximately, the i*n/k-th - // smallest value in the series; for i = 0 and i = k these are, - // respectively, the min and max values. - Quantiles []float64 `json:"quantiles,omitempty"` - - // StandardDeviation: The standard deviation of the series. - StandardDeviation float64 `json:"standardDeviation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64Stats) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64Stats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64Stats) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64Stats - var s1 struct { - Mean gensupport.JSONFloat64 `json:"mean"` - Quantiles []gensupport.JSONFloat64 `json:"quantiles"` - StandardDeviation gensupport.JSONFloat64 `json:"standardDeviation"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Mean = float64(s1.Mean) - s.Quantiles = make([]float64, len(s1.Quantiles)) - for i := range s1.Quantiles { - s.Quantiles[i] = float64(s1.Quantiles[i]) - } - s.StandardDeviation = float64(s1.StandardDeviation) - return nil -} - -// XPSFloat64StatsHistogramBucket: A bucket of a histogram. -type XPSFloat64StatsHistogramBucket struct { - // Count: The number of data values that are in the bucket, i.e. are - // between min and max values. - Count int64 `json:"count,omitempty,string"` - - // Max: The maximum value of the bucket, exclusive unless max = - // "Infinity", in which case it's inclusive. - Max float64 `json:"max,omitempty"` - - // Min: The minimum value of the bucket, inclusive. - Min float64 `json:"min,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64StatsHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64StatsHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64StatsHistogramBucket) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64StatsHistogramBucket - 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 XPSImageClassificationTrainResponse struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - // ExportModelSpec: Information of downloadable models that are - // pre-generated as part of training flow and will be persisted in - // AutoMl backend. Populated for AutoMl requests. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostInNodeTime: The actual cost to create this model. - For edge - // type model, the cost is expressed in node hour. - For cloud type - // model,the cost is expressed in compute hour. - Populated for models - // created before GA. To be deprecated after GA. - TrainCostInNodeTime string `json:"trainCostInNodeTime,omitempty"` - - // TrainCostNodeSeconds: The actual training cost, expressed in node - // seconds. Populated for models trained in node time. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") 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. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSImageExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") 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. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelArtifactSpec: Stores the locations and related metadata -// of the model artifacts. Populated for uCAIP requests only. -type XPSImageModelArtifactSpec struct { - // CheckpointArtifact: The Tensorflow checkpoint files. e.g. Used for - // resumable training. - CheckpointArtifact *XPSModelArtifactItem `json:"checkpointArtifact,omitempty"` - - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // LabelGcsUri: GCS uri of decoded labels file for model export - // 'dict.txt'. - LabelGcsUri string `json:"labelGcsUri,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // TfJsBinaryGcsPrefix: GCS uri prefix of Tensorflow JavaScript binary - // files 'groupX-shardXofX.bin' Deprecated. - TfJsBinaryGcsPrefix string `json:"tfJsBinaryGcsPrefix,omitempty"` - - // TfLiteMetadataGcsUri: GCS uri of Tensorflow Lite metadata - // 'tflite_metadata.json'. - TfLiteMetadataGcsUri string `json:"tfLiteMetadataGcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CheckpointArtifact") - // 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. "CheckpointArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelServingSpec: Serving specification for image models. -type XPSImageModelServingSpec struct { - // ModelThroughputEstimation: Populate under uCAIP request scope. - ModelThroughputEstimation []*XPSImageModelServingSpecModelThroughputEstimation `json:"modelThroughputEstimation,omitempty"` - - // NodeQps: An estimated value of how much traffic a node can serve. - // Populated for AutoMl request only. - NodeQps float64 `json:"nodeQps,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ModelThroughputEstimation") 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. - // "ModelThroughputEstimation") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpec) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpec - var s1 struct { - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.NodeQps = float64(s1.NodeQps) - return nil -} - -type XPSImageModelServingSpecModelThroughputEstimation struct { - // Possible values: - // "UNSPECIFIED" - // "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU. - // "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU. - // "NVIDIA_TESLA_V100" - Nvidia Tesla V100 GPU. - // "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU. - // "NVIDIA_TESLA_T4" - Nvidia Tesla T4 GPU. - // "NVIDIA_TESLA_A100" - Nvidia Tesla A100 GPU. - // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. - // "NVIDIA_L4" - Nvidia L4 GPU. - // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. - // "TPU_V2" - TPU v2 (JellyFish). - // "TPU_V3" - TPU v3 (DragonFish). - // "TPU_V4_POD" - TPU_v4 (PufferFish). - // "TPU_V5_LITEPOD" - TPU v5 Lite Pods. - ComputeEngineAcceleratorType string `json:"computeEngineAcceleratorType,omitempty"` - - // LatencyInMilliseconds: Estimated latency. - LatencyInMilliseconds float64 `json:"latencyInMilliseconds,omitempty"` - - // NodeQps: The approximate qps a deployed node can serve. - NodeQps float64 `json:"nodeQps,omitempty"` - - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - ServomaticPartitionType string `json:"servomaticPartitionType,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ComputeEngineAcceleratorType") 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. - // "ComputeEngineAcceleratorType") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - var s1 struct { - LatencyInMilliseconds gensupport.JSONFloat64 `json:"latencyInMilliseconds"` - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LatencyInMilliseconds = float64(s1.LatencyInMilliseconds) - s.NodeQps = float64(s1.NodeQps) - return nil -} - -// XPSImageObjectDetectionEvaluationMetrics: Model evaluation metrics -// for image object detection problems. Evaluates prediction quality of -// labeled bounding boxes. -type XPSImageObjectDetectionEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: The single metric for bounding boxes - // evaluation: the mean_average_precision averaged over all - // bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: The bounding boxes match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence - // threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingBoxCount: The total number of bounding boxes (i.e. - // summed over all images) the ground truth used to create this - // evaluation had. - EvaluatedBoundingBoxCount int64 `json:"evaluatedBoundingBoxCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") 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. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - return nil -} - -type XPSImageObjectDetectionModelSpec struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // MaxBoundingBoxCount: Max number of bounding box. - MaxBoundingBoxCount int64 `json:"maxBoundingBoxCount,omitempty,string"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") 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. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetrics: Model evaluation metrics for -// image segmentation problems. Next tag: 4. -type XPSImageSegmentationEvaluationMetrics struct { - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry: Metrics -// for a single confidence threshold. -type XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // ConfusionMatrix: Confusion matrix of the per confidence_threshold - // evaluation. Pixel counts are set here. Only set for model level - // evaluation, not for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // DiceScoreCoefficient: DSC or the F1 score: The harmonic mean of - // recall and precision. - DiceScoreCoefficient float64 `json:"diceScoreCoefficient,omitempty"` - - // IouScore: IOU score. - IouScore float64 `json:"iouScore,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - DiceScoreCoefficient gensupport.JSONFloat64 `json:"diceScoreCoefficient"` - IouScore gensupport.JSONFloat64 `json:"iouScore"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.DiceScoreCoefficient = float64(s1.DiceScoreCoefficient) - s.IouScore = float64(s1.IouScore) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -type XPSImageSegmentationTrainResponse struct { - // ColorMaps: Color map of the model. - ColorMaps []*XPSColorMap `json:"colorMaps,omitempty"` - - // ExportModelSpec: NOTE: These fields are not used/needed in EAP but - // will be set later. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. Model artifact spec stores and model gcs pathes and - // related metadata - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColorMaps") 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. "ColorMaps") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSIntegratedGradientsAttribution: An attribution method that -// computes the Aumann-Shapley value taking advantage of the model's -// fully differentiable structure. Refer to this paper for more details: -// https://arxiv.org/abs/1703.01365 -type XPSIntegratedGradientsAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is within the desired error range. Valid range of its - // value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") 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. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSIntegratedGradientsAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSIntegratedGradientsAttribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSMetricEntry struct { - // ArgentumMetricId: For billing metrics that are using legacy sku's, - // set the legacy billing metric id here. This will be sent to Chemist - // as the "cloudbilling.googleapis.com/argentum_metric_id" label. - // Otherwise leave empty. - ArgentumMetricId string `json:"argentumMetricId,omitempty"` - - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - - // Int64Value: A signed 64-bit integer value. - Int64Value int64 `json:"int64Value,omitempty,string"` - - // MetricName: The metric name defined in the service configuration. - MetricName string `json:"metricName,omitempty"` - - // SystemLabels: Billing system labels for this (metric, value) pair. - SystemLabels []*XPSMetricEntryLabel `json:"systemLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArgentumMetricId") 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. "ArgentumMetricId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSMetricEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSMetricEntry - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil -} - -type XPSMetricEntryLabel struct { - // LabelName: The name of the label. - LabelName string `json:"labelName,omitempty"` - - // LabelValue: The value of the label. - LabelValue string `json:"labelValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelName") 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. "LabelName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntryLabel) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntryLabel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSModelArtifactItem: A single model artifact item. -type XPSModelArtifactItem struct { - // ArtifactFormat: The model artifact format. - // - // Possible values: - // "ARTIFACT_FORMAT_UNSPECIFIED" - Should not be used. - // "TF_CHECKPOINT" - The Tensorflow checkpoints. See - // https://www.tensorflow.org/guide/checkpoint. - // "TF_SAVED_MODEL" - The Tensorflow SavedModel binary. - // "TF_LITE" - Model artifact in generic TensorFlow Lite (.tflite) - // format. See https://www.tensorflow.org/lite. - // "EDGE_TPU_TF_LITE" - Used for [Edge - // TPU](https://cloud.google.com/edge-tpu/) devices. - // "TF_JS" - A [TensorFlow.js](https://www.tensorflow.org/js) model - // that can be used in the browser and in Node.js using JavaScript. - // "CORE_ML" - Used for iOS mobile devices in (.mlmodel) format. See - // https://developer.apple.com/documentation/coreml - ArtifactFormat string `json:"artifactFormat,omitempty"` - - // GcsUri: The Google Cloud Storage (GCS) uri that stores the model - // binary files. - GcsUri string `json:"gcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArtifactFormat") 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. "ArtifactFormat") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSModelArtifactItem) MarshalJSON() ([]byte, error) { - type NoMethod XPSModelArtifactItem - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSPreprocessResponse: Next ID: 8 -type XPSPreprocessResponse struct { - // OutputExampleSet: Preprocessed examples, that are to be imported into - // AutoML storage. This should point to RecordIO file(s) of - // PreprocessedExample messages. The - // PreprocessedExample.mvp_training_data-s returned here are later - // verbatim passed to Train() call in TrainExample.mvp_training_data. - OutputExampleSet *XPSExampleSet `json:"outputExampleSet,omitempty"` - - SpeechPreprocessResp *XPSSpeechPreprocessResponse `json:"speechPreprocessResp,omitempty"` - - TablesPreprocessResponse *XPSTablesPreprocessResponse `json:"tablesPreprocessResponse,omitempty"` - - TranslationPreprocessResp *XPSTranslationPreprocessResponse `json:"translationPreprocessResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExampleSet") 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. "OutputExampleSet") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSRegressionEvaluationMetrics: Model evaluation metrics for -// regression problems. It can be used for Tables. -type XPSRegressionEvaluationMetrics struct { - // MeanAbsoluteError: Mean Absolute Error (MAE). - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error. Only set - // if all ground truth values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root Mean Squared Error (RMSE). - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // 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. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionEvaluationMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -// XPSRegressionMetricsEntry: A pair of actual & observed values for the -// model being evaluated. -type XPSRegressionMetricsEntry struct { - // PredictedValue: The observed value for a row in the dataset. - PredictedValue float64 `json:"predictedValue,omitempty"` - - // TrueValue: The actual target value for a row in the dataset. - TrueValue float64 `json:"trueValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PredictedValue") 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. "PredictedValue") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionMetricsEntry - var s1 struct { - PredictedValue gensupport.JSONFloat64 `json:"predictedValue"` - TrueValue gensupport.JSONFloat64 `json:"trueValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PredictedValue = float64(s1.PredictedValue) - s.TrueValue = float64(s1.TrueValue) - return nil -} - -type XPSReportingMetrics struct { - // EffectiveTrainingDuration: The effective time training used. If set, - // this is used for quota management and billing. Deprecated. AutoML BE - // doesn't use this. Don't set. - EffectiveTrainingDuration string `json:"effectiveTrainingDuration,omitempty"` - - // MetricEntries: One entry per metric name. The values must be - // aggregated per metric name. - MetricEntries []*XPSMetricEntry `json:"metricEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EffectiveTrainingDuration") 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. - // "EffectiveTrainingDuration") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSReportingMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSReportingMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationMetadata struct { - // Inputs: Metadata of the input. - Inputs map[string]XPSResponseExplanationMetadataInputMetadata `json:"inputs,omitempty"` - - // Outputs: Metadata of the output. - Outputs map[string]XPSResponseExplanationMetadataOutputMetadata `json:"outputs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Inputs") 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. "Inputs") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataInputMetadata: Metadata of the input of -// a feature. -type XPSResponseExplanationMetadataInputMetadata struct { - // InputTensorName: Name of the input tensor for this model. Only needed - // in train response. - InputTensorName string `json:"inputTensorName,omitempty"` - - // Modality: Modality of the feature. Valid values are: numeric, image. - // Defaults to numeric. - // - // Possible values: - // "MODALITY_UNSPECIFIED" - // "NUMERIC" - // "IMAGE" - // "CATEGORICAL" - Modality string `json:"modality,omitempty"` - - // VisualizationConfig: Visualization configurations for image - // explanation. - VisualizationConfig *XPSVisualization `json:"visualizationConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputTensorName") 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. "InputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataInputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataInputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataOutputMetadata: Metadata of the -// prediction output to be explained. -type XPSResponseExplanationMetadataOutputMetadata struct { - // OutputTensorName: Name of the output tensor. Only needed in train - // response. - OutputTensorName string `json:"outputTensorName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputTensorName") 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. "OutputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataOutputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataOutputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationParameters struct { - // IntegratedGradientsAttribution: An attribution method that computes - // Aumann-Shapley values taking advantage of the model's fully - // differentiable structure. Refer to this paper for more details: - // https://arxiv.org/abs/1703.01365 - IntegratedGradientsAttribution *XPSIntegratedGradientsAttribution `json:"integratedGradientsAttribution,omitempty"` - - // XraiAttribution: An attribution method that redistributes Integrated - // Gradients attribution to segmented regions, taking advantage of the - // model's fully differentiable structure. Refer to this paper for more - // details: https://arxiv.org/abs/1906.02825 XRAI currently performs - // better on natural images, like a picture of a house or an animal. If - // the images are taken in artificial environments, like a lab or - // manufacturing line, or from diagnostic equipment, like x-rays or - // quality-control cameras, use Integrated Gradients instead. - XraiAttribution *XPSXraiAttribution `json:"xraiAttribution,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IntegratedGradientsAttribution") 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. - // "IntegratedGradientsAttribution") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationSpec: Specification of Model explanation. -// Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 -// for context. -type XPSResponseExplanationSpec struct { - // ExplanationType: Explanation type. For AutoML Image Classification - // models, possible values are: * `image-integrated-gradients` * - // `image-xrai` - ExplanationType string `json:"explanationType,omitempty"` - - // Metadata: Metadata describing the Model's input and output for - // explanation. - Metadata *XPSResponseExplanationMetadata `json:"metadata,omitempty"` - - // Parameters: Parameters that configure explaining of the Model's - // predictions. - Parameters *XPSResponseExplanationParameters `json:"parameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationType") 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. "ExplanationType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSRow struct { - // ColumnIds: The ids of the columns. Note: The below `values` field - // must match order of this field, if this field is set. - ColumnIds []int64 `json:"columnIds,omitempty"` - - // Values: The values of the row cells, given in the same order as the - // column_ids. If column_ids is not set, then in the same order as the - // input_feature_column_ids in TablesModelMetadata. - Values []interface{} `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnIds") 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. "ColumnIds") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetrics struct { - // SubModelEvaluationMetrics: Evaluation metrics for all submodels - // contained in this model. - SubModelEvaluationMetrics []*XPSSpeechEvaluationMetricsSubModelEvaluationMetric `json:"subModelEvaluationMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SubModelEvaluationMetrics") 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. - // "SubModelEvaluationMetrics") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetricsSubModelEvaluationMetric struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - NumDeletions int64 `json:"numDeletions,omitempty"` - - NumInsertions int64 `json:"numInsertions,omitempty"` - - NumSubstitutions int64 `json:"numSubstitutions,omitempty"` - - // NumUtterances: Number of utterances used in the wer computation. - NumUtterances int64 `json:"numUtterances,omitempty"` - - // NumWords: Number of words over which the word error rate was - // computed. - NumWords int64 `json:"numWords,omitempty"` - - // SentenceAccuracy: Below fields are used for debugging purposes - SentenceAccuracy float64 `json:"sentenceAccuracy,omitempty"` - - // Wer: Word error rate (standard error metric used for speech - // recognition). - Wer float64 `json:"wer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") 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. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) UnmarshalJSON(data []byte) error { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - var s1 struct { - SentenceAccuracy gensupport.JSONFloat64 `json:"sentenceAccuracy"` - Wer gensupport.JSONFloat64 `json:"wer"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SentenceAccuracy = float64(s1.SentenceAccuracy) - s.Wer = float64(s1.Wer) - return nil -} - -type XPSSpeechModelSpec struct { - // DatasetId: Required for speech xps backend. Speech xps has to use - // dataset_id and model_id as the primary key in db so that speech API - // can query the db directly. - DatasetId int64 `json:"datasetId,omitempty,string"` - - Language string `json:"language,omitempty"` - - // SubModelSpecs: Model specs for all submodels contained in this model. - SubModelSpecs []*XPSSpeechModelSpecSubModelSpec `json:"subModelSpecs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatasetId") 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. "DatasetId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechModelSpecSubModelSpec struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // ClientId: In S3, Recognition ClientContextId.client_id - ClientId string `json:"clientId,omitempty"` - - // ContextId: In S3, Recognition ClientContextId.context_id - ContextId string `json:"contextId,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") 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. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpecSubModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpecSubModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessResponse struct { - // CnsTestDataPath: Location od shards of sstables (test data) of - // DataUtterance protos. - CnsTestDataPath string `json:"cnsTestDataPath,omitempty"` - - // CnsTrainDataPath: Location of shards of sstables (training data) of - // DataUtterance protos. - CnsTrainDataPath string `json:"cnsTrainDataPath,omitempty"` - - // PrebuiltModelEvaluationMetrics: The metrics for prebuilt speech - // models. They are included here because there is no prebuilt speech - // models stored in the AutoML. - PrebuiltModelEvaluationMetrics *XPSSpeechEvaluationMetrics `json:"prebuiltModelEvaluationMetrics,omitempty"` - - // SpeechPreprocessStats: Stats associated with the data. - SpeechPreprocessStats *XPSSpeechPreprocessStats `json:"speechPreprocessStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CnsTestDataPath") 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. "CnsTestDataPath") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessStats struct { - // DataErrors: Different types of data errors and the counts associated - // with them. - DataErrors []*XPSDataErrors `json:"dataErrors,omitempty"` - - // NumHumanLabeledExamples: The number of rows marked HUMAN_LABELLED - NumHumanLabeledExamples int64 `json:"numHumanLabeledExamples,omitempty"` - - // NumLogsExamples: The number of samples found in the previously - // recorded logs data. - NumLogsExamples int64 `json:"numLogsExamples,omitempty"` - - // NumMachineTranscribedExamples: The number of rows marked as - // MACHINE_TRANSCRIBED - NumMachineTranscribedExamples int64 `json:"numMachineTranscribedExamples,omitempty"` - - // TestExamplesCount: The number of examples labelled as TEST by Speech - // xps server. - TestExamplesCount int64 `json:"testExamplesCount,omitempty"` - - // TestSentencesCount: The number of sentences in the test data set. - TestSentencesCount int64 `json:"testSentencesCount,omitempty"` - - // TestWordsCount: The number of words in the test data set. - TestWordsCount int64 `json:"testWordsCount,omitempty"` - - // TrainExamplesCount: The number of examples labeled as TRAIN by Speech - // xps server. - TrainExamplesCount int64 `json:"trainExamplesCount,omitempty"` - - // TrainSentencesCount: The number of sentences in the training data - // set. - TrainSentencesCount int64 `json:"trainSentencesCount,omitempty"` - - // TrainWordsCount: The number of words in the training data set. - TrainWordsCount int64 `json:"trainWordsCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DataErrors") 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. "DataErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStats: The data statistics of a series of STRING values. -type XPSStringStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopUnigramStats: The statistics of the top 20 unigrams, ordered by - // StringStats.UnigramStats.count. - TopUnigramStats []*XPSStringStatsUnigramStats `json:"topUnigramStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStatsUnigramStats: The statistics of a unigram. -type XPSStringStatsUnigramStats struct { - // Count: The number of occurrences of this unigram in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The unigram. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStatsUnigramStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStatsUnigramStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructStats: The data statistics of a series of STRUCT values. -type XPSStructStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // FieldStats: Map from a field name of the struct to data stats - // aggregated over series of all data in that field across all the - // structs. - FieldStats map[string]XPSDataStats `json:"fieldStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructType: `StructType` defines the DataType-s of a STRUCT type. -type XPSStructType struct { - // Fields: Unordered map of struct field names to their data types. - Fields map[string]XPSDataType `json:"fields,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fields") 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. "Fields") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructType) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTableSpec struct { - // ColumnSpecs: Mapping from column id to column spec. - ColumnSpecs map[string]XPSColumnSpec `json:"columnSpecs,omitempty"` - - // ImportedDataSizeInBytes: The total size of imported data of the - // table. - ImportedDataSizeInBytes int64 `json:"importedDataSizeInBytes,omitempty,string"` - - // RowCount: The number of rows in the table. - RowCount int64 `json:"rowCount,omitempty,string"` - - // TimeColumnId: The id of the time column. - TimeColumnId int64 `json:"timeColumnId,omitempty"` - - // ValidRowCount: The number of valid rows. - ValidRowCount int64 `json:"validRowCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColumnSpecs") 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. "ColumnSpecs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTableSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSTableSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetrics: Metrics for Tables classification -// problems. -type XPSTablesClassificationMetrics struct { - // CurveMetrics: Metrics building a curve. - CurveMetrics []*XPSTablesClassificationMetricsCurveMetrics `json:"curveMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CurveMetrics") 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. "CurveMetrics") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetricsCurveMetrics: Metrics curve data point -// for a single value. -type XPSTablesClassificationMetricsCurveMetrics struct { - // AucPr: The area under the precision-recall curve. - AucPr float64 `json:"aucPr,omitempty"` - - // AucRoc: The area under receiver operating characteristic curve. - AucRoc float64 `json:"aucRoc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve and ROC curve can be derived from them. - ConfidenceMetricsEntries []*XPSTablesConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // LogLoss: The Log loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // PositionThreshold: The position threshold value used to compute the - // metrics. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Value: The CATEGORY row value (for ARRAY unnested) the curve metrics - // are for. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AucPr") 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. "AucPr") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - var s1 struct { - AucPr gensupport.JSONFloat64 `json:"aucPr"` - AucRoc gensupport.JSONFloat64 `json:"aucRoc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AucPr = float64(s1.AucPr) - s.AucRoc = float64(s1.AucRoc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSTablesConfidenceMetricsEntry: Metrics for a single confidence -// threshold. -type XPSTablesConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. (2 * precision * - // recall) / (precision + recall) - F1Score float64 `json:"f1Score,omitempty"` - - // FalseNegativeCount: False negative count. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: False positive count. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: FPR = #false positives / (#false positives + #true - // negatives) - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // Precision: Precision = #true positives / (#true positives + #false - // positives). - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall = #true positives / (#true positives + #false - // negatives). - Recall float64 `json:"recall,omitempty"` - - // TrueNegativeCount: True negative count. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: True positive count. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // TruePositiveRate: TPR = #true positives / (#true positives + #false - // negatvies) - TruePositiveRate float64 `json:"truePositiveRate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - TruePositiveRate gensupport.JSONFloat64 `json:"truePositiveRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - s.TruePositiveRate = float64(s1.TruePositiveRate) - return nil -} - -// XPSTablesDatasetMetadata: Metadata for a dataset used for AutoML -// Tables. Next ID: 6 -type XPSTablesDatasetMetadata struct { - // MlUseColumnId: Id the column to split the table. - MlUseColumnId int64 `json:"mlUseColumnId,omitempty"` - - // PrimaryTableSpec: Primary table. - PrimaryTableSpec *XPSTableSpec `json:"primaryTableSpec,omitempty"` - - // TargetColumnCorrelations: (the column id : its CorrelationStats with - // target column). - TargetColumnCorrelations map[string]XPSCorrelationStats `json:"targetColumnCorrelations,omitempty"` - - // TargetColumnId: Id of the primary table column that should be used as - // the training label. - TargetColumnId int64 `json:"targetColumnId,omitempty"` - - // WeightColumnId: Id of the primary table column that should be used as - // the weight column. - WeightColumnId int64 `json:"weightColumnId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MlUseColumnId") 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. "MlUseColumnId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesDatasetMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesDatasetMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesEvaluationMetrics struct { - // ClassificationMetrics: Classification metrics. - ClassificationMetrics *XPSTablesClassificationMetrics `json:"classificationMetrics,omitempty"` - - // RegressionMetrics: Regression metrics. - RegressionMetrics *XPSTablesRegressionMetrics `json:"regressionMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClassificationMetrics") 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. "ClassificationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelColumnInfo: An information specific to given column and -// Tables Model, in context of the Model and the predictions created by -// it. -type XPSTablesModelColumnInfo struct { - // ColumnId: The ID of the column. - ColumnId int64 `json:"columnId,omitempty"` - - // FeatureImportance: When given as part of a Model: Measurement of how - // much model predictions correctness on the TEST data depend on values - // in this column. A value between 0 and 1, higher means higher - // influence. These values are normalized - for all input feature - // columns of a given model they add to 1. When given back by Predict or - // Batch Predict: Measurement of how impactful for the prediction - // returned for the given row the value in this column was. - // Specifically, the feature importance specifies the marginal - // contribution that the feature made to the prediction score compared - // to the baseline score. These values are computed using the Sampled - // Shapley method. - FeatureImportance float64 `json:"featureImportance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelColumnInfo) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelColumnInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelColumnInfo) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelColumnInfo - var s1 struct { - FeatureImportance gensupport.JSONFloat64 `json:"featureImportance"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FeatureImportance = float64(s1.FeatureImportance) - return nil -} - -// XPSTablesModelStructure: A description of Tables model structure. -type XPSTablesModelStructure struct { - // ModelParameters: A list of models. - ModelParameters []*XPSTablesModelStructureModelParameters `json:"modelParameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelParameters") 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. "ModelParameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructure) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelStructureModelParameters: Model hyper-parameters for a -// model. -type XPSTablesModelStructureModelParameters struct { - Hyperparameters []*XPSTablesModelStructureModelParametersParameter `json:"hyperparameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Hyperparameters") 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. "Hyperparameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesModelStructureModelParametersParameter struct { - // FloatValue: Float type parameter value. - FloatValue float64 `json:"floatValue,omitempty"` - - // IntValue: Integer type parameter value. - IntValue int64 `json:"intValue,omitempty,string"` - - // Name: Parameter name. - Name string `json:"name,omitempty"` - - // StringValue: String type parameter value. - StringValue string `json:"stringValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FloatValue") 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. "FloatValue") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParametersParameter) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParametersParameter - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelStructureModelParametersParameter) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelStructureModelParametersParameter - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -type XPSTablesPreprocessResponse struct { - // TablesDatasetMetadata: The table/column id, column_name and the - // DataTypes of the columns will be populated. - TablesDatasetMetadata *XPSTablesDatasetMetadata `json:"tablesDatasetMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "TablesDatasetMetadata") 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. "TablesDatasetMetadata") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesRegressionMetrics: Metrics for Tables regression problems. -type XPSTablesRegressionMetrics struct { - // MeanAbsoluteError: Mean absolute error. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error, only set - // if all of the target column's values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root mean squared error. - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // 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. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesRegressionMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesRegressionMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesRegressionMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesRegressionMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -type XPSTablesTrainResponse struct { - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // PredictionSampleRows: Sample rows from the dataset this model was - // trained. - PredictionSampleRows []*XPSRow `json:"predictionSampleRows,omitempty"` - - // TablesModelColumnInfo: Output only. Auxiliary information for each of - // the input_feature_column_specs, with respect to this particular - // model. - TablesModelColumnInfo []*XPSTablesModelColumnInfo `json:"tablesModelColumnInfo,omitempty"` - - // TrainCostMilliNodeHours: The actual training cost of the model, - // expressed in milli node hours, i.e. 1,000 value in this field means 1 - // node hour. Guaranteed to not exceed the train budget. - TrainCostMilliNodeHours int64 `json:"trainCostMilliNodeHours,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") 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. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesTrainingOperationMetadata struct { - // CreateModelStage: Current stage of creating model. - // - // Possible values: - // "CREATE_MODEL_STAGE_UNSPECIFIED" - Unspecified stage. - // "DATA_PREPROCESSING" - Prepare the model training pipeline and run - // data processing. - // "TRAINING" - Training model. - // "EVALUATING" - Run evaluation. - // "MODEL_POST_PROCESSING" - Finalizing model training pipeline. - CreateModelStage string `json:"createModelStage,omitempty"` - - // OptimizationObjective: The optimization objective for model. - OptimizationObjective string `json:"optimizationObjective,omitempty"` - - // TopTrials: This field is for training. When the operation is - // terminated successfully, AutoML Backend post this field to operation - // metadata in spanner. If the metadata has no trials returned, the - // training operation is supposed to be a failure. - TopTrials []*XPSTuningTrial `json:"topTrials,omitempty"` - - // TrainBudgetMilliNodeHours: Creating model budget. - TrainBudgetMilliNodeHours int64 `json:"trainBudgetMilliNodeHours,omitempty,string"` - - // TrainingObjectivePoints: This field records the training objective - // value with respect to time, giving insight into how the model - // architecture search is performing as training time elapses. - TrainingObjectivePoints []*XPSTrainingObjectivePoint `json:"trainingObjectivePoints,omitempty"` - - // TrainingStartTime: Timestamp when training process starts. - TrainingStartTime string `json:"trainingStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateModelStage") 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. "CreateModelStage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextComponentModel: Component model. Next ID: 10 -type XPSTextComponentModel struct { - // BatchPredictionModelGcsUri: The Cloud Storage resource path to hold - // batch prediction model. - BatchPredictionModelGcsUri string `json:"batchPredictionModelGcsUri,omitempty"` - - // OnlinePredictionModelGcsUri: The Cloud Storage resource path to hold - // online prediction model. - OnlinePredictionModelGcsUri string `json:"onlinePredictionModelGcsUri,omitempty"` - - // Partition: The partition where the model is deployed. Populated by - // uCAIP BE as part of online PredictRequest. - // - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - Partition string `json:"partition,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud Ai Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ServoModelName: The name of servo model. Populated by uCAIP BE as - // part of online PredictRequest. - ServoModelName string `json:"servoModelName,omitempty"` - - // SubmodelName: The name of the trained NL submodel. - SubmodelName string `json:"submodelName,omitempty"` - - // SubmodelType: The type of trained NL submodel - // - // Possible values: - // "TEXT_MODEL_TYPE_UNSPECIFIED" - // "TEXT_MODEL_TYPE_DEFAULT" - // "TEXT_MODEL_TYPE_META_ARCHITECT" - // "TEXT_MODEL_TYPE_ATC" - // "TEXT_MODEL_TYPE_CLARA2" - // "TEXT_MODEL_TYPE_CHATBASE" - // "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING" - // "TEXT_MODEL_TYPE_TEXT_EXTRACTION" - Model type for entity - // extraction. - // "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION" - Model type for - // relationship extraction. - // "TEXT_MODEL_TYPE_COMPOSITE" - A composite model represents a set of - // component models that have to be used together for prediction. A - // composite model appears to be a single model to the model user. It - // may contain only one component model. Please refer to - // go/cnl-composite-models for more information. - // "TEXT_MODEL_TYPE_ALL_MODELS" - Model type used to train default, - // MA, and ATC models in a single batch worker pipeline. - // "TEXT_MODEL_TYPE_BERT" - BERT pipeline needs a specific model type, - // since it uses a different TFX configuration compared with DEFAULT - // (despite sharing most of the code). - // "TEXT_MODEL_TYPE_ENC_PALM" - Model type for EncPaLM. - SubmodelType string `json:"submodelType,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // VersionNumber: The servomatic model version number. Populated by - // uCAIP BE as part of online PredictRequest. - VersionNumber int64 `json:"versionNumber,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "BatchPredictionModelGcsUri") 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. - // "BatchPredictionModelGcsUri") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextComponentModel) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextComponentModel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTextExtractionEvaluationMetrics struct { - // BestF1ConfidenceMetrics: Values are at the highest F1 score on the - // precision-recall curve. Only confidence_threshold, recall, precision, - // and f1_score will be set. - BestF1ConfidenceMetrics *XPSConfidenceMetricsEntry `json:"bestF1ConfidenceMetrics,omitempty"` - - // ConfidenceMetricsEntries: If the enclosing EvaluationMetrics.label is - // empty, confidence_metrics_entries is an evaluation of the entire - // model across all labels. If the enclosing EvaluationMetrics.label is - // set, confidence_metrics_entries applies to that label. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the model, at the default - // confidence threshold (0.0). Only set for whole-model evaluation, not - // for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // PerLabelConfidenceMetrics: Only recall, precision, and f1_score will - // be set. - PerLabelConfidenceMetrics map[string]XPSConfidenceMetricsEntry `json:"perLabelConfidenceMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BestF1ConfidenceMetrics") 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. "BestF1ConfidenceMetrics") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextExtractionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextExtractionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextSentimentEvaluationMetrics: Model evaluation metrics for text -// sentiment problems. -type XPSTextSentimentEvaluationMetrics struct { - // ConfusionMatrix: Output only. Confusion matrix of the evaluation. - // Only set for the overall model evaluation, not for evaluation of a - // single annotation spec. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // LinearKappa: Output only. Linear weighted kappa. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - LinearKappa float64 `json:"linearKappa,omitempty"` - - // MeanAbsoluteError: Output only. Mean absolute error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanSquaredError: Output only. Mean squared error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanSquaredError float64 `json:"meanSquaredError,omitempty"` - - // Precision: Output only. Precision. - Precision float64 `json:"precision,omitempty"` - - // QuadraticKappa: Output only. Quadratic weighted kappa. Only set for - // the overall model evaluation, not for evaluation of a single - // annotation spec. - QuadraticKappa float64 `json:"quadraticKappa,omitempty"` - - // Recall: Output only. Recall. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfusionMatrix") 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. "ConfusionMatrix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextSentimentEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextSentimentEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTextSentimentEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTextSentimentEvaluationMetrics - var s1 struct { - F1Score gensupport.JSONFloat64 `json:"f1Score"` - LinearKappa gensupport.JSONFloat64 `json:"linearKappa"` - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanSquaredError gensupport.JSONFloat64 `json:"meanSquaredError"` - Precision gensupport.JSONFloat64 `json:"precision"` - QuadraticKappa gensupport.JSONFloat64 `json:"quadraticKappa"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.F1Score = float64(s1.F1Score) - s.LinearKappa = float64(s1.LinearKappa) - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanSquaredError = float64(s1.MeanSquaredError) - s.Precision = float64(s1.Precision) - s.QuadraticKappa = float64(s1.QuadraticKappa) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSTextToSpeechTrainResponse: TextToSpeech train response -type XPSTextToSpeechTrainResponse struct { -} - -type XPSTextTrainResponse struct { - // ComponentModel: Component submodels. - ComponentModel []*XPSTextComponentModel `json:"componentModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ComponentModel") 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. "ComponentModel") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTfJsFormat: A TensorFlow.js (https://www.tensorflow.org/js) model -// that can be used in the browser and in Node.js using JavaScript. -type XPSTfJsFormat struct { -} - -// XPSTfLiteFormat: LINT.IfChange A model format used for mobile and IoT -// devices. See https://www.tensorflow.org/lite. -type XPSTfLiteFormat struct { -} - -// XPSTfSavedModelFormat: A tensorflow model format in SavedModel -// format. -type XPSTfSavedModelFormat struct { -} - -// XPSTimestampStats: The data statistics of a series of TIMESTAMP -// values. -type XPSTimestampStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // GranularStats: The string key is the pre-defined granularity. - // Currently supported: hour_of_day, day_of_week, month_of_year. - // Granularities finer that the granularity of timestamp data are not - // populated (e.g. if timestamps are at day granularity, then - // hour_of_day is not populated). - GranularStats map[string]XPSTimestampStatsGranularStats `json:"granularStats,omitempty"` - - MedianTimestampNanos int64 `json:"medianTimestampNanos,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTimestampStatsGranularStats: Stats split by a defined in context -// granularity. -type XPSTimestampStatsGranularStats struct { - // Buckets: A map from granularity key to example count for that key. - // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means - // May). - Buckets map[string]string `json:"buckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStatsGranularStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStatsGranularStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTrackMetricsEntry: Track matching model metrics for a single track -// match threshold and multiple label match confidence thresholds. Next -// tag: 6. -type XPSTrackMetricsEntry struct { - // ConfidenceMetricsEntries: Output only. Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - // Precision-recall curve is derived from them. - ConfidenceMetricsEntries []*XPSTrackMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: Output only. The intersection-over-union threshold - // value between bounding boxes across frames used to compute this - // metric entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanBoundingBoxIou: Output only. The mean bounding box iou over all - // confidence thresholds. - MeanBoundingBoxIou float64 `json:"meanBoundingBoxIou,omitempty"` - - // MeanMismatchRate: Output only. The mean mismatch rate over all - // confidence thresholds. - MeanMismatchRate float64 `json:"meanMismatchRate,omitempty"` - - // MeanTrackingAveragePrecision: Output only. The mean average precision - // over all confidence thresholds. - MeanTrackingAveragePrecision float64 `json:"meanTrackingAveragePrecision,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanBoundingBoxIou gensupport.JSONFloat64 `json:"meanBoundingBoxIou"` - MeanMismatchRate gensupport.JSONFloat64 `json:"meanMismatchRate"` - MeanTrackingAveragePrecision gensupport.JSONFloat64 `json:"meanTrackingAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanBoundingBoxIou = float64(s1.MeanBoundingBoxIou) - s.MeanMismatchRate = float64(s1.MeanMismatchRate) - s.MeanTrackingAveragePrecision = float64(s1.MeanTrackingAveragePrecision) - return nil -} - -// XPSTrackMetricsEntryConfidenceMetricsEntry: Metrics for a single -// confidence threshold. Next tag: 6. -type XPSTrackMetricsEntryConfidenceMetricsEntry struct { - // BoundingBoxIou: Output only. Bounding box intersection-over-union - // precision. Measures how well the bounding boxes overlap between each - // other (e.g. complete overlap or just barely above iou_threshold). - BoundingBoxIou float64 `json:"boundingBoxIou,omitempty"` - - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // MismatchRate: Output only. Mismatch rate, which measures the tracking - // consistency, i.e. correctness of instance ID continuity. - MismatchRate float64 `json:"mismatchRate,omitempty"` - - // TrackingPrecision: Output only. Tracking precision. - TrackingPrecision float64 `json:"trackingPrecision,omitempty"` - - // TrackingRecall: Output only. Tracking recall. - TrackingRecall float64 `json:"trackingRecall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BoundingBoxIou") 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. "BoundingBoxIou") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - var s1 struct { - BoundingBoxIou gensupport.JSONFloat64 `json:"boundingBoxIou"` - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - MismatchRate gensupport.JSONFloat64 `json:"mismatchRate"` - TrackingPrecision gensupport.JSONFloat64 `json:"trackingPrecision"` - TrackingRecall gensupport.JSONFloat64 `json:"trackingRecall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxIou = float64(s1.BoundingBoxIou) - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.MismatchRate = float64(s1.MismatchRate) - s.TrackingPrecision = float64(s1.TrackingPrecision) - s.TrackingRecall = float64(s1.TrackingRecall) - return nil -} - -// XPSTrainResponse: Next ID: 18 -type XPSTrainResponse struct { - // DeployedModelSizeBytes: Estimated model size in bytes once deployed. - DeployedModelSizeBytes int64 `json:"deployedModelSizeBytes,omitempty,string"` - - // ErrorAnalysisConfigs: Optional vision model error analysis - // configuration. The field is set when model error analysis is enabled - // in the training request. The results of error analysis will be binded - // together with evaluation results (in the format of AnnotatedExample). - ErrorAnalysisConfigs []*XPSVisionErrorAnalysisConfig `json:"errorAnalysisConfigs,omitempty"` - - // EvaluatedExampleSet: Examples used to evaluate the model (usually the - // test set), with the predicted annotations. The file_spec should point - // to recordio file(s) of AnnotatedExample. For each returned example, - // the example_id_token and annotations predicted by the model must be - // set. The example payload can and is recommended to be omitted. - EvaluatedExampleSet *XPSExampleSet `json:"evaluatedExampleSet,omitempty"` - - // EvaluationMetricsSet: The trained model evaluation metrics. This can - // be optionally returned. - EvaluationMetricsSet *XPSEvaluationMetricsSet `json:"evaluationMetricsSet,omitempty"` - - // ExplanationConfigs: VisionExplanationConfig for XAI on test set. - // Optional for when XAI is enable in training request. - ExplanationConfigs []*XPSResponseExplanationSpec `json:"explanationConfigs,omitempty"` - - ImageClassificationTrainResp *XPSImageClassificationTrainResponse `json:"imageClassificationTrainResp,omitempty"` - - ImageObjectDetectionTrainResp *XPSImageObjectDetectionModelSpec `json:"imageObjectDetectionTrainResp,omitempty"` - - ImageSegmentationTrainResp *XPSImageSegmentationTrainResponse `json:"imageSegmentationTrainResp,omitempty"` - - // ModelToken: Token that represents the trained model. This is - // considered immutable and is persisted in AutoML. xPS can put their - // own proto in the byte string, to e.g. point to the model checkpoints. - // The token is passed to other xPS APIs to refer to the model. - ModelToken string `json:"modelToken,omitempty"` - - SpeechTrainResp *XPSSpeechModelSpec `json:"speechTrainResp,omitempty"` - - TablesTrainResp *XPSTablesTrainResponse `json:"tablesTrainResp,omitempty"` - - TextToSpeechTrainResp *XPSTextToSpeechTrainResponse `json:"textToSpeechTrainResp,omitempty"` - - // TextTrainResp: Will only be needed for uCAIP from Beta. - TextTrainResp *XPSTextTrainResponse `json:"textTrainResp,omitempty"` - - TranslationTrainResp *XPSTranslationTrainResponse `json:"translationTrainResp,omitempty"` - - VideoActionRecognitionTrainResp *XPSVideoActionRecognitionTrainResponse `json:"videoActionRecognitionTrainResp,omitempty"` - - VideoClassificationTrainResp *XPSVideoClassificationTrainResponse `json:"videoClassificationTrainResp,omitempty"` - - VideoObjectTrackingTrainResp *XPSVideoObjectTrackingTrainResponse `json:"videoObjectTrackingTrainResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "DeployedModelSizeBytes") 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. "DeployedModelSizeBytes") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTrainingObjectivePoint struct { - // CreateTime: The time at which this point was recorded. - CreateTime string `json:"createTime,omitempty"` - - // Value: The objective value when this point was recorded. - Value float64 `json:"value,omitempty"` - - // 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 *XPSTrainingObjectivePoint) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainingObjectivePoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrainingObjectivePoint) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrainingObjectivePoint - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// XPSTranslationEvaluationMetrics: Evaluation metrics for the dataset. -type XPSTranslationEvaluationMetrics struct { - // BaseBleuScore: BLEU score for base model. - BaseBleuScore float64 `json:"baseBleuScore,omitempty"` - - // BleuScore: BLEU score. - BleuScore float64 `json:"bleuScore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BaseBleuScore") 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. "BaseBleuScore") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTranslationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTranslationEvaluationMetrics - var s1 struct { - BaseBleuScore gensupport.JSONFloat64 `json:"baseBleuScore"` - BleuScore gensupport.JSONFloat64 `json:"bleuScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BaseBleuScore = float64(s1.BaseBleuScore) - s.BleuScore = float64(s1.BleuScore) - return nil -} - -// XPSTranslationPreprocessResponse: Translation preprocess response. -type XPSTranslationPreprocessResponse struct { - // ParsedExampleCount: Total example count parsed. - ParsedExampleCount int64 `json:"parsedExampleCount,omitempty,string"` - - // ValidExampleCount: Total valid example count. - ValidExampleCount int64 `json:"validExampleCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ParsedExampleCount") - // 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. "ParsedExampleCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTranslationTrainResponse: Train response for translation. -type XPSTranslationTrainResponse struct { - // ModelType: Type of the model. - // - // Possible values: - // "MODEL_TYPE_UNSPECIFIED" - Default - // "LEGACY" - Legacy model. Will be deprecated. - // "CURRENT" - Current model. - ModelType string `json:"modelType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelType") 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. "ModelType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTuningTrial: Metrics for a tuning job generated, will get -// forwarded to Stackdriver as model tuning logs. Setting this as a -// standalone message out of CreateModelMetadata to avoid confusion as -// we expose this message only to users. -type XPSTuningTrial struct { - // ModelStructure: Model parameters for the trial. - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // TrainingObjectivePoint: The optimization objective evaluation of the - // eval split data. - TrainingObjectivePoint *XPSTrainingObjectivePoint `json:"trainingObjectivePoint,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") 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. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTuningTrial) MarshalJSON() ([]byte, error) { - type NoMethod XPSTuningTrial - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoActionMetricsEntry: The Evaluation metrics entry given a -// specific precision_window_length. -type XPSVideoActionMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSVideoActionMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` - - // PrecisionWindowLength: This VideoActionMetricsEntry is calculated - // based on this prediction window length. If the predicted action's - // timestamp is inside the time window whose center is the ground truth - // action's timestamp with this specific length, the prediction result - // is treated as a true positive. - PrecisionWindowLength string `json:"precisionWindowLength,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntry - var s1 struct { - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSVideoActionMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSVideoActionMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Output only. Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Output only. Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSVideoActionRecognitionEvaluationMetrics: Model evaluation metrics -// for video action recognition. -type XPSVideoActionRecognitionEvaluationMetrics struct { - // EvaluatedActionCount: Output only. The number of ground truth actions - // used to create this evaluation. - EvaluatedActionCount int64 `json:"evaluatedActionCount,omitempty"` - - // VideoActionMetricsEntries: Output only. The metric entries for - // precision window lengths: 1s,2s,3s,4s, 5s. - VideoActionMetricsEntries []*XPSVideoActionMetricsEntry `json:"videoActionMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EvaluatedActionCount") 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. "EvaluatedActionCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoActionRecognitionTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // 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. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoBatchPredictOperationMetadata struct { - // OutputExamples: All the partial batch prediction results that are - // completed at the moment. Output examples are sorted by completion - // time. The order will not be changed. Each output example should be - // the path of a single RecordIO file of AnnotatedExamples. - OutputExamples []string `json:"outputExamples,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExamples") 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. "OutputExamples") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoBatchPredictOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoBatchPredictOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoClassificationTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // 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. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSVideoExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") 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. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoModelArtifactSpec struct { - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExportArtifact") 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. "ExportArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoObjectTrackingEvaluationMetrics: Model evaluation metrics for -// ObjectTracking problems. Next tag: 10. -type XPSVideoObjectTrackingEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: Output only. The single metric for - // bounding boxes evaluation: the mean_average_precision averaged over - // all bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: Output only. The bounding boxes match - // metrics for each Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingboxCount: The number of bounding boxes used for - // model evaluation. - EvaluatedBoundingboxCount int64 `json:"evaluatedBoundingboxCount,omitempty"` - - // EvaluatedFrameCount: The number of video frames used for model - // evaluation. - EvaluatedFrameCount int64 `json:"evaluatedFrameCount,omitempty"` - - // EvaluatedTrackCount: The number of tracks used for model evaluation. - EvaluatedTrackCount int64 `json:"evaluatedTrackCount,omitempty"` - - // TrackMeanAveragePrecision: Output only. The single metric for tracks - // accuracy evaluation: the mean_average_precision averaged over all - // track_metrics_entries. - TrackMeanAveragePrecision float64 `json:"trackMeanAveragePrecision,omitempty"` - - // TrackMeanBoundingBoxIou: Output only. The single metric for tracks - // bounding box iou evaluation: the mean_bounding_box_iou averaged over - // all track_metrics_entries. - TrackMeanBoundingBoxIou float64 `json:"trackMeanBoundingBoxIou,omitempty"` - - // TrackMeanMismatchRate: Output only. The single metric for tracking - // consistency evaluation: the mean_mismatch_rate averaged over all - // track_metrics_entries. - TrackMeanMismatchRate float64 `json:"trackMeanMismatchRate,omitempty"` - - // TrackMetricsEntries: Output only. The tracks match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - TrackMetricsEntries []*XPSTrackMetricsEntry `json:"trackMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") 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. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - TrackMeanAveragePrecision gensupport.JSONFloat64 `json:"trackMeanAveragePrecision"` - TrackMeanBoundingBoxIou gensupport.JSONFloat64 `json:"trackMeanBoundingBoxIou"` - TrackMeanMismatchRate gensupport.JSONFloat64 `json:"trackMeanMismatchRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - s.TrackMeanAveragePrecision = float64(s1.TrackMeanAveragePrecision) - s.TrackMeanBoundingBoxIou = float64(s1.TrackMeanBoundingBoxIou) - s.TrackMeanMismatchRate = float64(s1.TrackMeanMismatchRate) - return nil -} - -type XPSVideoObjectTrackingTrainResponse struct { - // ExportModelSpec: Populated for AutoML request only. - ExportModelSpec *XPSVideoExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ExportModelSpec") 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. "ExportModelSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoTrainingOperationMetadata struct { - // TrainCostMilliNodeHour: This is an estimation of the node hours - // necessary for training a model, expressed in milli node hours (i.e. - // 1,000 value in this field means 1 node hour). A node hour represents - // the time a virtual machine spends running your training job. The cost - // of one node running for one hour is a node hour. - TrainCostMilliNodeHour int64 `json:"trainCostMilliNodeHour,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "TrainCostMilliNodeHour") 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. "TrainCostMilliNodeHour") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisionErrorAnalysisConfig: The vision model error analysis -// configuration. Next tag: 3 -type XPSVisionErrorAnalysisConfig struct { - // ExampleCount: The number of query examples in error analysis. - ExampleCount int64 `json:"exampleCount,omitempty"` - - // QueryType: The query type used in retrieval. The enum values are - // frozen in the foreseeable future. - // - // Possible values: - // "QUERY_TYPE_UNSPECIFIED" - Unspecified query type for model error - // analysis. - // "QUERY_TYPE_ALL_SIMILAR" - Query similar samples across all classes - // in the dataset. - // "QUERY_TYPE_SAME_CLASS_SIMILAR" - Query similar samples from the - // same class of the input sample. - // "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - Query dissimilar samples from - // the same class of the input sample. - QueryType string `json:"queryType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") 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. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionErrorAnalysisConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionErrorAnalysisConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVisionTrainingOperationMetadata struct { - // ExplanationUsage: Aggregated infra usage within certain time period, - // for billing report purpose if XAI is enable in training request. - ExplanationUsage *InfraUsage `json:"explanationUsage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationUsage") 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. "ExplanationUsage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisualization: Visualization configurations for image explanation. -type XPSVisualization struct { - // ClipPercentLowerbound: Excludes attributions below the specified - // percentile, from the highlighted areas. Defaults to 62. - ClipPercentLowerbound float64 `json:"clipPercentLowerbound,omitempty"` - - // ClipPercentUpperbound: Excludes attributions above the specified - // percentile from the highlighted areas. Using the - // clip_percent_upperbound and clip_percent_lowerbound together can be - // useful for filtering out noise and making it easier to see areas of - // strong attribution. Defaults to 99.9. - ClipPercentUpperbound float64 `json:"clipPercentUpperbound,omitempty"` - - // ColorMap: The color scheme used for the highlighted areas. Defaults - // to PINK_GREEN for Integrated Gradients attribution, which shows - // positive attributions in green and negative in pink. Defaults to - // VIRIDIS for XRAI attribution, which highlights the most influential - // regions in yellow and the least influential in blue. - // - // Possible values: - // "COLOR_MAP_UNSPECIFIED" - Should not be used. - // "PINK_GREEN" - Positive: green. Negative: pink. - // "VIRIDIS" - Viridis color map: A perceptually uniform color mapping - // which is easier to see by those with colorblindness and progresses - // from yellow to green to blue. Positive: yellow. Negative: blue. - // "RED" - Positive: red. Negative: red. - // "GREEN" - Positive: green. Negative: green. - // "RED_GREEN" - Positive: green. Negative: red. - // "PINK_WHITE_GREEN" - PiYG palette. - ColorMap string `json:"colorMap,omitempty"` - - // OverlayType: How the original image is displayed in the - // visualization. Adjusting the overlay can help increase visual clarity - // if the original image makes it difficult to view the visualization. - // Defaults to NONE. - // - // Possible values: - // "OVERLAY_TYPE_UNSPECIFIED" - Default value. This is the same as - // NONE. - // "NONE" - No overlay. - // "ORIGINAL" - The attributions are shown on top of the original - // image. - // "GRAYSCALE" - The attributions are shown on top of grayscaled - // version of the original image. - // "MASK_BLACK" - The attributions are used as a mask to reveal - // predictive parts of the image and hide the un-predictive parts. - OverlayType string `json:"overlayType,omitempty"` - - // Polarity: Whether to only highlight pixels with positive - // contributions, negative or both. Defaults to POSITIVE. - // - // Possible values: - // "POLARITY_UNSPECIFIED" - Default value. This is the same as - // POSITIVE. - // "POSITIVE" - Highlights the pixels/outlines that were most - // influential to the model's prediction. - // "NEGATIVE" - Setting polarity to negative highlights areas that - // does not lead to the models's current prediction. - // "BOTH" - Shows both positive and negative attributions. - Polarity string `json:"polarity,omitempty"` - - // Type: Type of the image visualization. Only applicable to Integrated - // Gradients attribution. OUTLINES shows regions of attribution, while - // PIXELS shows per-pixel attribution. Defaults to OUTLINES. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Should not be used. - // "PIXELS" - Shows which pixel contributed to the image prediction. - // "OUTLINES" - Shows which region contributed to the image prediction - // by outlining the region. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClipPercentLowerbound") 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. "ClipPercentLowerbound") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisualization) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisualization - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVisualization) UnmarshalJSON(data []byte) error { - type NoMethod XPSVisualization - var s1 struct { - ClipPercentLowerbound gensupport.JSONFloat64 `json:"clipPercentLowerbound"` - ClipPercentUpperbound gensupport.JSONFloat64 `json:"clipPercentUpperbound"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ClipPercentLowerbound = float64(s1.ClipPercentLowerbound) - s.ClipPercentUpperbound = float64(s1.ClipPercentUpperbound) - return nil -} - -type XPSXpsOperationMetadata struct { - // ExampleCount: Optional. XPS server can opt to provide example count - // of the long running operation (e.g. training, data importing, batch - // prediction). - ExampleCount int64 `json:"exampleCount,omitempty,string"` - - // ReportingMetrics: Metrics for the operation. By the time the - // operation is terminated (whether succeeded or failed) as returned - // from XPS, AutoML BE assumes the metrics are finalized. AutoML BE - // transparently posts the metrics to Chemist if it's not empty, - // regardless of the response content or error type. If user is supposed - // to be charged in case of cancellation/error, this field should be - // set. In the case where the type of LRO doesn't require any billing, - // this field should be left unset. - ReportingMetrics *XPSReportingMetrics `json:"reportingMetrics,omitempty"` - - TablesTrainingOperationMetadata *XPSTablesTrainingOperationMetadata `json:"tablesTrainingOperationMetadata,omitempty"` - - VideoBatchPredictOperationMetadata *XPSVideoBatchPredictOperationMetadata `json:"videoBatchPredictOperationMetadata,omitempty"` - - VideoTrainingOperationMetadata *XPSVideoTrainingOperationMetadata `json:"videoTrainingOperationMetadata,omitempty"` - - VisionTrainingOperationMetadata *XPSVisionTrainingOperationMetadata `json:"visionTrainingOperationMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") 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. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXpsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSXpsOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSXraiAttribution: An explanation method that redistributes -// Integrated Gradients attributions to segmented regions, taking -// advantage of the model's fully differentiable structure. Refer to -// this paper for more details: https://arxiv.org/abs/1906.02825 Only -// supports image Models (modality is IMAGE). -type XPSXraiAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is met within the desired error range. Valid range of - // its value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") 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. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXraiAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSXraiAttribution +func (s *V2Model) MarshalJSON() ([]byte, error) { + type NoMethod V2Model raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } diff --git a/language/v1beta2/language-api.json b/language/v1beta2/language-api.json index c15c621e6b6..e3da5ec13e9 100644 --- a/language/v1beta2/language-api.json +++ b/language/v1beta2/language-api.json @@ -246,7 +246,7 @@ } } }, - "revision": "20240211", + "revision": "20240217", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -465,47 +465,12 @@ "type": "string" }, "features": { - "$ref": "AnnotateTextRequestFeatures", + "$ref": "Features", "description": "Required. The enabled features." } }, "type": "object" }, - "AnnotateTextRequestFeatures": { - "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. Next ID: 12", - "id": "AnnotateTextRequestFeatures", - "properties": { - "classificationModelOptions": { - "$ref": "ClassificationModelOptions", - "description": "Optional. The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true." - }, - "classifyText": { - "description": "Classify the full document into categories. If this is true, the API will use the default model which classifies into a [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories).", - "type": "boolean" - }, - "extractDocumentSentiment": { - "description": "Extract document-level sentiment.", - "type": "boolean" - }, - "extractEntities": { - "description": "Extract entities.", - "type": "boolean" - }, - "extractEntitySentiment": { - "description": "Extract entities and their associated sentiment.", - "type": "boolean" - }, - "extractSyntax": { - "description": "Extract syntax information.", - "type": "boolean" - }, - "moderateText": { - "description": "Moderate the document for harmful and sensitive categories.", - "type": "boolean" - } - }, - "type": "object" - }, "AnnotateTextResponse": { "description": "The text annotations response message.", "id": "AnnotateTextResponse", @@ -577,43 +542,16 @@ "id": "ClassificationModelOptions", "properties": { "v1Model": { - "$ref": "ClassificationModelOptionsV1Model", + "$ref": "V1Model", "description": "Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future." }, "v2Model": { - "$ref": "ClassificationModelOptionsV2Model", + "$ref": "V2Model", "description": "Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model." } }, "type": "object" }, - "ClassificationModelOptionsV1Model": { - "description": "Options for the V1 model.", - "id": "ClassificationModelOptionsV1Model", - "properties": {}, - "type": "object" - }, - "ClassificationModelOptionsV2Model": { - "description": "Options for the V2 model.", - "id": "ClassificationModelOptionsV2Model", - "properties": { - "contentCategoriesVersion": { - "description": "The content categories used for classification.", - "enum": [ - "CONTENT_CATEGORIES_VERSION_UNSPECIFIED", - "V1", - "V2" - ], - "enumDescriptions": [ - "If `ContentCategoriesVersion` is not specified, this option will default to `V1`.", - "Legacy content categories of our initial launch in 2017.", - "Updated content categories in 2022." - ], - "type": "string" - } - }, - "type": "object" - }, "ClassifyTextRequest": { "description": "The document classification request message.", "id": "ClassifyTextRequest", @@ -643,419 +581,6 @@ }, "type": "object" }, - "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", - "id": "Color", - "properties": { - "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", - "format": "float", - "type": "number" - }, - "blue": { - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "green": { - "description": "The amount of green in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "red": { - "description": "The amount of red in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "CpuMetric": { - "description": "Metric for billing reports.", - "id": "CpuMetric", - "properties": { - "coreNumber": { - "description": "Required. Number of CPU cores.", - "format": "int64", - "type": "string" - }, - "coreSec": { - "description": "Required. Total seconds of core usage, e.g. 4.", - "format": "int64", - "type": "string" - }, - "cpuType": { - "description": "Required. Type of cpu, e.g. N2.", - "enum": [ - "UNKNOWN_CPU_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "GPU-based machine, skip quota reporting.", - "GPU-based machine, skip quota reporting.", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "GPU-based machine, skip quota reporting.", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, "DependencyEdge": { "description": "Represents dependency parse tree information for a token.", "id": "DependencyEdge", @@ -1242,37 +767,6 @@ }, "type": "object" }, - "DiskMetric": { - "id": "DiskMetric", - "properties": { - "diskType": { - "description": "Required. Type of Disk, e.g. REGIONAL_SSD.", - "enum": [ - "UNKNOWN_DISK_TYPE", - "REGIONAL_SSD", - "REGIONAL_STORAGE", - "PD_SSD", - "PD_STANDARD", - "STORAGE_SNAPSHOT" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "gibSec": { - "description": "Required. Seconds of physical disk usage, e.g. 3600.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "Document": { "description": "Represents the input to API methods.", "id": "Document", @@ -1421,414 +915,37 @@ }, "type": "object" }, - "GpuMetric": { - "id": "GpuMetric", + "Features": { + "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. Next ID: 12", + "id": "Features", "properties": { - "gpuSec": { - "description": "Required. Seconds of GPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "gpuType": { - "description": "Required. Type of GPU, e.g. NVIDIA_TESLA_V100.", - "enum": [ - "UNKNOWN_GPU_TYPE", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_TESLA_K80", - "NVIDIA_L4", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_V100", - "NVIDIA_H100_80GB" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" + "classificationModelOptions": { + "$ref": "ClassificationModelOptions", + "description": "Optional. The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true." }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" + "classifyText": { + "description": "Classify the full document into categories. If this is true, the API will use the default model which classifies into a [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories).", + "type": "boolean" }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, - "InfraUsage": { - "description": "Infra Usage of billing metrics. Next ID: 6", - "id": "InfraUsage", - "properties": { - "cpuMetrics": { - "description": "Aggregated core metrics since requested start_time.", - "items": { - "$ref": "CpuMetric" - }, - "type": "array" + "extractDocumentSentiment": { + "description": "Extract document-level sentiment.", + "type": "boolean" }, - "diskMetrics": { - "description": "Aggregated persistent disk metrics since requested start_time.", - "items": { - "$ref": "DiskMetric" - }, - "type": "array" + "extractEntities": { + "description": "Extract entities.", + "type": "boolean" }, - "gpuMetrics": { - "description": "Aggregated gpu metrics since requested start_time.", - "items": { - "$ref": "GpuMetric" - }, - "type": "array" + "extractEntitySentiment": { + "description": "Extract entities and their associated sentiment.", + "type": "boolean" }, - "ramMetrics": { - "description": "Aggregated ram metrics since requested start_time.", - "items": { - "$ref": "RamMetric" - }, - "type": "array" + "extractSyntax": { + "description": "Extract syntax information.", + "type": "boolean" }, - "tpuMetrics": { - "description": "Aggregated tpu metrics since requested start_time.", - "items": { - "$ref": "TpuMetric" - }, - "type": "array" + "moderateText": { + "description": "Moderate the document for harmful and sensitive categories.", + "type": "boolean" } }, "type": "object" @@ -2125,391 +1242,6 @@ }, "type": "object" }, - "RamMetric": { - "id": "RamMetric", - "properties": { - "gibSec": { - "description": "Required. VM memory in Gigabyte second, e.g. 3600. Using int64 type to match billing metrics definition.", - "format": "int64", - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "memories": { - "description": "Required. VM memory in gb.", - "format": "double", - "type": "number" - }, - "ramType": { - "description": "Required. Type of ram.", - "enum": [ - "UNKNOWN_RAM_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "", - "", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, "Sentence": { "description": "Represents a sentence in the input document.", "id": "Sentence", @@ -2608,3079 +1340,32 @@ }, "type": "object" }, - "TpuMetric": { - "id": "TpuMetric", + "V1Model": { + "description": "Options for the V1 model.", + "id": "V1Model", + "properties": {}, + "type": "object" + }, + "V2Model": { + "description": "Options for the V2 model.", + "id": "V2Model", "properties": { - "tpuSec": { - "description": "Required. Seconds of TPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "tpuType": { - "description": "Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD.", + "contentCategoriesVersion": { + "description": "The content categories used for classification.", "enum": [ - "UNKNOWN_TPU_TYPE", - "TPU_V2_POD", - "TPU_V2", - "TPU_V3_POD", - "TPU_V3", - "TPU_V5_LITEPOD" + "CONTENT_CATEGORIES_VERSION_UNSPECIFIED", + "V1", + "V2" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "" + "If `ContentCategoriesVersion` is not specified, this option will default to `V1`.", + "Legacy content categories of our initial launch in 2017.", + "Updated content categories in 2022." ], "type": "string" } }, "type": "object" - }, - "XPSArrayStats": { - "description": "The data statistics of a series of ARRAY values.", - "id": "XPSArrayStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "memberStats": { - "$ref": "XPSDataStats", - "description": "Stats of all the values of all arrays, as if they were a single long series of data. The type depends on the element type of the array." - } - }, - "type": "object" - }, - "XPSBatchPredictResponse": { - "id": "XPSBatchPredictResponse", - "properties": { - "exampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples for batch prediction result. Under full API implementation, results are stored in shared RecordIO of AnnotatedExample protobufs, the annotations field of which is populated by XPS backend." - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntry": { - "description": "Bounding box matching model metrics for a single intersection-over-union threshold and multiple label match confidence thresholds.", - "id": "XPSBoundingBoxMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "The intersection-over-union threshold value used to compute this metrics entry.", - "format": "float", - "type": "number" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSCategoryStats": { - "description": "The data statistics of a series of CATEGORY values.", - "id": "XPSCategoryStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topCategoryStats": { - "description": "The statistics of the top 20 CATEGORY values, ordered by CategoryStats.SingleCategoryStats.count.", - "items": { - "$ref": "XPSCategoryStatsSingleCategoryStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCategoryStatsSingleCategoryStats": { - "description": "The statistics of a single CATEGORY value.", - "id": "XPSCategoryStatsSingleCategoryStats", - "properties": { - "count": { - "description": "The number of occurrences of this value in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The CATEGORY value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSClassificationEvaluationMetrics": { - "description": "Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9.", - "id": "XPSClassificationEvaluationMetrics", - "properties": { - "auPrc": { - "description": "The Area under precision recall curve metric.", - "format": "float", - "type": "number" - }, - "auRoc": { - "description": "The Area Under Receiver Operating Characteristic curve metric. Micro-averaged for the overall evaluation.", - "format": "float", - "type": "number" - }, - "baseAuPrc": { - "description": "The Area under precision recall curve metric based on priors.", - "format": "float", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the evaluation. Only set for MULTICLASS classification problems where number of annotation specs is no more than 10. Only set for model level evaluation, not for evaluation per label." - }, - "evaluatedExamplesCount": { - "description": "The number of examples used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "logLoss": { - "description": "The Log Loss metric.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSColorMap": { - "description": "Map from color to display name. Will only be used by Image Segmentation for uCAIP.", - "id": "XPSColorMap", - "properties": { - "annotationSpecIdToken": { - "description": "Should be used during training.", - "type": "string" - }, - "color": { - "$ref": "Color", - "deprecated": true, - "description": "This type is deprecated in favor of the IntColor below. This is because google.type.Color represent color has a float which semantically does not reflect discrete classes/categories concept. Moreover, to handle it well we need to have some tolerance when converting to a discretized color. As such, the recommendation is to have API surface still use google.type.Color while internally IntColor is used." - }, - "displayName": { - "description": "Should be used during preprocessing.", - "type": "string" - }, - "intColor": { - "$ref": "XPSColorMapIntColor" - } - }, - "type": "object" - }, - "XPSColorMapIntColor": { - "description": "RGB color and each channel is represented by an integer.", - "id": "XPSColorMapIntColor", - "properties": { - "blue": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "green": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "red": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSColumnSpec": { - "id": "XPSColumnSpec", - "properties": { - "columnId": { - "description": "The unique id of the column. When Preprocess, the Tables BE will popuate the order id of the column, which reflects the order of the column inside the table, i.e. 0 means the first column in the table, N-1 means the last column. AutoML BE will persist this order id in Spanner and set the order id here when calling RefreshTablesStats and Train. Note: it's different than the column_spec_id that is generated in AutoML BE.", - "format": "int32", - "type": "integer" - }, - "dataStats": { - "$ref": "XPSDataStats", - "description": "The data stats of the column. It's outputed in RefreshTablesStats and a required input for Train." - }, - "dataType": { - "$ref": "XPSDataType", - "description": "The data type of the column. It's outputed in Preprocess rpc and a required input for RefreshTablesStats and Train." - }, - "displayName": { - "description": "The display name of the column. It's outputed in Preprocess and a required input for RefreshTablesStats and Train.", - "type": "string" - }, - "forecastingMetadata": { - "$ref": "XPSColumnSpecForecastingMetadata" - }, - "topCorrelatedColumns": { - "description": "It's outputed in RefreshTablesStats, and a required input in Train.", - "items": { - "$ref": "XPSColumnSpecCorrelatedColumn" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSColumnSpecCorrelatedColumn": { - "description": "Identifies a table's column, and its correlation with the column this ColumnSpec describes.", - "id": "XPSColumnSpecCorrelatedColumn", - "properties": { - "columnId": { - "format": "int32", - "type": "integer" - }, - "correlationStats": { - "$ref": "XPSCorrelationStats" - } - }, - "type": "object" - }, - "XPSColumnSpecForecastingMetadata": { - "description": "=========================================================================== # The fields below are used exclusively for Forecasting.", - "id": "XPSColumnSpecForecastingMetadata", - "properties": { - "columnType": { - "description": "The type of the column for FORECASTING model training purposes.", - "enum": [ - "COLUMN_TYPE_UNSPECIFIED", - "KEY", - "KEY_METADATA", - "TIME_SERIES_AVAILABLE_PAST_ONLY", - "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - ], - "enumDescriptions": [ - "An un-set value of this enum.", - "Key columns are used to identify timeseries.", - "This column contains information describing static properties of the entities identified by the key column(s) (e.g. city's ZIP code).", - "This column contains information for the given entity, at any time poinrt, they are only available in the time series before.", - "This column contains information for the given entity is known both for the past and the sufficiently far future." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSCommonStats": { - "description": "Common statistics for a column with a specified data type.", - "id": "XPSCommonStats", - "properties": { - "distinctValueCount": { - "format": "int64", - "type": "string" - }, - "nullValueCount": { - "format": "int64", - "type": "string" - }, - "validValueCount": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfidenceMetricsEntry": { - "description": "ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next tag: 16.", - "id": "XPSConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Metrics are computed with an assumption that the model never return predictions with score lower than this value.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "f1ScoreAt1": { - "description": "The harmonic mean of recall_at1 and precision_at1.", - "format": "float", - "type": "number" - }, - "falseNegativeCount": { - "description": "The number of ground truth labels that are not matched by a model created label.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "The number of model created labels that do not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "False Positive Rate for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "falsePositiveRateAt1": { - "description": "The False Positive Rate when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "positionThreshold": { - "description": "Metrics are computed with an assumption that the model always returns at most this many predictions (ordered by their score, descendingly), but they all still need to meet the confidence_threshold.", - "format": "int32", - "type": "integer" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "precisionAt1": { - "description": "The precision when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall (true positive rate) for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recallAt1": { - "description": "The recall (true positive rate) when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "trueNegativeCount": { - "description": "The number of labels that were not created by the model, but if they would, they would not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "The number of model created labels that match a ground truth label.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfusionMatrix": { - "description": "Confusion matrix of the model running the classification.", - "id": "XPSConfusionMatrix", - "properties": { - "annotationSpecIdToken": { - "description": "For the following three repeated fields, only one is intended to be set. annotation_spec_id_token is preferable to be set. ID tokens of the annotation specs used in the confusion matrix.", - "items": { - "type": "string" - }, - "type": "array" - }, - "category": { - "description": "Category (mainly for segmentation). Set only for image segmentation models. Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "row": { - "description": "Rows in the confusion matrix. The number of rows is equal to the size of `annotation_spec_id_token`. `row[i].value[j]` is the number of examples that have ground truth of the `annotation_spec_id_token[i]` and are predicted as `annotation_spec_id_token[j]` by the model being evaluated.", - "items": { - "$ref": "XPSConfusionMatrixRow" - }, - "type": "array" - }, - "sentimentLabel": { - "description": "Sentiment labels used in the confusion matrix. Set only for text sentiment models. For AutoML Text Revamp, use `annotation_spec_id_token` instead and leave this field empty.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSConfusionMatrixRow": { - "description": "A row in the confusion matrix.", - "id": "XPSConfusionMatrixRow", - "properties": { - "count": { - "description": "Same as above except intended to represent other counts (for e.g. for segmentation this is pixel count). NOTE(params): Only example_count or count is set (oneoff does not support repeated fields unless they are embedded inside another message).", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "exampleCount": { - "description": "Value of the specific cell in the confusion matrix. The number of values each row has (i.e. the length of the row) is equal to the length of the annotation_spec_id_token field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCoreMlFormat": { - "description": "A model format used for iOS mobile devices.", - "id": "XPSCoreMlFormat", - "properties": {}, - "type": "object" - }, - "XPSCorrelationStats": { - "description": "A correlation statistics between two series of DataType values. The series may have differing DataType-s, but within a single series the DataType must be the same.", - "id": "XPSCorrelationStats", - "properties": { - "cramersV": { - "description": "The correlation value using the Cramer's V measure.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSDataErrors": { - "description": "Different types of errors and the stats associatesd with each error.", - "id": "XPSDataErrors", - "properties": { - "count": { - "description": "Number of records having errors associated with the enum.", - "format": "int32", - "type": "integer" - }, - "errorType": { - "description": "Type of the error.", - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "UNSUPPORTED_AUDIO_FORMAT", - "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT", - "FILE_TOO_LARGE", - "MISSING_TRANSCRIPTION" - ], - "enumDescriptions": [ - "Not specified.", - "Audio format not in the formats by cloud-speech AutoML. Currently only wav and flac file formats are supported.", - "File format differnt from what is specified in the file name extension.", - "File too large. Maximum allowed size is 50 MB.", - "Transcript is missing." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDataStats": { - "description": "The data statistics of a series of values that share the same DataType.", - "id": "XPSDataStats", - "properties": { - "arrayStats": { - "$ref": "XPSArrayStats", - "description": "The statistics for ARRAY DataType." - }, - "categoryStats": { - "$ref": "XPSCategoryStats", - "description": "The statistics for CATEGORY DataType." - }, - "distinctValueCount": { - "description": "The number of distinct values.", - "format": "int64", - "type": "string" - }, - "float64Stats": { - "$ref": "XPSFloat64Stats", - "description": "The statistics for FLOAT64 DataType." - }, - "nullValueCount": { - "description": "The number of values that are null.", - "format": "int64", - "type": "string" - }, - "stringStats": { - "$ref": "XPSStringStats", - "description": "The statistics for STRING DataType." - }, - "structStats": { - "$ref": "XPSStructStats", - "description": "The statistics for STRUCT DataType." - }, - "timestampStats": { - "$ref": "XPSTimestampStats", - "description": "The statistics for TIMESTAMP DataType." - }, - "validValueCount": { - "description": "The number of values that are valid.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSDataType": { - "description": "Indicated the type of data that can be stored in a structured data entity (e.g. a table).", - "id": "XPSDataType", - "properties": { - "compatibleDataTypes": { - "description": "The highly compatible data types to this data type.", - "items": { - "$ref": "XPSDataType" - }, - "type": "array" - }, - "listElementType": { - "$ref": "XPSDataType", - "description": "If type_code == ARRAY, then `list_element_type` is the type of the elements." - }, - "nullable": { - "description": "If true, this DataType can also be `null`.", - "type": "boolean" - }, - "structType": { - "$ref": "XPSStructType", - "description": "If type_code == STRUCT, then `struct_type` provides type information for the struct's fields." - }, - "timeFormat": { - "description": "If type_code == TIMESTAMP then `time_format` provides the format in which that time field is expressed. The time_format must be written in `strftime` syntax. If time_format is not set, then the default format as described on the field is used.", - "type": "string" - }, - "typeCode": { - "description": "Required. The TypeCode for this type.", - "enum": [ - "TYPE_CODE_UNSPECIFIED", - "FLOAT64", - "TIMESTAMP", - "STRING", - "ARRAY", - "STRUCT", - "CATEGORY" - ], - "enumDescriptions": [ - "Not specified. Should not be used.", - "Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or `\"-Infinity\"`.", - "Must be between 0AD and 9999AD. Encoded as `string` according to time_format, or, if that format is not set, then in RFC 3339 `date-time` format, where `time-offset` = `\"Z\"` (e.g. 1985-04-12T23:20:50.52Z).", - "Encoded as `string`.", - "Encoded as `list`, where the list elements are represented according to list_element_type.", - "Encoded as `struct`, where field values are represented according to struct_type.", - "Values of this type are not further understood by AutoML, e.g. AutoML is unable to tell the order of values (as it could with FLOAT64), or is unable to say if one value contains another (as it could with STRING). Encoded as `string` (bytes should be base64-encoded, as described in RFC 4648, section 4)." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDockerFormat": { - "description": "A model format used for Docker containers. Use the params field to customize the container. The container is verified to work correctly on ubuntu 16.04 operating system.", - "id": "XPSDockerFormat", - "properties": { - "cpuArchitecture": { - "description": "Optional. Additional cpu information describing the requirements for the to be exported model files.", - "enum": [ - "CPU_ARCHITECTURE_UNSPECIFIED", - "CPU_ARCHITECTURE_X86_64" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "gpuArchitecture": { - "description": "Optional. Additional gpu information describing the requirements for the to be exported model files.", - "enum": [ - "GPU_ARCHITECTURE_UNSPECIFIED", - "GPU_ARCHITECTURE_NVIDIA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSEdgeTpuTfLiteFormat": { - "description": "A model format used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "id": "XPSEdgeTpuTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSEvaluationMetrics": { - "description": "Contains xPS-specific model evaluation metrics either for a single annotation spec (label), or for the model overall. Next tag: 18.", - "id": "XPSEvaluationMetrics", - "properties": { - "annotationSpecIdToken": { - "description": "The annotation_spec for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The value comes from the input annotations in AnnotatedExample. For MVP product or for text sentiment models where annotation_spec_id_token is not available, set label instead.", - "type": "string" - }, - "category": { - "description": "The integer category label for which this evaluation metric instance had been created. Valid categories are 0 or higher. Overall model evaluation should set this to negative values (rather than implicit zero). Only used for Image Segmentation (prefer to set annotation_spec_id_token instead). Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "format": "int32", - "type": "integer" - }, - "evaluatedExampleCount": { - "description": "The number of examples used to create this evaluation metrics instance.", - "format": "int32", - "type": "integer" - }, - "imageClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "imageObjectDetectionEvalMetrics": { - "$ref": "XPSImageObjectDetectionEvaluationMetrics" - }, - "imageSegmentationEvalMetrics": { - "$ref": "XPSImageSegmentationEvaluationMetrics" - }, - "label": { - "description": "The label for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The label maps to AnnotationSpec.display_name in Public API protos. Only used by MVP implementation and text sentiment FULL implementation.", - "type": "string" - }, - "regressionEvalMetrics": { - "$ref": "XPSRegressionEvaluationMetrics" - }, - "tablesClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "tablesEvalMetrics": { - "$ref": "XPSTablesEvaluationMetrics" - }, - "textClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "textExtractionEvalMetrics": { - "$ref": "XPSTextExtractionEvaluationMetrics" - }, - "textSentimentEvalMetrics": { - "$ref": "XPSTextSentimentEvaluationMetrics" - }, - "translationEvalMetrics": { - "$ref": "XPSTranslationEvaluationMetrics" - }, - "videoActionRecognitionEvalMetrics": { - "$ref": "XPSVideoActionRecognitionEvaluationMetrics" - }, - "videoClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "videoObjectTrackingEvalMetrics": { - "$ref": "XPSVideoObjectTrackingEvaluationMetrics" - } - }, - "type": "object" - }, - "XPSEvaluationMetricsSet": { - "description": "Specifies location of model evaluation metrics.", - "id": "XPSEvaluationMetricsSet", - "properties": { - "evaluationMetrics": { - "description": "Inline EvaluationMetrics - should be relatively small. For passing large quantities of exhaustive metrics, use file_spec.", - "items": { - "$ref": "XPSEvaluationMetrics" - }, - "type": "array" - }, - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec containing evaluation metrics of a model, must point to RecordIO file(s) of intelligence.cloud.automl.xps.EvaluationMetrics messages." - }, - "numEvaluationMetrics": { - "description": "Number of the evaluation metrics (usually one per label plus overall).", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExampleSet": { - "description": "Set of examples or input sources.", - "id": "XPSExampleSet", - "properties": { - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec of the examples or input sources." - }, - "fingerprint": { - "description": "Fingerprint of the example set.", - "format": "int64", - "type": "string" - }, - "numExamples": { - "description": "Number of examples.", - "format": "int64", - "type": "string" - }, - "numInputSources": { - "description": "Number of input sources.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExportModelOutputConfig": { - "id": "XPSExportModelOutputConfig", - "properties": { - "coreMlFormat": { - "$ref": "XPSCoreMlFormat" - }, - "dockerFormat": { - "$ref": "XPSDockerFormat" - }, - "edgeTpuTfLiteFormat": { - "$ref": "XPSEdgeTpuTfLiteFormat" - }, - "exportFirebaseAuxiliaryInfo": { - "description": "For any model and format: If true, will additionally export FirebaseExportedModelInfo in a firebase.txt file.", - "type": "boolean" - }, - "outputGcrUri": { - "description": "The Google Contained Registry (GCR) path the exported files to be pushed to. This location is set if the exported format is DOCKDER.", - "type": "string" - }, - "outputGcsUri": { - "description": "The Google Cloud Storage (GCS) directory where XPS will output the exported models and related files. Format: gs://bucket/directory", - "type": "string" - }, - "tfJsFormat": { - "$ref": "XPSTfJsFormat" - }, - "tfLiteFormat": { - "$ref": "XPSTfLiteFormat" - }, - "tfSavedModelFormat": { - "$ref": "XPSTfSavedModelFormat" - } - }, - "type": "object" - }, - "XPSFileSpec": { - "description": "Spec of input and output files, on external file systems (CNS, GCS, etc).", - "id": "XPSFileSpec", - "properties": { - "directoryPath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - }, - "fileFormat": { - "enum": [ - "FILE_FORMAT_UNKNOWN", - "FILE_FORMAT_SSTABLE", - "FILE_FORMAT_TRANSLATION_RKV", - "FILE_FORMAT_RECORDIO", - "FILE_FORMAT_RAW_CSV", - "FILE_FORMAT_RAW_CAPACITOR" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "Internal format for parallel text data used by Google Translate. go/rkvtools", - "", - "Only the lexicographically first file described by the file_spec contains the header line.", - "" - ], - "type": "string" - }, - "fileSpec": { - "description": "Single file path, or file pattern of format \"/path/to/file@shard_count\". E.g. /cns/cell-d/somewhere/file@2 is expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and /cns/cell-d/somewhere/file-00001-of-00002.", - "type": "string" - }, - "singleFilePath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - } - }, - "type": "object" - }, - "XPSFloat64Stats": { - "description": "The data statistics of a series of FLOAT64 values.", - "id": "XPSFloat64Stats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "histogramBuckets": { - "description": "Histogram buckets of the data series. Sorted by the min value of the bucket, ascendingly, and the number of the buckets is dynamically generated. The buckets are non-overlapping and completely cover whole FLOAT64 range with min of first bucket being `\"-Infinity\"`, and max of the last one being `\"Infinity\"`.", - "items": { - "$ref": "XPSFloat64StatsHistogramBucket" - }, - "type": "array" - }, - "mean": { - "description": "The mean of the series.", - "format": "double", - "type": "number" - }, - "quantiles": { - "description": "Ordered from 0 to k k-quantile values of the data series of n values. The value at index i is, approximately, the i*n/k-th smallest value in the series; for i = 0 and i = k these are, respectively, the min and max values.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - }, - "standardDeviation": { - "description": "The standard deviation of the series.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSFloat64StatsHistogramBucket": { - "description": "A bucket of a histogram.", - "id": "XPSFloat64StatsHistogramBucket", - "properties": { - "count": { - "description": "The number of data values that are in the bucket, i.e. are between min and max values.", - "format": "int64", - "type": "string" - }, - "max": { - "description": "The maximum value of the bucket, exclusive unless max = `\"Infinity\"`, in which case it's inclusive.", - "format": "double", - "type": "number" - }, - "min": { - "description": "The minimum value of the bucket, inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageClassificationTrainResponse": { - "id": "XPSImageClassificationTrainResponse", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Populated for AutoMl requests." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostInNodeTime": { - "description": "The actual cost to create this model. - For edge type model, the cost is expressed in node hour. - For cloud type model,the cost is expressed in compute hour. - Populated for models created before GA. To be deprecated after GA.", - "format": "google-duration", - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual training cost, expressed in node seconds. Populated for models trained in node time.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSImageExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageModelArtifactSpec": { - "description": "Stores the locations and related metadata of the model artifacts. Populated for uCAIP requests only.", - "id": "XPSImageModelArtifactSpec", - "properties": { - "checkpointArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The Tensorflow checkpoint files. e.g. Used for resumable training." - }, - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "labelGcsUri": { - "description": "GCS uri of decoded labels file for model export 'dict.txt'.", - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud AI Platform API." - }, - "tfJsBinaryGcsPrefix": { - "description": "GCS uri prefix of Tensorflow JavaScript binary files 'groupX-shardXofX.bin' Deprecated.", - "type": "string" - }, - "tfLiteMetadataGcsUri": { - "description": "GCS uri of Tensorflow Lite metadata 'tflite_metadata.json'.", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpec": { - "description": "Serving specification for image models.", - "id": "XPSImageModelServingSpec", - "properties": { - "modelThroughputEstimation": { - "description": "Populate under uCAIP request scope.", - "items": { - "$ref": "XPSImageModelServingSpecModelThroughputEstimation" - }, - "type": "array" - }, - "nodeQps": { - "description": "An estimated value of how much traffic a node can serve. Populated for AutoMl request only.", - "format": "double", - "type": "number" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpecModelThroughputEstimation": { - "id": "XPSImageModelServingSpecModelThroughputEstimation", - "properties": { - "computeEngineAcceleratorType": { - "enum": [ - "UNSPECIFIED", - "NVIDIA_TESLA_K80", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_V100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_L4", - "NVIDIA_H100_80GB", - "TPU_V2", - "TPU_V3", - "TPU_V4_POD", - "TPU_V5_LITEPOD" - ], - "enumDescriptions": [ - "", - "Nvidia Tesla K80 GPU.", - "Nvidia Tesla P100 GPU.", - "Nvidia Tesla V100 GPU.", - "Nvidia Tesla P4 GPU.", - "Nvidia Tesla T4 GPU.", - "Nvidia Tesla A100 GPU.", - "Nvidia A100 80GB GPU.", - "Nvidia L4 GPU.", - "Nvidia H100 80Gb GPU.", - "TPU v2 (JellyFish).", - "TPU v3 (DragonFish).", - "TPU_v4 (PufferFish).", - "TPU v5 Lite Pods." - ], - "type": "string" - }, - "latencyInMilliseconds": { - "description": "Estimated latency.", - "format": "double", - "type": "number" - }, - "nodeQps": { - "description": "The approximate qps a deployed node can serve.", - "format": "double", - "type": "number" - }, - "servomaticPartitionType": { - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionEvaluationMetrics": { - "description": "Model evaluation metrics for image object detection problems. Evaluates prediction quality of labeled bounding boxes.", - "id": "XPSImageObjectDetectionEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingBoxCount": { - "description": "The total number of bounding boxes (i.e. summed over all images) the ground truth used to create this evaluation had.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionModelSpec": { - "id": "XPSImageObjectDetectionModelSpec", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec" - }, - "maxBoundingBoxCount": { - "description": "Max number of bounding box.", - "format": "int64", - "type": "string" - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetrics": { - "description": "Model evaluation metrics for image segmentation problems. Next tag: 4.", - "id": "XPSImageSegmentationEvaluationMetrics", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the per confidence_threshold evaluation. Pixel counts are set here. Only set for model level evaluation, not for evaluation per label." - }, - "diceScoreCoefficient": { - "description": "DSC or the F1 score: The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "iouScore": { - "description": "IOU score.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageSegmentationTrainResponse": { - "id": "XPSImageSegmentationTrainResponse", - "properties": { - "colorMaps": { - "description": "Color map of the model.", - "items": { - "$ref": "XPSColorMap" - }, - "type": "array" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "NOTE: These fields are not used/needed in EAP but will be set later." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope. Model artifact spec stores and model gcs pathes and related metadata" - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSIntegratedGradientsAttribution": { - "deprecated": true, - "description": "An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365", - "id": "XPSIntegratedGradientsAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSMetricEntry": { - "id": "XPSMetricEntry", - "properties": { - "argentumMetricId": { - "description": "For billing metrics that are using legacy sku's, set the legacy billing metric id here. This will be sent to Chemist as the \"cloudbilling.googleapis.com/argentum_metric_id\" label. Otherwise leave empty.", - "type": "string" - }, - "doubleValue": { - "description": "A double value.", - "format": "double", - "type": "number" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "format": "int64", - "type": "string" - }, - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" - }, - "systemLabels": { - "description": "Billing system labels for this (metric, value) pair.", - "items": { - "$ref": "XPSMetricEntryLabel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSMetricEntryLabel": { - "id": "XPSMetricEntryLabel", - "properties": { - "labelName": { - "description": "The name of the label.", - "type": "string" - }, - "labelValue": { - "description": "The value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "XPSModelArtifactItem": { - "description": "A single model artifact item.", - "id": "XPSModelArtifactItem", - "properties": { - "artifactFormat": { - "description": "The model artifact format.", - "enum": [ - "ARTIFACT_FORMAT_UNSPECIFIED", - "TF_CHECKPOINT", - "TF_SAVED_MODEL", - "TF_LITE", - "EDGE_TPU_TF_LITE", - "TF_JS", - "CORE_ML" - ], - "enumDescriptions": [ - "Should not be used.", - "The Tensorflow checkpoints. See https://www.tensorflow.org/guide/checkpoint.", - "The Tensorflow SavedModel binary.", - "Model artifact in generic TensorFlow Lite (.tflite) format. See https://www.tensorflow.org/lite.", - "Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "Used for iOS mobile devices in (.mlmodel) format. See https://developer.apple.com/documentation/coreml" - ], - "type": "string" - }, - "gcsUri": { - "description": "The Google Cloud Storage (GCS) uri that stores the model binary files.", - "type": "string" - } - }, - "type": "object" - }, - "XPSPreprocessResponse": { - "description": "Next ID: 8", - "id": "XPSPreprocessResponse", - "properties": { - "outputExampleSet": { - "$ref": "XPSExampleSet", - "description": "Preprocessed examples, that are to be imported into AutoML storage. This should point to RecordIO file(s) of PreprocessedExample messages. The PreprocessedExample.mvp_training_data-s returned here are later verbatim passed to Train() call in TrainExample.mvp_training_data." - }, - "speechPreprocessResp": { - "$ref": "XPSSpeechPreprocessResponse" - }, - "tablesPreprocessResponse": { - "$ref": "XPSTablesPreprocessResponse" - }, - "translationPreprocessResp": { - "$ref": "XPSTranslationPreprocessResponse" - } - }, - "type": "object" - }, - "XPSRegressionEvaluationMetrics": { - "description": "Model evaluation metrics for regression problems. It can be used for Tables.", - "id": "XPSRegressionEvaluationMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean Absolute Error (MAE).", - "format": "float", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error. Only set if all ground truth values are positive.", - "format": "float", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "float", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root Mean Squared Error (RMSE).", - "format": "float", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSRegressionMetricsEntry": { - "description": "A pair of actual \u0026 observed values for the model being evaluated.", - "id": "XPSRegressionMetricsEntry", - "properties": { - "predictedValue": { - "description": "The observed value for a row in the dataset.", - "format": "float", - "type": "number" - }, - "trueValue": { - "description": "The actual target value for a row in the dataset.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSReportingMetrics": { - "id": "XPSReportingMetrics", - "properties": { - "effectiveTrainingDuration": { - "deprecated": true, - "description": "The effective time training used. If set, this is used for quota management and billing. Deprecated. AutoML BE doesn't use this. Don't set.", - "format": "google-duration", - "type": "string" - }, - "metricEntries": { - "description": "One entry per metric name. The values must be aggregated per metric name.", - "items": { - "$ref": "XPSMetricEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadata": { - "deprecated": true, - "id": "XPSResponseExplanationMetadata", - "properties": { - "inputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataInputMetadata" - }, - "description": "Metadata of the input.", - "type": "object" - }, - "outputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataOutputMetadata" - }, - "description": "Metadata of the output.", - "type": "object" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataInputMetadata": { - "description": "Metadata of the input of a feature.", - "id": "XPSResponseExplanationMetadataInputMetadata", - "properties": { - "inputTensorName": { - "description": "Name of the input tensor for this model. Only needed in train response.", - "type": "string" - }, - "modality": { - "description": "Modality of the feature. Valid values are: numeric, image. Defaults to numeric.", - "enum": [ - "MODALITY_UNSPECIFIED", - "NUMERIC", - "IMAGE", - "CATEGORICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "visualizationConfig": { - "$ref": "XPSVisualization", - "description": "Visualization configurations for image explanation." - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataOutputMetadata": { - "description": "Metadata of the prediction output to be explained.", - "id": "XPSResponseExplanationMetadataOutputMetadata", - "properties": { - "outputTensorName": { - "description": "Name of the output tensor. Only needed in train response.", - "type": "string" - } - }, - "type": "object" - }, - "XPSResponseExplanationParameters": { - "deprecated": true, - "id": "XPSResponseExplanationParameters", - "properties": { - "integratedGradientsAttribution": { - "$ref": "XPSIntegratedGradientsAttribution", - "description": "An attribution method that computes Aumann-Shapley values taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365" - }, - "xraiAttribution": { - "$ref": "XPSXraiAttribution", - "description": "An attribution method that redistributes Integrated Gradients attribution to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 XRAI currently performs better on natural images, like a picture of a house or an animal. If the images are taken in artificial environments, like a lab or manufacturing line, or from diagnostic equipment, like x-rays or quality-control cameras, use Integrated Gradients instead." - } - }, - "type": "object" - }, - "XPSResponseExplanationSpec": { - "deprecated": true, - "description": "Specification of Model explanation. Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 for context.", - "id": "XPSResponseExplanationSpec", - "properties": { - "explanationType": { - "description": "Explanation type. For AutoML Image Classification models, possible values are: * `image-integrated-gradients` * `image-xrai`", - "type": "string" - }, - "metadata": { - "$ref": "XPSResponseExplanationMetadata", - "description": "Metadata describing the Model's input and output for explanation." - }, - "parameters": { - "$ref": "XPSResponseExplanationParameters", - "description": "Parameters that configure explaining of the Model's predictions." - } - }, - "type": "object" - }, - "XPSRow": { - "id": "XPSRow", - "properties": { - "columnIds": { - "description": "The ids of the columns. Note: The below `values` field must match order of this field, if this field is set.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "values": { - "description": "The values of the row cells, given in the same order as the column_ids. If column_ids is not set, then in the same order as the input_feature_column_ids in TablesModelMetadata.", - "items": { - "type": "any" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetrics": { - "id": "XPSSpeechEvaluationMetrics", - "properties": { - "subModelEvaluationMetrics": { - "description": "Evaluation metrics for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetricsSubModelEvaluationMetric": { - "id": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - }, - "numDeletions": { - "format": "int32", - "type": "integer" - }, - "numInsertions": { - "format": "int32", - "type": "integer" - }, - "numSubstitutions": { - "format": "int32", - "type": "integer" - }, - "numUtterances": { - "description": "Number of utterances used in the wer computation.", - "format": "int32", - "type": "integer" - }, - "numWords": { - "description": "Number of words over which the word error rate was computed.", - "format": "int32", - "type": "integer" - }, - "sentenceAccuracy": { - "description": "Below fields are used for debugging purposes", - "format": "double", - "type": "number" - }, - "wer": { - "description": "Word error rate (standard error metric used for speech recognition).", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSSpeechModelSpec": { - "id": "XPSSpeechModelSpec", - "properties": { - "datasetId": { - "description": "Required for speech xps backend. Speech xps has to use dataset_id and model_id as the primary key in db so that speech API can query the db directly.", - "format": "int64", - "type": "string" - }, - "language": { - "type": "string" - }, - "subModelSpecs": { - "description": "Model specs for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechModelSpecSubModelSpec" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechModelSpecSubModelSpec": { - "id": "XPSSpeechModelSpecSubModelSpec", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "clientId": { - "description": "In S3, Recognition ClientContextId.client_id", - "type": "string" - }, - "contextId": { - "description": "In S3, Recognition ClientContextId.context_id", - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - } - }, - "type": "object" - }, - "XPSSpeechPreprocessResponse": { - "id": "XPSSpeechPreprocessResponse", - "properties": { - "cnsTestDataPath": { - "description": "Location od shards of sstables (test data) of DataUtterance protos.", - "type": "string" - }, - "cnsTrainDataPath": { - "description": "Location of shards of sstables (training data) of DataUtterance protos.", - "type": "string" - }, - "prebuiltModelEvaluationMetrics": { - "$ref": "XPSSpeechEvaluationMetrics", - "description": "The metrics for prebuilt speech models. They are included here because there is no prebuilt speech models stored in the AutoML." - }, - "speechPreprocessStats": { - "$ref": "XPSSpeechPreprocessStats", - "description": "Stats associated with the data." - } - }, - "type": "object" - }, - "XPSSpeechPreprocessStats": { - "id": "XPSSpeechPreprocessStats", - "properties": { - "dataErrors": { - "description": "Different types of data errors and the counts associated with them.", - "items": { - "$ref": "XPSDataErrors" - }, - "type": "array" - }, - "numHumanLabeledExamples": { - "description": "The number of rows marked HUMAN_LABELLED", - "format": "int32", - "type": "integer" - }, - "numLogsExamples": { - "description": "The number of samples found in the previously recorded logs data.", - "format": "int32", - "type": "integer" - }, - "numMachineTranscribedExamples": { - "description": "The number of rows marked as MACHINE_TRANSCRIBED", - "format": "int32", - "type": "integer" - }, - "testExamplesCount": { - "description": "The number of examples labelled as TEST by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "testSentencesCount": { - "description": "The number of sentences in the test data set.", - "format": "int32", - "type": "integer" - }, - "testWordsCount": { - "description": "The number of words in the test data set.", - "format": "int32", - "type": "integer" - }, - "trainExamplesCount": { - "description": "The number of examples labeled as TRAIN by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "trainSentencesCount": { - "description": "The number of sentences in the training data set.", - "format": "int32", - "type": "integer" - }, - "trainWordsCount": { - "description": "The number of words in the training data set.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSStringStats": { - "description": "The data statistics of a series of STRING values.", - "id": "XPSStringStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topUnigramStats": { - "description": "The statistics of the top 20 unigrams, ordered by StringStats.UnigramStats.count.", - "items": { - "$ref": "XPSStringStatsUnigramStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSStringStatsUnigramStats": { - "description": "The statistics of a unigram.", - "id": "XPSStringStatsUnigramStats", - "properties": { - "count": { - "description": "The number of occurrences of this unigram in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The unigram.", - "type": "string" - } - }, - "type": "object" - }, - "XPSStructStats": { - "description": "The data statistics of a series of STRUCT values.", - "id": "XPSStructStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "fieldStats": { - "additionalProperties": { - "$ref": "XPSDataStats" - }, - "description": "Map from a field name of the struct to data stats aggregated over series of all data in that field across all the structs.", - "type": "object" - } - }, - "type": "object" - }, - "XPSStructType": { - "description": "`StructType` defines the DataType-s of a STRUCT type.", - "id": "XPSStructType", - "properties": { - "fields": { - "additionalProperties": { - "$ref": "XPSDataType" - }, - "description": "Unordered map of struct field names to their data types.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTableSpec": { - "id": "XPSTableSpec", - "properties": { - "columnSpecs": { - "additionalProperties": { - "$ref": "XPSColumnSpec" - }, - "description": "Mapping from column id to column spec.", - "type": "object" - }, - "importedDataSizeInBytes": { - "description": "The total size of imported data of the table.", - "format": "int64", - "type": "string" - }, - "rowCount": { - "description": "The number of rows in the table.", - "format": "int64", - "type": "string" - }, - "timeColumnId": { - "description": "The id of the time column.", - "format": "int32", - "type": "integer" - }, - "validRowCount": { - "description": "The number of valid rows.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetrics": { - "description": "Metrics for Tables classification problems.", - "id": "XPSTablesClassificationMetrics", - "properties": { - "curveMetrics": { - "description": "Metrics building a curve.", - "items": { - "$ref": "XPSTablesClassificationMetricsCurveMetrics" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetricsCurveMetrics": { - "description": "Metrics curve data point for a single value.", - "id": "XPSTablesClassificationMetricsCurveMetrics", - "properties": { - "aucPr": { - "description": "The area under the precision-recall curve.", - "format": "double", - "type": "number" - }, - "aucRoc": { - "description": "The area under receiver operating characteristic curve.", - "format": "double", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve and ROC curve can be derived from them.", - "items": { - "$ref": "XPSTablesConfidenceMetricsEntry" - }, - "type": "array" - }, - "logLoss": { - "description": "The Log loss metric.", - "format": "double", - "type": "number" - }, - "positionThreshold": { - "description": "The position threshold value used to compute the metrics.", - "format": "int32", - "type": "integer" - }, - "value": { - "description": "The CATEGORY row value (for ARRAY unnested) the curve metrics are for.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSTablesConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "double", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision. (2 * precision * recall) / (precision + recall)", - "format": "double", - "type": "number" - }, - "falseNegativeCount": { - "description": "False negative count.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "False positive count.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "FPR = #false positives / (#false positives + #true negatives)", - "format": "double", - "type": "number" - }, - "precision": { - "description": "Precision = #true positives / (#true positives + #false positives).", - "format": "double", - "type": "number" - }, - "recall": { - "description": "Recall = #true positives / (#true positives + #false negatives).", - "format": "double", - "type": "number" - }, - "trueNegativeCount": { - "description": "True negative count.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "True positive count.", - "format": "int64", - "type": "string" - }, - "truePositiveRate": { - "description": "TPR = #true positives / (#true positives + #false negatvies)", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesDatasetMetadata": { - "description": "Metadata for a dataset used for AutoML Tables. Next ID: 6", - "id": "XPSTablesDatasetMetadata", - "properties": { - "mlUseColumnId": { - "description": "Id the column to split the table.", - "format": "int32", - "type": "integer" - }, - "primaryTableSpec": { - "$ref": "XPSTableSpec", - "description": "Primary table." - }, - "targetColumnCorrelations": { - "additionalProperties": { - "$ref": "XPSCorrelationStats" - }, - "description": "(the column id : its CorrelationStats with target column).", - "type": "object" - }, - "targetColumnId": { - "description": "Id of the primary table column that should be used as the training label.", - "format": "int32", - "type": "integer" - }, - "weightColumnId": { - "description": "Id of the primary table column that should be used as the weight column.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSTablesEvaluationMetrics": { - "id": "XPSTablesEvaluationMetrics", - "properties": { - "classificationMetrics": { - "$ref": "XPSTablesClassificationMetrics", - "description": "Classification metrics." - }, - "regressionMetrics": { - "$ref": "XPSTablesRegressionMetrics", - "description": "Regression metrics." - } - }, - "type": "object" - }, - "XPSTablesModelColumnInfo": { - "description": "An information specific to given column and Tables Model, in context of the Model and the predictions created by it.", - "id": "XPSTablesModelColumnInfo", - "properties": { - "columnId": { - "description": "The ID of the column.", - "format": "int32", - "type": "integer" - }, - "featureImportance": { - "description": "When given as part of a Model: Measurement of how much model predictions correctness on the TEST data depend on values in this column. A value between 0 and 1, higher means higher influence. These values are normalized - for all input feature columns of a given model they add to 1. When given back by Predict or Batch Predict: Measurement of how impactful for the prediction returned for the given row the value in this column was. Specifically, the feature importance specifies the marginal contribution that the feature made to the prediction score compared to the baseline score. These values are computed using the Sampled Shapley method.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesModelStructure": { - "description": "A description of Tables model structure.", - "id": "XPSTablesModelStructure", - "properties": { - "modelParameters": { - "description": "A list of models.", - "items": { - "$ref": "XPSTablesModelStructureModelParameters" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParameters": { - "description": "Model hyper-parameters for a model.", - "id": "XPSTablesModelStructureModelParameters", - "properties": { - "hyperparameters": { - "items": { - "$ref": "XPSTablesModelStructureModelParametersParameter" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParametersParameter": { - "id": "XPSTablesModelStructureModelParametersParameter", - "properties": { - "floatValue": { - "description": "Float type parameter value.", - "format": "double", - "type": "number" - }, - "intValue": { - "description": "Integer type parameter value.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Parameter name.", - "type": "string" - }, - "stringValue": { - "description": "String type parameter value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesPreprocessResponse": { - "id": "XPSTablesPreprocessResponse", - "properties": { - "tablesDatasetMetadata": { - "$ref": "XPSTablesDatasetMetadata", - "description": "The table/column id, column_name and the DataTypes of the columns will be populated." - } - }, - "type": "object" - }, - "XPSTablesRegressionMetrics": { - "description": "Metrics for Tables regression problems.", - "id": "XPSTablesRegressionMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean absolute error.", - "format": "double", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error, only set if all of the target column's values are positive.", - "format": "double", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "double", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root mean squared error.", - "format": "double", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesTrainResponse": { - "id": "XPSTablesTrainResponse", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure" - }, - "predictionSampleRows": { - "description": "Sample rows from the dataset this model was trained.", - "items": { - "$ref": "XPSRow" - }, - "type": "array" - }, - "tablesModelColumnInfo": { - "description": "Output only. Auxiliary information for each of the input_feature_column_specs, with respect to this particular model.", - "items": { - "$ref": "XPSTablesModelColumnInfo" - }, - "type": "array" - }, - "trainCostMilliNodeHours": { - "description": "The actual training cost of the model, expressed in milli node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed to not exceed the train budget.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesTrainingOperationMetadata": { - "id": "XPSTablesTrainingOperationMetadata", - "properties": { - "createModelStage": { - "description": "Current stage of creating model.", - "enum": [ - "CREATE_MODEL_STAGE_UNSPECIFIED", - "DATA_PREPROCESSING", - "TRAINING", - "EVALUATING", - "MODEL_POST_PROCESSING" - ], - "enumDescriptions": [ - "Unspecified stage.", - "Prepare the model training pipeline and run data processing.", - "Training model.", - "Run evaluation.", - "Finalizing model training pipeline." - ], - "type": "string" - }, - "optimizationObjective": { - "description": "The optimization objective for model.", - "type": "string" - }, - "topTrials": { - "description": "This field is for training. When the operation is terminated successfully, AutoML Backend post this field to operation metadata in spanner. If the metadata has no trials returned, the training operation is supposed to be a failure.", - "items": { - "$ref": "XPSTuningTrial" - }, - "type": "array" - }, - "trainBudgetMilliNodeHours": { - "description": "Creating model budget.", - "format": "int64", - "type": "string" - }, - "trainingObjectivePoints": { - "description": "This field records the training objective value with respect to time, giving insight into how the model architecture search is performing as training time elapses.", - "items": { - "$ref": "XPSTrainingObjectivePoint" - }, - "type": "array" - }, - "trainingStartTime": { - "description": "Timestamp when training process starts.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextComponentModel": { - "description": "Component model. Next ID: 10", - "id": "XPSTextComponentModel", - "properties": { - "batchPredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold batch prediction model.", - "type": "string" - }, - "onlinePredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold online prediction model.", - "type": "string" - }, - "partition": { - "description": "The partition where the model is deployed. Populated by uCAIP BE as part of online PredictRequest.", - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud Ai Platform API." - }, - "servoModelName": { - "description": "The name of servo model. Populated by uCAIP BE as part of online PredictRequest.", - "type": "string" - }, - "submodelName": { - "description": "The name of the trained NL submodel.", - "type": "string" - }, - "submodelType": { - "description": "The type of trained NL submodel", - "enum": [ - "TEXT_MODEL_TYPE_UNSPECIFIED", - "TEXT_MODEL_TYPE_DEFAULT", - "TEXT_MODEL_TYPE_META_ARCHITECT", - "TEXT_MODEL_TYPE_ATC", - "TEXT_MODEL_TYPE_CLARA2", - "TEXT_MODEL_TYPE_CHATBASE", - "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING", - "TEXT_MODEL_TYPE_TEXT_EXTRACTION", - "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION", - "TEXT_MODEL_TYPE_COMPOSITE", - "TEXT_MODEL_TYPE_ALL_MODELS", - "TEXT_MODEL_TYPE_BERT", - "TEXT_MODEL_TYPE_ENC_PALM" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "Model type for entity extraction.", - "Model type for relationship extraction.", - "A composite model represents a set of component models that have to be used together for prediction. A composite model appears to be a single model to the model user. It may contain only one component model. Please refer to go/cnl-composite-models for more information.", - "Model type used to train default, MA, and ATC models in a single batch worker pipeline.", - "BERT pipeline needs a specific model type, since it uses a different TFX configuration compared with DEFAULT (despite sharing most of the code).", - "Model type for EncPaLM." - ], - "type": "string" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - }, - "versionNumber": { - "description": "The servomatic model version number. Populated by uCAIP BE as part of online PredictRequest.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextExtractionEvaluationMetrics": { - "id": "XPSTextExtractionEvaluationMetrics", - "properties": { - "bestF1ConfidenceMetrics": { - "$ref": "XPSConfidenceMetricsEntry", - "deprecated": true, - "description": "Values are at the highest F1 score on the precision-recall curve. Only confidence_threshold, recall, precision, and f1_score will be set." - }, - "confidenceMetricsEntries": { - "description": "If the enclosing EvaluationMetrics.label is empty, confidence_metrics_entries is an evaluation of the entire model across all labels. If the enclosing EvaluationMetrics.label is set, confidence_metrics_entries applies to that label.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the model, at the default confidence threshold (0.0). Only set for whole-model evaluation, not for evaluation per label." - }, - "perLabelConfidenceMetrics": { - "additionalProperties": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "deprecated": true, - "description": "Only recall, precision, and f1_score will be set.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTextSentimentEvaluationMetrics": { - "description": "Model evaluation metrics for text sentiment problems.", - "id": "XPSTextSentimentEvaluationMetrics", - "properties": { - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Output only. Confusion matrix of the evaluation. Only set for the overall model evaluation, not for evaluation of a single annotation spec." - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "linearKappa": { - "description": "Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanAbsoluteError": { - "description": "Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanSquaredError": { - "description": "Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision.", - "format": "float", - "type": "number" - }, - "quadraticKappa": { - "description": "Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTextToSpeechTrainResponse": { - "description": "TextToSpeech train response", - "id": "XPSTextToSpeechTrainResponse", - "properties": {}, - "type": "object" - }, - "XPSTextTrainResponse": { - "id": "XPSTextTrainResponse", - "properties": { - "componentModel": { - "description": "Component submodels.", - "items": { - "$ref": "XPSTextComponentModel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTfJsFormat": { - "description": "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "id": "XPSTfJsFormat", - "properties": {}, - "type": "object" - }, - "XPSTfLiteFormat": { - "description": "LINT.IfChange A model format used for mobile and IoT devices. See https://www.tensorflow.org/lite.", - "id": "XPSTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSTfSavedModelFormat": { - "description": "A tensorflow model format in SavedModel format.", - "id": "XPSTfSavedModelFormat", - "properties": {}, - "type": "object" - }, - "XPSTimestampStats": { - "description": "The data statistics of a series of TIMESTAMP values.", - "id": "XPSTimestampStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "granularStats": { - "additionalProperties": { - "$ref": "XPSTimestampStatsGranularStats" - }, - "description": "The string key is the pre-defined granularity. Currently supported: hour_of_day, day_of_week, month_of_year. Granularities finer that the granularity of timestamp data are not populated (e.g. if timestamps are at day granularity, then hour_of_day is not populated).", - "type": "object" - }, - "medianTimestampNanos": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTimestampStatsGranularStats": { - "description": "Stats split by a defined in context granularity.", - "id": "XPSTimestampStatsGranularStats", - "properties": { - "buckets": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "A map from granularity key to example count for that key. E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).", - "type": "object" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntry": { - "description": "Track matching model metrics for a single track match threshold and multiple label match confidence thresholds. Next tag: 6.", - "id": "XPSTrackMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Output only. Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is derived from them.", - "items": { - "$ref": "XPSTrackMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "Output only. The intersection-over-union threshold value between bounding boxes across frames used to compute this metric entry.", - "format": "float", - "type": "number" - }, - "meanBoundingBoxIou": { - "description": "Output only. The mean bounding box iou over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanMismatchRate": { - "description": "Output only. The mean mismatch rate over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanTrackingAveragePrecision": { - "description": "Output only. The mean average precision over all confidence thresholds.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold. Next tag: 6.", - "id": "XPSTrackMetricsEntryConfidenceMetricsEntry", - "properties": { - "boundingBoxIou": { - "description": "Output only. Bounding box intersection-over-union precision. Measures how well the bounding boxes overlap between each other (e.g. complete overlap or just barely above iou_threshold).", - "format": "float", - "type": "number" - }, - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "mismatchRate": { - "description": "Output only. Mismatch rate, which measures the tracking consistency, i.e. correctness of instance ID continuity.", - "format": "float", - "type": "number" - }, - "trackingPrecision": { - "description": "Output only. Tracking precision.", - "format": "float", - "type": "number" - }, - "trackingRecall": { - "description": "Output only. Tracking recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrainResponse": { - "description": "Next ID: 18", - "id": "XPSTrainResponse", - "properties": { - "deployedModelSizeBytes": { - "description": "Estimated model size in bytes once deployed.", - "format": "int64", - "type": "string" - }, - "errorAnalysisConfigs": { - "description": "Optional vision model error analysis configuration. The field is set when model error analysis is enabled in the training request. The results of error analysis will be binded together with evaluation results (in the format of AnnotatedExample).", - "items": { - "$ref": "XPSVisionErrorAnalysisConfig" - }, - "type": "array" - }, - "evaluatedExampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples used to evaluate the model (usually the test set), with the predicted annotations. The file_spec should point to recordio file(s) of AnnotatedExample. For each returned example, the example_id_token and annotations predicted by the model must be set. The example payload can and is recommended to be omitted." - }, - "evaluationMetricsSet": { - "$ref": "XPSEvaluationMetricsSet", - "description": "The trained model evaluation metrics. This can be optionally returned." - }, - "explanationConfigs": { - "deprecated": true, - "description": "VisionExplanationConfig for XAI on test set. Optional for when XAI is enable in training request.", - "items": { - "$ref": "XPSResponseExplanationSpec" - }, - "type": "array" - }, - "imageClassificationTrainResp": { - "$ref": "XPSImageClassificationTrainResponse" - }, - "imageObjectDetectionTrainResp": { - "$ref": "XPSImageObjectDetectionModelSpec" - }, - "imageSegmentationTrainResp": { - "$ref": "XPSImageSegmentationTrainResponse" - }, - "modelToken": { - "description": "Token that represents the trained model. This is considered immutable and is persisted in AutoML. xPS can put their own proto in the byte string, to e.g. point to the model checkpoints. The token is passed to other xPS APIs to refer to the model.", - "format": "byte", - "type": "string" - }, - "speechTrainResp": { - "$ref": "XPSSpeechModelSpec" - }, - "tablesTrainResp": { - "$ref": "XPSTablesTrainResponse" - }, - "textToSpeechTrainResp": { - "$ref": "XPSTextToSpeechTrainResponse" - }, - "textTrainResp": { - "$ref": "XPSTextTrainResponse", - "description": "Will only be needed for uCAIP from Beta." - }, - "translationTrainResp": { - "$ref": "XPSTranslationTrainResponse" - }, - "videoActionRecognitionTrainResp": { - "$ref": "XPSVideoActionRecognitionTrainResponse" - }, - "videoClassificationTrainResp": { - "$ref": "XPSVideoClassificationTrainResponse" - }, - "videoObjectTrackingTrainResp": { - "$ref": "XPSVideoObjectTrackingTrainResponse" - } - }, - "type": "object" - }, - "XPSTrainingObjectivePoint": { - "id": "XPSTrainingObjectivePoint", - "properties": { - "createTime": { - "description": "The time at which this point was recorded.", - "format": "google-datetime", - "type": "string" - }, - "value": { - "description": "The objective value when this point was recorded.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationEvaluationMetrics": { - "description": "Evaluation metrics for the dataset.", - "id": "XPSTranslationEvaluationMetrics", - "properties": { - "baseBleuScore": { - "description": "BLEU score for base model.", - "format": "double", - "type": "number" - }, - "bleuScore": { - "description": "BLEU score.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationPreprocessResponse": { - "description": "Translation preprocess response.", - "id": "XPSTranslationPreprocessResponse", - "properties": { - "parsedExampleCount": { - "description": "Total example count parsed.", - "format": "int64", - "type": "string" - }, - "validExampleCount": { - "description": "Total valid example count.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTranslationTrainResponse": { - "description": "Train response for translation.", - "id": "XPSTranslationTrainResponse", - "properties": { - "modelType": { - "description": "Type of the model.", - "enum": [ - "MODEL_TYPE_UNSPECIFIED", - "LEGACY", - "CURRENT" - ], - "enumDescriptions": [ - "Default", - "Legacy model. Will be deprecated.", - "Current model." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSTuningTrial": { - "description": "Metrics for a tuning job generated, will get forwarded to Stackdriver as model tuning logs. Setting this as a standalone message out of CreateModelMetadata to avoid confusion as we expose this message only to users.", - "id": "XPSTuningTrial", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure", - "description": "Model parameters for the trial." - }, - "trainingObjectivePoint": { - "$ref": "XPSTrainingObjectivePoint", - "description": "The optimization objective evaluation of the eval split data." - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntry": { - "description": "The Evaluation metrics entry given a specific precision_window_length.", - "id": "XPSVideoActionMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSVideoActionMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - }, - "precisionWindowLength": { - "description": "This VideoActionMetricsEntry is calculated based on this prediction window length. If the predicted action's timestamp is inside the time window whose center is the ground truth action's timestamp with this specific length, the prediction result is treated as a true positive.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSVideoActionMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionEvaluationMetrics": { - "description": "Model evaluation metrics for video action recognition.", - "id": "XPSVideoActionRecognitionEvaluationMetrics", - "properties": { - "evaluatedActionCount": { - "description": "Output only. The number of ground truth actions used to create this evaluation.", - "format": "int32", - "type": "integer" - }, - "videoActionMetricsEntries": { - "description": "Output only. The metric entries for precision window lengths: 1s,2s,3s,4s, 5s.", - "items": { - "$ref": "XPSVideoActionMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionTrainResponse": { - "id": "XPSVideoActionRecognitionTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoBatchPredictOperationMetadata": { - "id": "XPSVideoBatchPredictOperationMetadata", - "properties": { - "outputExamples": { - "description": "All the partial batch prediction results that are completed at the moment. Output examples are sorted by completion time. The order will not be changed. Each output example should be the path of a single RecordIO file of AnnotatedExamples.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoClassificationTrainResponse": { - "id": "XPSVideoClassificationTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSVideoExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoModelArtifactSpec": { - "id": "XPSVideoModelArtifactSpec", - "properties": { - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. batch predict) via public Cloud AI Platform API." - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingEvaluationMetrics": { - "description": "Model evaluation metrics for ObjectTracking problems. Next tag: 10.", - "id": "XPSVideoObjectTrackingEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "Output only. The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "Output only. The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingboxCount": { - "description": "The number of bounding boxes used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedFrameCount": { - "description": "The number of video frames used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedTrackCount": { - "description": "The number of tracks used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "trackMeanAveragePrecision": { - "description": "Output only. The single metric for tracks accuracy evaluation: the mean_average_precision averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanBoundingBoxIou": { - "description": "Output only. The single metric for tracks bounding box iou evaluation: the mean_bounding_box_iou averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanMismatchRate": { - "description": "Output only. The single metric for tracking consistency evaluation: the mean_mismatch_rate averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMetricsEntries": { - "description": "Output only. The tracks match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSTrackMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingTrainResponse": { - "id": "XPSVideoObjectTrackingTrainResponse", - "properties": { - "exportModelSpec": { - "$ref": "XPSVideoExportModelSpec", - "description": "Populated for AutoML request only." - }, - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoTrainingOperationMetadata": { - "id": "XPSVideoTrainingOperationMetadata", - "properties": { - "trainCostMilliNodeHour": { - "description": "This is an estimation of the node hours necessary for training a model, expressed in milli node hours (i.e. 1,000 value in this field means 1 node hour). A node hour represents the time a virtual machine spends running your training job. The cost of one node running for one hour is a node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionErrorAnalysisConfig": { - "description": "The vision model error analysis configuration. Next tag: 3", - "id": "XPSVisionErrorAnalysisConfig", - "properties": { - "exampleCount": { - "description": "The number of query examples in error analysis.", - "format": "int32", - "type": "integer" - }, - "queryType": { - "description": "The query type used in retrieval. The enum values are frozen in the foreseeable future.", - "enum": [ - "QUERY_TYPE_UNSPECIFIED", - "QUERY_TYPE_ALL_SIMILAR", - "QUERY_TYPE_SAME_CLASS_SIMILAR", - "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - ], - "enumDescriptions": [ - "Unspecified query type for model error analysis.", - "Query similar samples across all classes in the dataset.", - "Query similar samples from the same class of the input sample.", - "Query dissimilar samples from the same class of the input sample." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionTrainingOperationMetadata": { - "deprecated": true, - "id": "XPSVisionTrainingOperationMetadata", - "properties": { - "explanationUsage": { - "$ref": "InfraUsage", - "description": "Aggregated infra usage within certain time period, for billing report purpose if XAI is enable in training request." - } - }, - "type": "object" - }, - "XPSVisualization": { - "deprecated": true, - "description": "Visualization configurations for image explanation.", - "id": "XPSVisualization", - "properties": { - "clipPercentLowerbound": { - "description": "Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62.", - "format": "float", - "type": "number" - }, - "clipPercentUpperbound": { - "description": "Excludes attributions above the specified percentile from the highlighted areas. Using the clip_percent_upperbound and clip_percent_lowerbound together can be useful for filtering out noise and making it easier to see areas of strong attribution. Defaults to 99.9.", - "format": "float", - "type": "number" - }, - "colorMap": { - "description": "The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue.", - "enum": [ - "COLOR_MAP_UNSPECIFIED", - "PINK_GREEN", - "VIRIDIS", - "RED", - "GREEN", - "RED_GREEN", - "PINK_WHITE_GREEN" - ], - "enumDescriptions": [ - "Should not be used.", - "Positive: green. Negative: pink.", - "Viridis color map: A perceptually uniform color mapping which is easier to see by those with colorblindness and progresses from yellow to green to blue. Positive: yellow. Negative: blue.", - "Positive: red. Negative: red.", - "Positive: green. Negative: green.", - "Positive: green. Negative: red.", - "PiYG palette." - ], - "type": "string" - }, - "overlayType": { - "description": "How the original image is displayed in the visualization. Adjusting the overlay can help increase visual clarity if the original image makes it difficult to view the visualization. Defaults to NONE.", - "enum": [ - "OVERLAY_TYPE_UNSPECIFIED", - "NONE", - "ORIGINAL", - "GRAYSCALE", - "MASK_BLACK" - ], - "enumDescriptions": [ - "Default value. This is the same as NONE.", - "No overlay.", - "The attributions are shown on top of the original image.", - "The attributions are shown on top of grayscaled version of the original image.", - "The attributions are used as a mask to reveal predictive parts of the image and hide the un-predictive parts." - ], - "type": "string" - }, - "polarity": { - "description": "Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE.", - "enum": [ - "POLARITY_UNSPECIFIED", - "POSITIVE", - "NEGATIVE", - "BOTH" - ], - "enumDescriptions": [ - "Default value. This is the same as POSITIVE.", - "Highlights the pixels/outlines that were most influential to the model's prediction.", - "Setting polarity to negative highlights areas that does not lead to the models's current prediction.", - "Shows both positive and negative attributions." - ], - "type": "string" - }, - "type": { - "description": "Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES.", - "enum": [ - "TYPE_UNSPECIFIED", - "PIXELS", - "OUTLINES" - ], - "enumDescriptions": [ - "Should not be used.", - "Shows which pixel contributed to the image prediction.", - "Shows which region contributed to the image prediction by outlining the region." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSXpsOperationMetadata": { - "id": "XPSXpsOperationMetadata", - "properties": { - "exampleCount": { - "description": "Optional. XPS server can opt to provide example count of the long running operation (e.g. training, data importing, batch prediction).", - "format": "int64", - "type": "string" - }, - "reportingMetrics": { - "$ref": "XPSReportingMetrics", - "description": "Metrics for the operation. By the time the operation is terminated (whether succeeded or failed) as returned from XPS, AutoML BE assumes the metrics are finalized. AutoML BE transparently posts the metrics to Chemist if it's not empty, regardless of the response content or error type. If user is supposed to be charged in case of cancellation/error, this field should be set. In the case where the type of LRO doesn't require any billing, this field should be left unset." - }, - "tablesTrainingOperationMetadata": { - "$ref": "XPSTablesTrainingOperationMetadata" - }, - "videoBatchPredictOperationMetadata": { - "$ref": "XPSVideoBatchPredictOperationMetadata" - }, - "videoTrainingOperationMetadata": { - "$ref": "XPSVideoTrainingOperationMetadata" - }, - "visionTrainingOperationMetadata": { - "$ref": "XPSVisionTrainingOperationMetadata" - } - }, - "type": "object" - }, - "XPSXraiAttribution": { - "deprecated": true, - "description": "An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Only supports image Models (modality is IMAGE).", - "id": "XPSXraiAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/language/v1beta2/language-gen.go b/language/v1beta2/language-gen.go index 79e7382d43a..afd4d4ba799 100644 --- a/language/v1beta2/language-gen.go +++ b/language/v1beta2/language-gen.go @@ -540,7 +540,7 @@ type AnnotateTextRequest struct { EncodingType string `json:"encodingType,omitempty"` // Features: Required. The enabled features. - Features *AnnotateTextRequestFeatures `json:"features,omitempty"` + Features *Features `json:"features,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with @@ -565,63 +565,6 @@ func (s *AnnotateTextRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AnnotateTextRequestFeatures: All available features for sentiment, -// syntax, and semantic analysis. Setting each one to true will enable -// that specific analysis for the input. Next ID: 12 -type AnnotateTextRequestFeatures struct { - // ClassificationModelOptions: Optional. The model options to use for - // classification. Defaults to v1 options if not specified. Only used if - // `classify_text` is set to true. - ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` - - // ClassifyText: Classify the full document into categories. If this is - // true, the API will use the default model which classifies into a - // predefined taxonomy - // (https://cloud.google.com/natural-language/docs/categories). - ClassifyText bool `json:"classifyText,omitempty"` - - // ExtractDocumentSentiment: Extract document-level sentiment. - ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - - // ExtractEntities: Extract entities. - ExtractEntities bool `json:"extractEntities,omitempty"` - - // ExtractEntitySentiment: Extract entities and their associated - // sentiment. - ExtractEntitySentiment bool `json:"extractEntitySentiment,omitempty"` - - // ExtractSyntax: Extract syntax information. - ExtractSyntax bool `json:"extractSyntax,omitempty"` - - // ModerateText: Moderate the document for harmful and sensitive - // categories. - ModerateText bool `json:"moderateText,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClassificationModelOptions") 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. - // "ClassificationModelOptions") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AnnotateTextRequestFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AnnotateTextRequestFeatures - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // AnnotateTextResponse: The text annotations response message. type AnnotateTextResponse struct { // Categories: Categories identified in the input document. @@ -737,12 +680,12 @@ type ClassificationModelOptions struct { // V1Model: Setting this field will use the V1 model and V1 content // categories version. The V1 model is a legacy model; support for this // will be discontinued in the future. - V1Model *ClassificationModelOptionsV1Model `json:"v1Model,omitempty"` + V1Model *V1Model `json:"v1Model,omitempty"` // V2Model: Setting this field will use the V2 model with the // appropriate content categories version. The V2 model is a better // performing model. - V2Model *ClassificationModelOptionsV2Model `json:"v2Model,omitempty"` + V2Model *V2Model `json:"v2Model,omitempty"` // ForceSendFields is a list of field names (e.g. "V1Model") to // unconditionally include in API requests. By default, fields with @@ -767,48 +710,6 @@ func (s *ClassificationModelOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ClassificationModelOptionsV1Model: Options for the V1 model. -type ClassificationModelOptionsV1Model struct { -} - -// ClassificationModelOptionsV2Model: Options for the V2 model. -type ClassificationModelOptionsV2Model struct { - // ContentCategoriesVersion: The content categories used for - // classification. - // - // Possible values: - // "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" - If - // `ContentCategoriesVersion` is not specified, this option will default - // to `V1`. - // "V1" - Legacy content categories of our initial launch in 2017. - // "V2" - Updated content categories in 2022. - ContentCategoriesVersion string `json:"contentCategoriesVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ContentCategoriesVersion") 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. "ContentCategoriesVersion") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ClassificationModelOptionsV2Model) MarshalJSON() ([]byte, error) { - type NoMethod ClassificationModelOptionsV2Model - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ClassifyTextRequest: The document classification request message. type ClassifyTextRequest struct { // ClassificationModelOptions: Optional. Model options to use for @@ -875,347 +776,6 @@ func (s *ClassifyTextResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Color: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to and from -// color representations in various languages over compactness. For -// example, the fields of this representation can be trivially provided -// to the constructor of `java.awt.Color` in Java; it can also be -// trivially provided to UIColor's `+colorWithRed:green:blue:alpha` -// method in iOS; and, with just a little work, it can be easily -// formatted into a CSS `rgba()` string in JavaScript. This reference -// page doesn't have information about the absolute color space that -// should be used to interpret the RGB value—for example, sRGB, Adobe -// RGB, DCI-P3, and BT.2020. By default, applications should assume the -// sRGB color space. When color equality needs to be decided, -// implementations, unless documented otherwise, treat two colors as -// equal if all their red, green, blue, and alpha values each differ by -// at most `1e-5`. Example (Java): import com.google.type.Color; // ... -// public static java.awt.Color fromProto(Color protocolor) { float -// alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : -// 1.0; return new java.awt.Color( protocolor.getRed(), -// protocolor.getGreen(), protocolor.getBlue(), alpha); } public static -// Color toProto(java.awt.Color color) { float red = (float) -// color.getRed(); float green = (float) color.getGreen(); float blue = -// (float) color.getBlue(); float denominator = 255.0; Color.Builder -// resultBuilder = Color .newBuilder() .setRed(red / denominator) -// .setGreen(green / denominator) .setBlue(blue / denominator); int -// alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( -// FloatValue .newBuilder() .setValue(((float) alpha) / denominator) -// .build()); } return resultBuilder.build(); } // ... Example (iOS / -// Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float -// red = [protocolor red]; float green = [protocolor green]; float blue -// = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; -// float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper -// value]; } return [UIColor colorWithRed:red green:green blue:blue -// alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, -// green, blue, alpha; if (![color getRed:&red green:&green blue:&blue -// alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; -// [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; -// if (alpha <= 0.9999) { [result -// setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; -// return result; } // ... Example (JavaScript): // ... var -// protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red -// || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = -// rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green -// = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); -// if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, -// blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams -// = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', -// alphaFrac, ')'].join(”); }; var rgbToCssColor = function(red, green, -// blue) { var rgbNumber = new Number((red << 16) | (green << 8) | -// blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - -// hexString.length; var resultBuilder = ['#']; for (var i = 0; i < -// missingZeros; i++) { resultBuilder.push('0'); } -// resultBuilder.push(hexString); return resultBuilder.join(”); }; // -// ... -type Color struct { - // Alpha: The fraction of this color that should be applied to the - // pixel. That is, the final pixel color is defined by the equation: - // `pixel color = alpha * (this color) + (1.0 - alpha) * (background - // color)` This means that a value of 1.0 corresponds to a solid color, - // whereas a value of 0.0 corresponds to a completely transparent color. - // This uses a wrapper message rather than a simple float scalar so that - // it is possible to distinguish between a default value and the value - // being unset. If omitted, this color object is rendered as a solid - // color (as if the alpha value had been explicitly given a value of - // 1.0). - Alpha float64 `json:"alpha,omitempty"` - - // Blue: The amount of blue in the color as a value in the interval [0, - // 1]. - Blue float64 `json:"blue,omitempty"` - - // Green: The amount of green in the color as a value in the interval - // [0, 1]. - Green float64 `json:"green,omitempty"` - - // Red: The amount of red in the color as a value in the interval [0, - // 1]. - Red float64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Color) MarshalJSON() ([]byte, error) { - type NoMethod Color - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Color) UnmarshalJSON(data []byte) error { - type NoMethod Color - var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Alpha = float64(s1.Alpha) - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) - return nil -} - -// CpuMetric: Metric for billing reports. -type CpuMetric struct { - // CoreNumber: Required. Number of CPU cores. - CoreNumber int64 `json:"coreNumber,omitempty,string"` - - // CoreSec: Required. Total seconds of core usage, e.g. 4. - CoreSec int64 `json:"coreSec,omitempty,string"` - - // CpuType: Required. Type of cpu, e.g. N2. - // - // Possible values: - // "UNKNOWN_CPU_TYPE" - // "A2" - GPU-based machine, skip quota reporting. - // "A3" - GPU-based machine, skip quota reporting. - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - GPU-based machine, skip quota reporting. - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - CpuType string `json:"cpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreNumber") 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. "CoreNumber") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod CpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // DependencyEdge: Represents dependency parse tree information for a // token. type DependencyEdge struct { @@ -1340,44 +900,6 @@ func (s *DependencyEdge) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type DiskMetric struct { - // DiskType: Required. Type of Disk, e.g. REGIONAL_SSD. - // - // Possible values: - // "UNKNOWN_DISK_TYPE" - // "REGIONAL_SSD" - // "REGIONAL_STORAGE" - // "PD_SSD" - // "PD_STANDARD" - // "STORAGE_SNAPSHOT" - DiskType string `json:"diskType,omitempty"` - - // GibSec: Required. Seconds of physical disk usage, e.g. 3600. - GibSec int64 `json:"gibSec,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DiskType") 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. "DiskType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskMetric) MarshalJSON() ([]byte, error) { - type NoMethod DiskMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Document: Represents the input to API methods. type Document struct { // BoilerplateHandling: Indicates how detected boilerplate(e.g. @@ -1596,254 +1118,59 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GpuMetric struct { - // GpuSec: Required. Seconds of GPU usage, e.g. 3600. - GpuSec int64 `json:"gpuSec,omitempty,string"` - - // GpuType: Required. Type of GPU, e.g. NVIDIA_TESLA_V100. - // - // Possible values: - // "UNKNOWN_GPU_TYPE" - // "NVIDIA_TESLA_A100" - // "NVIDIA_A100_80GB" - // "NVIDIA_TESLA_K80" - // "NVIDIA_L4" - // "NVIDIA_TESLA_P100" - // "NVIDIA_TESLA_P4" - // "NVIDIA_TESLA_T4" - // "NVIDIA_TESLA_V100" - // "NVIDIA_H100_80GB" - GpuType string `json:"gpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GpuSec") 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. "GpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} +// Features: All available features for sentiment, syntax, and semantic +// analysis. Setting each one to true will enable that specific analysis +// for the input. Next ID: 12 +type Features struct { + // ClassificationModelOptions: Optional. The model options to use for + // classification. Defaults to v1 options if not specified. Only used if + // `classify_text` is set to true. + ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` -func (s *GpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod GpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // ClassifyText: Classify the full document into categories. If this is + // true, the API will use the default model which classifies into a + // predefined taxonomy + // (https://cloud.google.com/natural-language/docs/categories). + ClassifyText bool `json:"classifyText,omitempty"` -// InfraUsage: Infra Usage of billing metrics. Next ID: 6 -type InfraUsage struct { - // CpuMetrics: Aggregated core metrics since requested start_time. - CpuMetrics []*CpuMetric `json:"cpuMetrics,omitempty"` + // ExtractDocumentSentiment: Extract document-level sentiment. + ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - // DiskMetrics: Aggregated persistent disk metrics since requested - // start_time. - DiskMetrics []*DiskMetric `json:"diskMetrics,omitempty"` + // ExtractEntities: Extract entities. + ExtractEntities bool `json:"extractEntities,omitempty"` - // GpuMetrics: Aggregated gpu metrics since requested start_time. - GpuMetrics []*GpuMetric `json:"gpuMetrics,omitempty"` + // ExtractEntitySentiment: Extract entities and their associated + // sentiment. + ExtractEntitySentiment bool `json:"extractEntitySentiment,omitempty"` - // RamMetrics: Aggregated ram metrics since requested start_time. - RamMetrics []*RamMetric `json:"ramMetrics,omitempty"` + // ExtractSyntax: Extract syntax information. + ExtractSyntax bool `json:"extractSyntax,omitempty"` - // TpuMetrics: Aggregated tpu metrics since requested start_time. - TpuMetrics []*TpuMetric `json:"tpuMetrics,omitempty"` + // ModerateText: Moderate the document for harmful and sensitive + // categories. + ModerateText bool `json:"moderateText,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpuMetrics") 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. + // "ClassificationModelOptions") 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. "CpuMetrics") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. + // "ClassificationModelOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InfraUsage) MarshalJSON() ([]byte, error) { - type NoMethod InfraUsage +func (s *Features) MarshalJSON() ([]byte, error) { + type NoMethod Features raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2089,204 +1416,17 @@ func (s *PartOfSpeech) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RamMetric struct { - // GibSec: Required. VM memory in Gigabyte second, e.g. 3600. Using - // int64 type to match billing metrics definition. - GibSec int64 `json:"gibSec,omitempty,string"` +// Sentence: Represents a sentence in the input document. +type Sentence struct { + // Sentiment: For calls to AnalyzeSentiment or if + // AnnotateTextRequest.Features.extract_document_sentiment is set to + // true, this field will contain the sentiment for the sentence. + Sentiment *Sentiment `json:"sentiment,omitempty"` - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // Memories: Required. VM memory in gb. - Memories float64 `json:"memories,omitempty"` - - // RamType: Required. Type of ram. - // - // Possible values: - // "UNKNOWN_RAM_TYPE" - // "A2" - // "A3" - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - RamType string `json:"ramType,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GibSec") to + // Text: The sentence text. + Text *TextSpan `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Sentiment") 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 @@ -2294,8 +1434,8 @@ type RamMetric struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GibSec") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Sentiment") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2303,55 +1443,8 @@ type RamMetric struct { NullFields []string `json:"-"` } -func (s *RamMetric) MarshalJSON() ([]byte, error) { - type NoMethod RamMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *RamMetric) UnmarshalJSON(data []byte) error { - type NoMethod RamMetric - var s1 struct { - Memories gensupport.JSONFloat64 `json:"memories"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Memories = float64(s1.Memories) - return nil -} - -// Sentence: Represents a sentence in the input document. -type Sentence struct { - // Sentiment: For calls to AnalyzeSentiment or if - // AnnotateTextRequest.Features.extract_document_sentiment is set to - // true, this field will contain the sentiment for the sentence. - Sentiment *Sentiment `json:"sentiment,omitempty"` - - // Text: The sentence text. - Text *TextSpan `json:"text,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Sentiment") 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. "Sentiment") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Sentence) MarshalJSON() ([]byte, error) { - type NoMethod Sentence +func (s *Sentence) MarshalJSON() ([]byte, error) { + type NoMethod Sentence raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2524,123 +1617,25 @@ func (s *Token) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TpuMetric struct { - // TpuSec: Required. Seconds of TPU usage, e.g. 3600. - TpuSec int64 `json:"tpuSec,omitempty,string"` +// V1Model: Options for the V1 model. +type V1Model struct { +} - // TpuType: Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD. +// V2Model: Options for the V2 model. +type V2Model struct { + // ContentCategoriesVersion: The content categories used for + // classification. // // Possible values: - // "UNKNOWN_TPU_TYPE" - // "TPU_V2_POD" - // "TPU_V2" - // "TPU_V3_POD" - // "TPU_V3" - // "TPU_V5_LITEPOD" - TpuType string `json:"tpuType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TpuSec") 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. "TpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod TpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSArrayStats: The data statistics of a series of ARRAY values. -type XPSArrayStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // MemberStats: Stats of all the values of all arrays, as if they were a - // single long series of data. The type depends on the element type of - // the array. - MemberStats *XPSDataStats `json:"memberStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSArrayStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSArrayStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSBatchPredictResponse struct { - // ExampleSet: Examples for batch prediction result. Under full API - // implementation, results are stored in shared RecordIO of - // AnnotatedExample protobufs, the annotations field of which is - // populated by XPS backend. - ExampleSet *XPSExampleSet `json:"exampleSet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleSet") 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. "ExampleSet") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSBatchPredictResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSBatchPredictResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSBoundingBoxMetricsEntry: Bounding box matching model metrics for a -// single intersection-over-union threshold and multiple label match -// confidence thresholds. -type XPSBoundingBoxMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSBoundingBoxMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: The intersection-over-union threshold value used to - // compute this metrics entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` + // "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" - If + // `ContentCategoriesVersion` is not specified, this option will default + // to `V1`. + // "V1" - Legacy content categories of our initial launch in 2017. + // "V2" - Updated content categories in 2022. + ContentCategoriesVersion string `json:"contentCategoriesVersion,omitempty"` // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") to unconditionally include in API + // "ContentCategoriesVersion") 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 @@ -2648,7 +1643,7 @@ type XPSBoundingBoxMetricsEntry struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") + // NullFields is a list of field names (e.g. "ContentCategoriesVersion") // to include in API requests with the JSON null value. By default, // fields with empty values are omitted from API requests. However, any // field with an empty value appearing in NullFields will be sent to the @@ -2658,5017 +1653,8 @@ type XPSBoundingBoxMetricsEntry struct { NullFields []string `json:"-"` } -func (s *XPSBoundingBoxMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSBoundingBoxMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSBoundingBoxMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSCategoryStats: The data statistics of a series of CATEGORY values. -type XPSCategoryStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopCategoryStats: The statistics of the top 20 CATEGORY values, - // ordered by CategoryStats.SingleCategoryStats.count. - TopCategoryStats []*XPSCategoryStatsSingleCategoryStats `json:"topCategoryStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCategoryStatsSingleCategoryStats: The statistics of a single -// CATEGORY value. -type XPSCategoryStatsSingleCategoryStats struct { - // Count: The number of occurrences of this value in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The CATEGORY value. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStatsSingleCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStatsSingleCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSClassificationEvaluationMetrics: Model evaluation metrics for -// classification problems. It can be used for image and video -// classification. Next tag: 9. -type XPSClassificationEvaluationMetrics struct { - // AuPrc: The Area under precision recall curve metric. - AuPrc float64 `json:"auPrc,omitempty"` - - // AuRoc: The Area Under Receiver Operating Characteristic curve metric. - // Micro-averaged for the overall evaluation. - AuRoc float64 `json:"auRoc,omitempty"` - - // BaseAuPrc: The Area under precision recall curve metric based on - // priors. - BaseAuPrc float64 `json:"baseAuPrc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the evaluation. Only set for - // MULTICLASS classification problems where number of annotation specs - // is no more than 10. Only set for model level evaluation, not for - // evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // EvaluatedExamplesCount: The number of examples used for model - // evaluation. - EvaluatedExamplesCount int64 `json:"evaluatedExamplesCount,omitempty"` - - // LogLoss: The Log Loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuPrc") 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. "AuPrc") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSClassificationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSClassificationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSClassificationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSClassificationEvaluationMetrics - var s1 struct { - AuPrc gensupport.JSONFloat64 `json:"auPrc"` - AuRoc gensupport.JSONFloat64 `json:"auRoc"` - BaseAuPrc gensupport.JSONFloat64 `json:"baseAuPrc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AuPrc = float64(s1.AuPrc) - s.AuRoc = float64(s1.AuRoc) - s.BaseAuPrc = float64(s1.BaseAuPrc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSColorMap: Map from color to display name. Will only be used by -// Image Segmentation for uCAIP. -type XPSColorMap struct { - // AnnotationSpecIdToken: Should be used during training. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Color: This type is deprecated in favor of the IntColor below. This - // is because google.type.Color represent color has a float which - // semantically does not reflect discrete classes/categories concept. - // Moreover, to handle it well we need to have some tolerance when - // converting to a discretized color. As such, the recommendation is to - // have API surface still use google.type.Color while internally - // IntColor is used. - Color *Color `json:"color,omitempty"` - - // DisplayName: Should be used during preprocessing. - DisplayName string `json:"displayName,omitempty"` - - IntColor *XPSColorMapIntColor `json:"intColor,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMap) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMap - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColorMapIntColor: RGB color and each channel is represented by an -// integer. -type XPSColorMapIntColor struct { - // Blue: The value should be in range of [0, 255]. - Blue int64 `json:"blue,omitempty"` - - // Green: The value should be in range of [0, 255]. - Green int64 `json:"green,omitempty"` - - // Red: The value should be in range of [0, 255]. - Red int64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Blue") 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. "Blue") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMapIntColor) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMapIntColor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSColumnSpec struct { - // ColumnId: The unique id of the column. When Preprocess, the Tables BE - // will popuate the order id of the column, which reflects the order of - // the column inside the table, i.e. 0 means the first column in the - // table, N-1 means the last column. AutoML BE will persist this order - // id in Spanner and set the order id here when calling - // RefreshTablesStats and Train. Note: it's different than the - // column_spec_id that is generated in AutoML BE. - ColumnId int64 `json:"columnId,omitempty"` - - // DataStats: The data stats of the column. It's outputed in - // RefreshTablesStats and a required input for Train. - DataStats *XPSDataStats `json:"dataStats,omitempty"` - - // DataType: The data type of the column. It's outputed in Preprocess - // rpc and a required input for RefreshTablesStats and Train. - DataType *XPSDataType `json:"dataType,omitempty"` - - // DisplayName: The display name of the column. It's outputed in - // Preprocess and a required input for RefreshTablesStats and Train. - DisplayName string `json:"displayName,omitempty"` - - ForecastingMetadata *XPSColumnSpecForecastingMetadata `json:"forecastingMetadata,omitempty"` - - // TopCorrelatedColumns: It's outputed in RefreshTablesStats, and a - // required input in Train. - TopCorrelatedColumns []*XPSColumnSpecCorrelatedColumn `json:"topCorrelatedColumns,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecCorrelatedColumn: Identifies a table's column, and its -// correlation with the column this ColumnSpec describes. -type XPSColumnSpecCorrelatedColumn struct { - ColumnId int64 `json:"columnId,omitempty"` - - CorrelationStats *XPSCorrelationStats `json:"correlationStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecCorrelatedColumn) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecCorrelatedColumn - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecForecastingMetadata: -// ====================================================================== -// ===== # The fields below are used exclusively for Forecasting. -type XPSColumnSpecForecastingMetadata struct { - // ColumnType: The type of the column for FORECASTING model training - // purposes. - // - // Possible values: - // "COLUMN_TYPE_UNSPECIFIED" - An un-set value of this enum. - // "KEY" - Key columns are used to identify timeseries. - // "KEY_METADATA" - This column contains information describing static - // properties of the entities identified by the key column(s) (e.g. - // city's ZIP code). - // "TIME_SERIES_AVAILABLE_PAST_ONLY" - This column contains - // information for the given entity, at any time poinrt, they are only - // available in the time series before. - // "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - This column contains - // information for the given entity is known both for the past and the - // sufficiently far future. - ColumnType string `json:"columnType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnType") 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. "ColumnType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecForecastingMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecForecastingMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCommonStats: Common statistics for a column with a specified data -// type. -type XPSCommonStats struct { - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DistinctValueCount") - // 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. "DistinctValueCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSCommonStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCommonStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfidenceMetricsEntry: ConfidenceMetricsEntry includes generic -// precision, recall, f1 score etc. Next tag: 16. -type XPSConfidenceMetricsEntry struct { - // ConfidenceThreshold: Metrics are computed with an assumption that the - // model never return predictions with score lower than this value. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // F1ScoreAt1: The harmonic mean of recall_at1 and precision_at1. - F1ScoreAt1 float64 `json:"f1ScoreAt1,omitempty"` - - // FalseNegativeCount: The number of ground truth labels that are not - // matched by a model created label. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: The number of model created labels that do not - // match a ground truth label. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: False Positive Rate for the given confidence - // threshold. - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // FalsePositiveRateAt1: The False Positive Rate when only considering - // the label that has the highest prediction score and not below the - // confidence threshold for each example. - FalsePositiveRateAt1 float64 `json:"falsePositiveRateAt1,omitempty"` - - // PositionThreshold: Metrics are computed with an assumption that the - // model always returns at most this many predictions (ordered by their - // score, descendingly), but they all still need to meet the - // confidence_threshold. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // PrecisionAt1: The precision when only considering the label that has - // the highest prediction score and not below the confidence threshold - // for each example. - PrecisionAt1 float64 `json:"precisionAt1,omitempty"` - - // Recall: Recall (true positive rate) for the given confidence - // threshold. - Recall float64 `json:"recall,omitempty"` - - // RecallAt1: The recall (true positive rate) when only considering the - // label that has the highest prediction score and not below the - // confidence threshold for each example. - RecallAt1 float64 `json:"recallAt1,omitempty"` - - // TrueNegativeCount: The number of labels that were not created by the - // model, but if they would, they would not match a ground truth label. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: The number of model created labels that match a - // ground truth label. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - F1ScoreAt1 gensupport.JSONFloat64 `json:"f1ScoreAt1"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - FalsePositiveRateAt1 gensupport.JSONFloat64 `json:"falsePositiveRateAt1"` - Precision gensupport.JSONFloat64 `json:"precision"` - PrecisionAt1 gensupport.JSONFloat64 `json:"precisionAt1"` - Recall gensupport.JSONFloat64 `json:"recall"` - RecallAt1 gensupport.JSONFloat64 `json:"recallAt1"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.F1ScoreAt1 = float64(s1.F1ScoreAt1) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.FalsePositiveRateAt1 = float64(s1.FalsePositiveRateAt1) - s.Precision = float64(s1.Precision) - s.PrecisionAt1 = float64(s1.PrecisionAt1) - s.Recall = float64(s1.Recall) - s.RecallAt1 = float64(s1.RecallAt1) - return nil -} - -// XPSConfusionMatrix: Confusion matrix of the model running the -// classification. -type XPSConfusionMatrix struct { - // AnnotationSpecIdToken: For the following three repeated fields, only - // one is intended to be set. annotation_spec_id_token is preferable to - // be set. ID tokens of the annotation specs used in the confusion - // matrix. - AnnotationSpecIdToken []string `json:"annotationSpecIdToken,omitempty"` - - // Category: Category (mainly for segmentation). Set only for image - // segmentation models. Note: uCAIP Image Segmentation should use - // annotation_spec_id_token. - Category []int64 `json:"category,omitempty"` - - // Row: Rows in the confusion matrix. The number of rows is equal to the - // size of `annotation_spec_id_token`. `row[i].value[j]` is the number - // of examples that have ground truth of the - // `annotation_spec_id_token[i]` and are predicted as - // `annotation_spec_id_token[j]` by the model being evaluated. - Row []*XPSConfusionMatrixRow `json:"row,omitempty"` - - // SentimentLabel: Sentiment labels used in the confusion matrix. Set - // only for text sentiment models. For AutoML Text Revamp, use - // `annotation_spec_id_token` instead and leave this field empty. - SentimentLabel []int64 `json:"sentimentLabel,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrix) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrix - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfusionMatrixRow: A row in the confusion matrix. -type XPSConfusionMatrixRow struct { - // Count: Same as above except intended to represent other counts (for - // e.g. for segmentation this is pixel count). NOTE(params): Only - // example_count or count is set (oneoff does not support repeated - // fields unless they are embedded inside another message). - Count googleapi.Int64s `json:"count,omitempty"` - - // ExampleCount: Value of the specific cell in the confusion matrix. The - // number of values each row has (i.e. the length of the row) is equal - // to the length of the annotation_spec_id_token field. - ExampleCount []int64 `json:"exampleCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrixRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrixRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCoreMlFormat: A model format used for iOS mobile devices. -type XPSCoreMlFormat struct { -} - -// XPSCorrelationStats: A correlation statistics between two series of -// DataType values. The series may have differing DataType-s, but within -// a single series the DataType must be the same. -type XPSCorrelationStats struct { - // CramersV: The correlation value using the Cramer's V measure. - CramersV float64 `json:"cramersV,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CramersV") 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. "CramersV") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCorrelationStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCorrelationStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSCorrelationStats) UnmarshalJSON(data []byte) error { - type NoMethod XPSCorrelationStats - var s1 struct { - CramersV gensupport.JSONFloat64 `json:"cramersV"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CramersV = float64(s1.CramersV) - return nil -} - -// XPSDataErrors: Different types of errors and the stats associatesd -// with each error. -type XPSDataErrors struct { - // Count: Number of records having errors associated with the enum. - Count int64 `json:"count,omitempty"` - - // ErrorType: Type of the error. - // - // Possible values: - // "ERROR_TYPE_UNSPECIFIED" - Not specified. - // "UNSUPPORTED_AUDIO_FORMAT" - Audio format not in the formats by - // cloud-speech AutoML. Currently only wav and flac file formats are - // supported. - // "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT" - File format differnt - // from what is specified in the file name extension. - // "FILE_TOO_LARGE" - File too large. Maximum allowed size is 50 MB. - // "MISSING_TRANSCRIPTION" - Transcript is missing. - ErrorType string `json:"errorType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataErrors) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataStats: The data statistics of a series of values that share -// the same DataType. -type XPSDataStats struct { - // ArrayStats: The statistics for ARRAY DataType. - ArrayStats *XPSArrayStats `json:"arrayStats,omitempty"` - - // CategoryStats: The statistics for CATEGORY DataType. - CategoryStats *XPSCategoryStats `json:"categoryStats,omitempty"` - - // DistinctValueCount: The number of distinct values. - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - // Float64Stats: The statistics for FLOAT64 DataType. - Float64Stats *XPSFloat64Stats `json:"float64Stats,omitempty"` - - // NullValueCount: The number of values that are null. - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - // StringStats: The statistics for STRING DataType. - StringStats *XPSStringStats `json:"stringStats,omitempty"` - - // StructStats: The statistics for STRUCT DataType. - StructStats *XPSStructStats `json:"structStats,omitempty"` - - // TimestampStats: The statistics for TIMESTAMP DataType. - TimestampStats *XPSTimestampStats `json:"timestampStats,omitempty"` - - // ValidValueCount: The number of values that are valid. - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ArrayStats") 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. "ArrayStats") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataType: Indicated the type of data that can be stored in a -// structured data entity (e.g. a table). -type XPSDataType struct { - // CompatibleDataTypes: The highly compatible data types to this data - // type. - CompatibleDataTypes []*XPSDataType `json:"compatibleDataTypes,omitempty"` - - // ListElementType: If type_code == ARRAY, then `list_element_type` is - // the type of the elements. - ListElementType *XPSDataType `json:"listElementType,omitempty"` - - // Nullable: If true, this DataType can also be `null`. - Nullable bool `json:"nullable,omitempty"` - - // StructType: If type_code == STRUCT, then `struct_type` provides type - // information for the struct's fields. - StructType *XPSStructType `json:"structType,omitempty"` - - // TimeFormat: If type_code == TIMESTAMP then `time_format` provides the - // format in which that time field is expressed. The time_format must be - // written in `strftime` syntax. If time_format is not set, then the - // default format as described on the field is used. - TimeFormat string `json:"timeFormat,omitempty"` - - // TypeCode: Required. The TypeCode for this type. - // - // Possible values: - // "TYPE_CODE_UNSPECIFIED" - Not specified. Should not be used. - // "FLOAT64" - Encoded as `number`, or the strings "NaN", - // "Infinity", or "-Infinity". - // "TIMESTAMP" - Must be between 0AD and 9999AD. Encoded as `string` - // according to time_format, or, if that format is not set, then in RFC - // 3339 `date-time` format, where `time-offset` = "Z" (e.g. - // 1985-04-12T23:20:50.52Z). - // "STRING" - Encoded as `string`. - // "ARRAY" - Encoded as `list`, where the list elements are - // represented according to list_element_type. - // "STRUCT" - Encoded as `struct`, where field values are represented - // according to struct_type. - // "CATEGORY" - Values of this type are not further understood by - // AutoML, e.g. AutoML is unable to tell the order of values (as it - // could with FLOAT64), or is unable to say if one value contains - // another (as it could with STRING). Encoded as `string` (bytes should - // be base64-encoded, as described in RFC 4648, section 4). - TypeCode string `json:"typeCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CompatibleDataTypes") - // 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. "CompatibleDataTypes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataType) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDockerFormat: A model format used for Docker containers. Use the -// params field to customize the container. The container is verified to -// work correctly on ubuntu 16.04 operating system. -type XPSDockerFormat struct { - // CpuArchitecture: Optional. Additional cpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "CPU_ARCHITECTURE_UNSPECIFIED" - // "CPU_ARCHITECTURE_X86_64" - CpuArchitecture string `json:"cpuArchitecture,omitempty"` - - // GpuArchitecture: Optional. Additional gpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "GPU_ARCHITECTURE_UNSPECIFIED" - // "GPU_ARCHITECTURE_NVIDIA" - GpuArchitecture string `json:"gpuArchitecture,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CpuArchitecture") 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. "CpuArchitecture") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDockerFormat) MarshalJSON() ([]byte, error) { - type NoMethod XPSDockerFormat - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEdgeTpuTfLiteFormat: A model format used for Edge TPU -// (https://cloud.google.com/edge-tpu/) devices. -type XPSEdgeTpuTfLiteFormat struct { -} - -// XPSEvaluationMetrics: Contains xPS-specific model evaluation metrics -// either for a single annotation spec (label), or for the model -// overall. Next tag: 18. -type XPSEvaluationMetrics struct { - // AnnotationSpecIdToken: The annotation_spec for which this evaluation - // metrics instance had been created. Empty iff this is an overall model - // evaluation (like Tables evaluation metrics), i.e. aggregated across - // all labels. The value comes from the input annotations in - // AnnotatedExample. For MVP product or for text sentiment models where - // annotation_spec_id_token is not available, set label instead. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Category: The integer category label for which this evaluation metric - // instance had been created. Valid categories are 0 or higher. Overall - // model evaluation should set this to negative values (rather than - // implicit zero). Only used for Image Segmentation (prefer to set - // annotation_spec_id_token instead). Note: uCAIP Image Segmentation - // should use annotation_spec_id_token. - Category int64 `json:"category,omitempty"` - - // EvaluatedExampleCount: The number of examples used to create this - // evaluation metrics instance. - EvaluatedExampleCount int64 `json:"evaluatedExampleCount,omitempty"` - - ImageClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"imageClassificationEvalMetrics,omitempty"` - - ImageObjectDetectionEvalMetrics *XPSImageObjectDetectionEvaluationMetrics `json:"imageObjectDetectionEvalMetrics,omitempty"` - - ImageSegmentationEvalMetrics *XPSImageSegmentationEvaluationMetrics `json:"imageSegmentationEvalMetrics,omitempty"` - - // Label: The label for which this evaluation metrics instance had been - // created. Empty iff this is an overall model evaluation (like Tables - // evaluation metrics), i.e. aggregated across all labels. The label - // maps to AnnotationSpec.display_name in Public API protos. Only used - // by MVP implementation and text sentiment FULL implementation. - Label string `json:"label,omitempty"` - - RegressionEvalMetrics *XPSRegressionEvaluationMetrics `json:"regressionEvalMetrics,omitempty"` - - TablesClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"tablesClassificationEvalMetrics,omitempty"` - - TablesEvalMetrics *XPSTablesEvaluationMetrics `json:"tablesEvalMetrics,omitempty"` - - TextClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"textClassificationEvalMetrics,omitempty"` - - TextExtractionEvalMetrics *XPSTextExtractionEvaluationMetrics `json:"textExtractionEvalMetrics,omitempty"` - - TextSentimentEvalMetrics *XPSTextSentimentEvaluationMetrics `json:"textSentimentEvalMetrics,omitempty"` - - TranslationEvalMetrics *XPSTranslationEvaluationMetrics `json:"translationEvalMetrics,omitempty"` - - VideoActionRecognitionEvalMetrics *XPSVideoActionRecognitionEvaluationMetrics `json:"videoActionRecognitionEvalMetrics,omitempty"` - - VideoClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"videoClassificationEvalMetrics,omitempty"` - - VideoObjectTrackingEvalMetrics *XPSVideoObjectTrackingEvaluationMetrics `json:"videoObjectTrackingEvalMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEvaluationMetricsSet: Specifies location of model evaluation -// metrics. -type XPSEvaluationMetricsSet struct { - // EvaluationMetrics: Inline EvaluationMetrics - should be relatively - // small. For passing large quantities of exhaustive metrics, use - // file_spec. - EvaluationMetrics []*XPSEvaluationMetrics `json:"evaluationMetrics,omitempty"` - - // FileSpec: File spec containing evaluation metrics of a model, must - // point to RecordIO file(s) of - // intelligence.cloud.automl.xps.EvaluationMetrics messages. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // NumEvaluationMetrics: Number of the evaluation metrics (usually one - // per label plus overall). - NumEvaluationMetrics int64 `json:"numEvaluationMetrics,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "EvaluationMetrics") - // 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. "EvaluationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetricsSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetricsSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSExampleSet: Set of examples or input sources. -type XPSExampleSet struct { - // FileSpec: File spec of the examples or input sources. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // Fingerprint: Fingerprint of the example set. - Fingerprint int64 `json:"fingerprint,omitempty,string"` - - // NumExamples: Number of examples. - NumExamples int64 `json:"numExamples,omitempty,string"` - - // NumInputSources: Number of input sources. - NumInputSources int64 `json:"numInputSources,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "FileSpec") 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. "FileSpec") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExampleSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSExampleSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSExportModelOutputConfig struct { - CoreMlFormat *XPSCoreMlFormat `json:"coreMlFormat,omitempty"` - - DockerFormat *XPSDockerFormat `json:"dockerFormat,omitempty"` - - EdgeTpuTfLiteFormat *XPSEdgeTpuTfLiteFormat `json:"edgeTpuTfLiteFormat,omitempty"` - - // ExportFirebaseAuxiliaryInfo: For any model and format: If true, will - // additionally export FirebaseExportedModelInfo in a firebase.txt file. - ExportFirebaseAuxiliaryInfo bool `json:"exportFirebaseAuxiliaryInfo,omitempty"` - - // OutputGcrUri: The Google Contained Registry (GCR) path the exported - // files to be pushed to. This location is set if the exported format is - // DOCKDER. - OutputGcrUri string `json:"outputGcrUri,omitempty"` - - // OutputGcsUri: The Google Cloud Storage (GCS) directory where XPS will - // output the exported models and related files. Format: - // gs://bucket/directory - OutputGcsUri string `json:"outputGcsUri,omitempty"` - - TfJsFormat *XPSTfJsFormat `json:"tfJsFormat,omitempty"` - - TfLiteFormat *XPSTfLiteFormat `json:"tfLiteFormat,omitempty"` - - TfSavedModelFormat *XPSTfSavedModelFormat `json:"tfSavedModelFormat,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreMlFormat") 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. "CoreMlFormat") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExportModelOutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSExportModelOutputConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFileSpec: Spec of input and output files, on external file systems -// (CNS, GCS, etc). -type XPSFileSpec struct { - // DirectoryPath: Deprecated. Use file_spec. - DirectoryPath string `json:"directoryPath,omitempty"` - - // Possible values: - // "FILE_FORMAT_UNKNOWN" - // "FILE_FORMAT_SSTABLE" - // "FILE_FORMAT_TRANSLATION_RKV" - Internal format for parallel text - // data used by Google Translate. go/rkvtools - // "FILE_FORMAT_RECORDIO" - // "FILE_FORMAT_RAW_CSV" - Only the lexicographically first file - // described by the file_spec contains the header line. - // "FILE_FORMAT_RAW_CAPACITOR" - FileFormat string `json:"fileFormat,omitempty"` - - // FileSpec: Single file path, or file pattern of format - // "/path/to/file@shard_count". E.g. /cns/cell-d/somewhere/file@2 is - // expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and - // /cns/cell-d/somewhere/file-00001-of-00002. - FileSpec string `json:"fileSpec,omitempty"` - - // SingleFilePath: Deprecated. Use file_spec. - SingleFilePath string `json:"singleFilePath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DirectoryPath") 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. "DirectoryPath") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFileSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSFileSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFloat64Stats: The data statistics of a series of FLOAT64 values. -type XPSFloat64Stats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // HistogramBuckets: Histogram buckets of the data series. Sorted by the - // min value of the bucket, ascendingly, and the number of the buckets - // is dynamically generated. The buckets are non-overlapping and - // completely cover whole FLOAT64 range with min of first bucket being - // "-Infinity", and max of the last one being "Infinity". - HistogramBuckets []*XPSFloat64StatsHistogramBucket `json:"histogramBuckets,omitempty"` - - // Mean: The mean of the series. - Mean float64 `json:"mean,omitempty"` - - // Quantiles: Ordered from 0 to k k-quantile values of the data series - // of n values. The value at index i is, approximately, the i*n/k-th - // smallest value in the series; for i = 0 and i = k these are, - // respectively, the min and max values. - Quantiles []float64 `json:"quantiles,omitempty"` - - // StandardDeviation: The standard deviation of the series. - StandardDeviation float64 `json:"standardDeviation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64Stats) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64Stats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64Stats) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64Stats - var s1 struct { - Mean gensupport.JSONFloat64 `json:"mean"` - Quantiles []gensupport.JSONFloat64 `json:"quantiles"` - StandardDeviation gensupport.JSONFloat64 `json:"standardDeviation"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Mean = float64(s1.Mean) - s.Quantiles = make([]float64, len(s1.Quantiles)) - for i := range s1.Quantiles { - s.Quantiles[i] = float64(s1.Quantiles[i]) - } - s.StandardDeviation = float64(s1.StandardDeviation) - return nil -} - -// XPSFloat64StatsHistogramBucket: A bucket of a histogram. -type XPSFloat64StatsHistogramBucket struct { - // Count: The number of data values that are in the bucket, i.e. are - // between min and max values. - Count int64 `json:"count,omitempty,string"` - - // Max: The maximum value of the bucket, exclusive unless max = - // "Infinity", in which case it's inclusive. - Max float64 `json:"max,omitempty"` - - // Min: The minimum value of the bucket, inclusive. - Min float64 `json:"min,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64StatsHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64StatsHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64StatsHistogramBucket) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64StatsHistogramBucket - 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 XPSImageClassificationTrainResponse struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - // ExportModelSpec: Information of downloadable models that are - // pre-generated as part of training flow and will be persisted in - // AutoMl backend. Populated for AutoMl requests. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostInNodeTime: The actual cost to create this model. - For edge - // type model, the cost is expressed in node hour. - For cloud type - // model,the cost is expressed in compute hour. - Populated for models - // created before GA. To be deprecated after GA. - TrainCostInNodeTime string `json:"trainCostInNodeTime,omitempty"` - - // TrainCostNodeSeconds: The actual training cost, expressed in node - // seconds. Populated for models trained in node time. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") 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. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSImageExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") 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. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelArtifactSpec: Stores the locations and related metadata -// of the model artifacts. Populated for uCAIP requests only. -type XPSImageModelArtifactSpec struct { - // CheckpointArtifact: The Tensorflow checkpoint files. e.g. Used for - // resumable training. - CheckpointArtifact *XPSModelArtifactItem `json:"checkpointArtifact,omitempty"` - - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // LabelGcsUri: GCS uri of decoded labels file for model export - // 'dict.txt'. - LabelGcsUri string `json:"labelGcsUri,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // TfJsBinaryGcsPrefix: GCS uri prefix of Tensorflow JavaScript binary - // files 'groupX-shardXofX.bin' Deprecated. - TfJsBinaryGcsPrefix string `json:"tfJsBinaryGcsPrefix,omitempty"` - - // TfLiteMetadataGcsUri: GCS uri of Tensorflow Lite metadata - // 'tflite_metadata.json'. - TfLiteMetadataGcsUri string `json:"tfLiteMetadataGcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CheckpointArtifact") - // 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. "CheckpointArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelServingSpec: Serving specification for image models. -type XPSImageModelServingSpec struct { - // ModelThroughputEstimation: Populate under uCAIP request scope. - ModelThroughputEstimation []*XPSImageModelServingSpecModelThroughputEstimation `json:"modelThroughputEstimation,omitempty"` - - // NodeQps: An estimated value of how much traffic a node can serve. - // Populated for AutoMl request only. - NodeQps float64 `json:"nodeQps,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ModelThroughputEstimation") 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. - // "ModelThroughputEstimation") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpec) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpec - var s1 struct { - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.NodeQps = float64(s1.NodeQps) - return nil -} - -type XPSImageModelServingSpecModelThroughputEstimation struct { - // Possible values: - // "UNSPECIFIED" - // "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU. - // "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU. - // "NVIDIA_TESLA_V100" - Nvidia Tesla V100 GPU. - // "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU. - // "NVIDIA_TESLA_T4" - Nvidia Tesla T4 GPU. - // "NVIDIA_TESLA_A100" - Nvidia Tesla A100 GPU. - // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. - // "NVIDIA_L4" - Nvidia L4 GPU. - // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. - // "TPU_V2" - TPU v2 (JellyFish). - // "TPU_V3" - TPU v3 (DragonFish). - // "TPU_V4_POD" - TPU_v4 (PufferFish). - // "TPU_V5_LITEPOD" - TPU v5 Lite Pods. - ComputeEngineAcceleratorType string `json:"computeEngineAcceleratorType,omitempty"` - - // LatencyInMilliseconds: Estimated latency. - LatencyInMilliseconds float64 `json:"latencyInMilliseconds,omitempty"` - - // NodeQps: The approximate qps a deployed node can serve. - NodeQps float64 `json:"nodeQps,omitempty"` - - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - ServomaticPartitionType string `json:"servomaticPartitionType,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ComputeEngineAcceleratorType") 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. - // "ComputeEngineAcceleratorType") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - var s1 struct { - LatencyInMilliseconds gensupport.JSONFloat64 `json:"latencyInMilliseconds"` - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LatencyInMilliseconds = float64(s1.LatencyInMilliseconds) - s.NodeQps = float64(s1.NodeQps) - return nil -} - -// XPSImageObjectDetectionEvaluationMetrics: Model evaluation metrics -// for image object detection problems. Evaluates prediction quality of -// labeled bounding boxes. -type XPSImageObjectDetectionEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: The single metric for bounding boxes - // evaluation: the mean_average_precision averaged over all - // bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: The bounding boxes match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence - // threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingBoxCount: The total number of bounding boxes (i.e. - // summed over all images) the ground truth used to create this - // evaluation had. - EvaluatedBoundingBoxCount int64 `json:"evaluatedBoundingBoxCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") 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. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - return nil -} - -type XPSImageObjectDetectionModelSpec struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // MaxBoundingBoxCount: Max number of bounding box. - MaxBoundingBoxCount int64 `json:"maxBoundingBoxCount,omitempty,string"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") 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. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetrics: Model evaluation metrics for -// image segmentation problems. Next tag: 4. -type XPSImageSegmentationEvaluationMetrics struct { - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry: Metrics -// for a single confidence threshold. -type XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // ConfusionMatrix: Confusion matrix of the per confidence_threshold - // evaluation. Pixel counts are set here. Only set for model level - // evaluation, not for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // DiceScoreCoefficient: DSC or the F1 score: The harmonic mean of - // recall and precision. - DiceScoreCoefficient float64 `json:"diceScoreCoefficient,omitempty"` - - // IouScore: IOU score. - IouScore float64 `json:"iouScore,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - DiceScoreCoefficient gensupport.JSONFloat64 `json:"diceScoreCoefficient"` - IouScore gensupport.JSONFloat64 `json:"iouScore"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.DiceScoreCoefficient = float64(s1.DiceScoreCoefficient) - s.IouScore = float64(s1.IouScore) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -type XPSImageSegmentationTrainResponse struct { - // ColorMaps: Color map of the model. - ColorMaps []*XPSColorMap `json:"colorMaps,omitempty"` - - // ExportModelSpec: NOTE: These fields are not used/needed in EAP but - // will be set later. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. Model artifact spec stores and model gcs pathes and - // related metadata - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColorMaps") 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. "ColorMaps") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSIntegratedGradientsAttribution: An attribution method that -// computes the Aumann-Shapley value taking advantage of the model's -// fully differentiable structure. Refer to this paper for more details: -// https://arxiv.org/abs/1703.01365 -type XPSIntegratedGradientsAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is within the desired error range. Valid range of its - // value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") 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. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSIntegratedGradientsAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSIntegratedGradientsAttribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSMetricEntry struct { - // ArgentumMetricId: For billing metrics that are using legacy sku's, - // set the legacy billing metric id here. This will be sent to Chemist - // as the "cloudbilling.googleapis.com/argentum_metric_id" label. - // Otherwise leave empty. - ArgentumMetricId string `json:"argentumMetricId,omitempty"` - - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - - // Int64Value: A signed 64-bit integer value. - Int64Value int64 `json:"int64Value,omitempty,string"` - - // MetricName: The metric name defined in the service configuration. - MetricName string `json:"metricName,omitempty"` - - // SystemLabels: Billing system labels for this (metric, value) pair. - SystemLabels []*XPSMetricEntryLabel `json:"systemLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArgentumMetricId") 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. "ArgentumMetricId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSMetricEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSMetricEntry - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil -} - -type XPSMetricEntryLabel struct { - // LabelName: The name of the label. - LabelName string `json:"labelName,omitempty"` - - // LabelValue: The value of the label. - LabelValue string `json:"labelValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelName") 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. "LabelName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntryLabel) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntryLabel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSModelArtifactItem: A single model artifact item. -type XPSModelArtifactItem struct { - // ArtifactFormat: The model artifact format. - // - // Possible values: - // "ARTIFACT_FORMAT_UNSPECIFIED" - Should not be used. - // "TF_CHECKPOINT" - The Tensorflow checkpoints. See - // https://www.tensorflow.org/guide/checkpoint. - // "TF_SAVED_MODEL" - The Tensorflow SavedModel binary. - // "TF_LITE" - Model artifact in generic TensorFlow Lite (.tflite) - // format. See https://www.tensorflow.org/lite. - // "EDGE_TPU_TF_LITE" - Used for [Edge - // TPU](https://cloud.google.com/edge-tpu/) devices. - // "TF_JS" - A [TensorFlow.js](https://www.tensorflow.org/js) model - // that can be used in the browser and in Node.js using JavaScript. - // "CORE_ML" - Used for iOS mobile devices in (.mlmodel) format. See - // https://developer.apple.com/documentation/coreml - ArtifactFormat string `json:"artifactFormat,omitempty"` - - // GcsUri: The Google Cloud Storage (GCS) uri that stores the model - // binary files. - GcsUri string `json:"gcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArtifactFormat") 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. "ArtifactFormat") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSModelArtifactItem) MarshalJSON() ([]byte, error) { - type NoMethod XPSModelArtifactItem - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSPreprocessResponse: Next ID: 8 -type XPSPreprocessResponse struct { - // OutputExampleSet: Preprocessed examples, that are to be imported into - // AutoML storage. This should point to RecordIO file(s) of - // PreprocessedExample messages. The - // PreprocessedExample.mvp_training_data-s returned here are later - // verbatim passed to Train() call in TrainExample.mvp_training_data. - OutputExampleSet *XPSExampleSet `json:"outputExampleSet,omitempty"` - - SpeechPreprocessResp *XPSSpeechPreprocessResponse `json:"speechPreprocessResp,omitempty"` - - TablesPreprocessResponse *XPSTablesPreprocessResponse `json:"tablesPreprocessResponse,omitempty"` - - TranslationPreprocessResp *XPSTranslationPreprocessResponse `json:"translationPreprocessResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExampleSet") 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. "OutputExampleSet") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSRegressionEvaluationMetrics: Model evaluation metrics for -// regression problems. It can be used for Tables. -type XPSRegressionEvaluationMetrics struct { - // MeanAbsoluteError: Mean Absolute Error (MAE). - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error. Only set - // if all ground truth values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root Mean Squared Error (RMSE). - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // 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. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionEvaluationMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -// XPSRegressionMetricsEntry: A pair of actual & observed values for the -// model being evaluated. -type XPSRegressionMetricsEntry struct { - // PredictedValue: The observed value for a row in the dataset. - PredictedValue float64 `json:"predictedValue,omitempty"` - - // TrueValue: The actual target value for a row in the dataset. - TrueValue float64 `json:"trueValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PredictedValue") 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. "PredictedValue") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionMetricsEntry - var s1 struct { - PredictedValue gensupport.JSONFloat64 `json:"predictedValue"` - TrueValue gensupport.JSONFloat64 `json:"trueValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PredictedValue = float64(s1.PredictedValue) - s.TrueValue = float64(s1.TrueValue) - return nil -} - -type XPSReportingMetrics struct { - // EffectiveTrainingDuration: The effective time training used. If set, - // this is used for quota management and billing. Deprecated. AutoML BE - // doesn't use this. Don't set. - EffectiveTrainingDuration string `json:"effectiveTrainingDuration,omitempty"` - - // MetricEntries: One entry per metric name. The values must be - // aggregated per metric name. - MetricEntries []*XPSMetricEntry `json:"metricEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EffectiveTrainingDuration") 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. - // "EffectiveTrainingDuration") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSReportingMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSReportingMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationMetadata struct { - // Inputs: Metadata of the input. - Inputs map[string]XPSResponseExplanationMetadataInputMetadata `json:"inputs,omitempty"` - - // Outputs: Metadata of the output. - Outputs map[string]XPSResponseExplanationMetadataOutputMetadata `json:"outputs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Inputs") 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. "Inputs") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataInputMetadata: Metadata of the input of -// a feature. -type XPSResponseExplanationMetadataInputMetadata struct { - // InputTensorName: Name of the input tensor for this model. Only needed - // in train response. - InputTensorName string `json:"inputTensorName,omitempty"` - - // Modality: Modality of the feature. Valid values are: numeric, image. - // Defaults to numeric. - // - // Possible values: - // "MODALITY_UNSPECIFIED" - // "NUMERIC" - // "IMAGE" - // "CATEGORICAL" - Modality string `json:"modality,omitempty"` - - // VisualizationConfig: Visualization configurations for image - // explanation. - VisualizationConfig *XPSVisualization `json:"visualizationConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputTensorName") 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. "InputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataInputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataInputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataOutputMetadata: Metadata of the -// prediction output to be explained. -type XPSResponseExplanationMetadataOutputMetadata struct { - // OutputTensorName: Name of the output tensor. Only needed in train - // response. - OutputTensorName string `json:"outputTensorName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputTensorName") 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. "OutputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataOutputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataOutputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationParameters struct { - // IntegratedGradientsAttribution: An attribution method that computes - // Aumann-Shapley values taking advantage of the model's fully - // differentiable structure. Refer to this paper for more details: - // https://arxiv.org/abs/1703.01365 - IntegratedGradientsAttribution *XPSIntegratedGradientsAttribution `json:"integratedGradientsAttribution,omitempty"` - - // XraiAttribution: An attribution method that redistributes Integrated - // Gradients attribution to segmented regions, taking advantage of the - // model's fully differentiable structure. Refer to this paper for more - // details: https://arxiv.org/abs/1906.02825 XRAI currently performs - // better on natural images, like a picture of a house or an animal. If - // the images are taken in artificial environments, like a lab or - // manufacturing line, or from diagnostic equipment, like x-rays or - // quality-control cameras, use Integrated Gradients instead. - XraiAttribution *XPSXraiAttribution `json:"xraiAttribution,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IntegratedGradientsAttribution") 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. - // "IntegratedGradientsAttribution") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationSpec: Specification of Model explanation. -// Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 -// for context. -type XPSResponseExplanationSpec struct { - // ExplanationType: Explanation type. For AutoML Image Classification - // models, possible values are: * `image-integrated-gradients` * - // `image-xrai` - ExplanationType string `json:"explanationType,omitempty"` - - // Metadata: Metadata describing the Model's input and output for - // explanation. - Metadata *XPSResponseExplanationMetadata `json:"metadata,omitempty"` - - // Parameters: Parameters that configure explaining of the Model's - // predictions. - Parameters *XPSResponseExplanationParameters `json:"parameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationType") 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. "ExplanationType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSRow struct { - // ColumnIds: The ids of the columns. Note: The below `values` field - // must match order of this field, if this field is set. - ColumnIds []int64 `json:"columnIds,omitempty"` - - // Values: The values of the row cells, given in the same order as the - // column_ids. If column_ids is not set, then in the same order as the - // input_feature_column_ids in TablesModelMetadata. - Values []interface{} `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnIds") 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. "ColumnIds") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetrics struct { - // SubModelEvaluationMetrics: Evaluation metrics for all submodels - // contained in this model. - SubModelEvaluationMetrics []*XPSSpeechEvaluationMetricsSubModelEvaluationMetric `json:"subModelEvaluationMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SubModelEvaluationMetrics") 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. - // "SubModelEvaluationMetrics") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetricsSubModelEvaluationMetric struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - NumDeletions int64 `json:"numDeletions,omitempty"` - - NumInsertions int64 `json:"numInsertions,omitempty"` - - NumSubstitutions int64 `json:"numSubstitutions,omitempty"` - - // NumUtterances: Number of utterances used in the wer computation. - NumUtterances int64 `json:"numUtterances,omitempty"` - - // NumWords: Number of words over which the word error rate was - // computed. - NumWords int64 `json:"numWords,omitempty"` - - // SentenceAccuracy: Below fields are used for debugging purposes - SentenceAccuracy float64 `json:"sentenceAccuracy,omitempty"` - - // Wer: Word error rate (standard error metric used for speech - // recognition). - Wer float64 `json:"wer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") 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. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) UnmarshalJSON(data []byte) error { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - var s1 struct { - SentenceAccuracy gensupport.JSONFloat64 `json:"sentenceAccuracy"` - Wer gensupport.JSONFloat64 `json:"wer"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SentenceAccuracy = float64(s1.SentenceAccuracy) - s.Wer = float64(s1.Wer) - return nil -} - -type XPSSpeechModelSpec struct { - // DatasetId: Required for speech xps backend. Speech xps has to use - // dataset_id and model_id as the primary key in db so that speech API - // can query the db directly. - DatasetId int64 `json:"datasetId,omitempty,string"` - - Language string `json:"language,omitempty"` - - // SubModelSpecs: Model specs for all submodels contained in this model. - SubModelSpecs []*XPSSpeechModelSpecSubModelSpec `json:"subModelSpecs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatasetId") 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. "DatasetId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechModelSpecSubModelSpec struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // ClientId: In S3, Recognition ClientContextId.client_id - ClientId string `json:"clientId,omitempty"` - - // ContextId: In S3, Recognition ClientContextId.context_id - ContextId string `json:"contextId,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") 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. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpecSubModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpecSubModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessResponse struct { - // CnsTestDataPath: Location od shards of sstables (test data) of - // DataUtterance protos. - CnsTestDataPath string `json:"cnsTestDataPath,omitempty"` - - // CnsTrainDataPath: Location of shards of sstables (training data) of - // DataUtterance protos. - CnsTrainDataPath string `json:"cnsTrainDataPath,omitempty"` - - // PrebuiltModelEvaluationMetrics: The metrics for prebuilt speech - // models. They are included here because there is no prebuilt speech - // models stored in the AutoML. - PrebuiltModelEvaluationMetrics *XPSSpeechEvaluationMetrics `json:"prebuiltModelEvaluationMetrics,omitempty"` - - // SpeechPreprocessStats: Stats associated with the data. - SpeechPreprocessStats *XPSSpeechPreprocessStats `json:"speechPreprocessStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CnsTestDataPath") 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. "CnsTestDataPath") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessStats struct { - // DataErrors: Different types of data errors and the counts associated - // with them. - DataErrors []*XPSDataErrors `json:"dataErrors,omitempty"` - - // NumHumanLabeledExamples: The number of rows marked HUMAN_LABELLED - NumHumanLabeledExamples int64 `json:"numHumanLabeledExamples,omitempty"` - - // NumLogsExamples: The number of samples found in the previously - // recorded logs data. - NumLogsExamples int64 `json:"numLogsExamples,omitempty"` - - // NumMachineTranscribedExamples: The number of rows marked as - // MACHINE_TRANSCRIBED - NumMachineTranscribedExamples int64 `json:"numMachineTranscribedExamples,omitempty"` - - // TestExamplesCount: The number of examples labelled as TEST by Speech - // xps server. - TestExamplesCount int64 `json:"testExamplesCount,omitempty"` - - // TestSentencesCount: The number of sentences in the test data set. - TestSentencesCount int64 `json:"testSentencesCount,omitempty"` - - // TestWordsCount: The number of words in the test data set. - TestWordsCount int64 `json:"testWordsCount,omitempty"` - - // TrainExamplesCount: The number of examples labeled as TRAIN by Speech - // xps server. - TrainExamplesCount int64 `json:"trainExamplesCount,omitempty"` - - // TrainSentencesCount: The number of sentences in the training data - // set. - TrainSentencesCount int64 `json:"trainSentencesCount,omitempty"` - - // TrainWordsCount: The number of words in the training data set. - TrainWordsCount int64 `json:"trainWordsCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DataErrors") 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. "DataErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStats: The data statistics of a series of STRING values. -type XPSStringStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopUnigramStats: The statistics of the top 20 unigrams, ordered by - // StringStats.UnigramStats.count. - TopUnigramStats []*XPSStringStatsUnigramStats `json:"topUnigramStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStatsUnigramStats: The statistics of a unigram. -type XPSStringStatsUnigramStats struct { - // Count: The number of occurrences of this unigram in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The unigram. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStatsUnigramStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStatsUnigramStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructStats: The data statistics of a series of STRUCT values. -type XPSStructStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // FieldStats: Map from a field name of the struct to data stats - // aggregated over series of all data in that field across all the - // structs. - FieldStats map[string]XPSDataStats `json:"fieldStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructType: `StructType` defines the DataType-s of a STRUCT type. -type XPSStructType struct { - // Fields: Unordered map of struct field names to their data types. - Fields map[string]XPSDataType `json:"fields,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fields") 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. "Fields") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructType) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTableSpec struct { - // ColumnSpecs: Mapping from column id to column spec. - ColumnSpecs map[string]XPSColumnSpec `json:"columnSpecs,omitempty"` - - // ImportedDataSizeInBytes: The total size of imported data of the - // table. - ImportedDataSizeInBytes int64 `json:"importedDataSizeInBytes,omitempty,string"` - - // RowCount: The number of rows in the table. - RowCount int64 `json:"rowCount,omitempty,string"` - - // TimeColumnId: The id of the time column. - TimeColumnId int64 `json:"timeColumnId,omitempty"` - - // ValidRowCount: The number of valid rows. - ValidRowCount int64 `json:"validRowCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColumnSpecs") 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. "ColumnSpecs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTableSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSTableSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetrics: Metrics for Tables classification -// problems. -type XPSTablesClassificationMetrics struct { - // CurveMetrics: Metrics building a curve. - CurveMetrics []*XPSTablesClassificationMetricsCurveMetrics `json:"curveMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CurveMetrics") 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. "CurveMetrics") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetricsCurveMetrics: Metrics curve data point -// for a single value. -type XPSTablesClassificationMetricsCurveMetrics struct { - // AucPr: The area under the precision-recall curve. - AucPr float64 `json:"aucPr,omitempty"` - - // AucRoc: The area under receiver operating characteristic curve. - AucRoc float64 `json:"aucRoc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve and ROC curve can be derived from them. - ConfidenceMetricsEntries []*XPSTablesConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // LogLoss: The Log loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // PositionThreshold: The position threshold value used to compute the - // metrics. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Value: The CATEGORY row value (for ARRAY unnested) the curve metrics - // are for. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AucPr") 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. "AucPr") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - var s1 struct { - AucPr gensupport.JSONFloat64 `json:"aucPr"` - AucRoc gensupport.JSONFloat64 `json:"aucRoc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AucPr = float64(s1.AucPr) - s.AucRoc = float64(s1.AucRoc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSTablesConfidenceMetricsEntry: Metrics for a single confidence -// threshold. -type XPSTablesConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. (2 * precision * - // recall) / (precision + recall) - F1Score float64 `json:"f1Score,omitempty"` - - // FalseNegativeCount: False negative count. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: False positive count. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: FPR = #false positives / (#false positives + #true - // negatives) - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // Precision: Precision = #true positives / (#true positives + #false - // positives). - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall = #true positives / (#true positives + #false - // negatives). - Recall float64 `json:"recall,omitempty"` - - // TrueNegativeCount: True negative count. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: True positive count. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // TruePositiveRate: TPR = #true positives / (#true positives + #false - // negatvies) - TruePositiveRate float64 `json:"truePositiveRate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - TruePositiveRate gensupport.JSONFloat64 `json:"truePositiveRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - s.TruePositiveRate = float64(s1.TruePositiveRate) - return nil -} - -// XPSTablesDatasetMetadata: Metadata for a dataset used for AutoML -// Tables. Next ID: 6 -type XPSTablesDatasetMetadata struct { - // MlUseColumnId: Id the column to split the table. - MlUseColumnId int64 `json:"mlUseColumnId,omitempty"` - - // PrimaryTableSpec: Primary table. - PrimaryTableSpec *XPSTableSpec `json:"primaryTableSpec,omitempty"` - - // TargetColumnCorrelations: (the column id : its CorrelationStats with - // target column). - TargetColumnCorrelations map[string]XPSCorrelationStats `json:"targetColumnCorrelations,omitempty"` - - // TargetColumnId: Id of the primary table column that should be used as - // the training label. - TargetColumnId int64 `json:"targetColumnId,omitempty"` - - // WeightColumnId: Id of the primary table column that should be used as - // the weight column. - WeightColumnId int64 `json:"weightColumnId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MlUseColumnId") 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. "MlUseColumnId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesDatasetMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesDatasetMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesEvaluationMetrics struct { - // ClassificationMetrics: Classification metrics. - ClassificationMetrics *XPSTablesClassificationMetrics `json:"classificationMetrics,omitempty"` - - // RegressionMetrics: Regression metrics. - RegressionMetrics *XPSTablesRegressionMetrics `json:"regressionMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClassificationMetrics") 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. "ClassificationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelColumnInfo: An information specific to given column and -// Tables Model, in context of the Model and the predictions created by -// it. -type XPSTablesModelColumnInfo struct { - // ColumnId: The ID of the column. - ColumnId int64 `json:"columnId,omitempty"` - - // FeatureImportance: When given as part of a Model: Measurement of how - // much model predictions correctness on the TEST data depend on values - // in this column. A value between 0 and 1, higher means higher - // influence. These values are normalized - for all input feature - // columns of a given model they add to 1. When given back by Predict or - // Batch Predict: Measurement of how impactful for the prediction - // returned for the given row the value in this column was. - // Specifically, the feature importance specifies the marginal - // contribution that the feature made to the prediction score compared - // to the baseline score. These values are computed using the Sampled - // Shapley method. - FeatureImportance float64 `json:"featureImportance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelColumnInfo) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelColumnInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelColumnInfo) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelColumnInfo - var s1 struct { - FeatureImportance gensupport.JSONFloat64 `json:"featureImportance"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FeatureImportance = float64(s1.FeatureImportance) - return nil -} - -// XPSTablesModelStructure: A description of Tables model structure. -type XPSTablesModelStructure struct { - // ModelParameters: A list of models. - ModelParameters []*XPSTablesModelStructureModelParameters `json:"modelParameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelParameters") 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. "ModelParameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructure) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelStructureModelParameters: Model hyper-parameters for a -// model. -type XPSTablesModelStructureModelParameters struct { - Hyperparameters []*XPSTablesModelStructureModelParametersParameter `json:"hyperparameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Hyperparameters") 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. "Hyperparameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesModelStructureModelParametersParameter struct { - // FloatValue: Float type parameter value. - FloatValue float64 `json:"floatValue,omitempty"` - - // IntValue: Integer type parameter value. - IntValue int64 `json:"intValue,omitempty,string"` - - // Name: Parameter name. - Name string `json:"name,omitempty"` - - // StringValue: String type parameter value. - StringValue string `json:"stringValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FloatValue") 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. "FloatValue") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParametersParameter) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParametersParameter - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelStructureModelParametersParameter) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelStructureModelParametersParameter - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -type XPSTablesPreprocessResponse struct { - // TablesDatasetMetadata: The table/column id, column_name and the - // DataTypes of the columns will be populated. - TablesDatasetMetadata *XPSTablesDatasetMetadata `json:"tablesDatasetMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "TablesDatasetMetadata") 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. "TablesDatasetMetadata") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesRegressionMetrics: Metrics for Tables regression problems. -type XPSTablesRegressionMetrics struct { - // MeanAbsoluteError: Mean absolute error. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error, only set - // if all of the target column's values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root mean squared error. - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // 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. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesRegressionMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesRegressionMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesRegressionMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesRegressionMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -type XPSTablesTrainResponse struct { - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // PredictionSampleRows: Sample rows from the dataset this model was - // trained. - PredictionSampleRows []*XPSRow `json:"predictionSampleRows,omitempty"` - - // TablesModelColumnInfo: Output only. Auxiliary information for each of - // the input_feature_column_specs, with respect to this particular - // model. - TablesModelColumnInfo []*XPSTablesModelColumnInfo `json:"tablesModelColumnInfo,omitempty"` - - // TrainCostMilliNodeHours: The actual training cost of the model, - // expressed in milli node hours, i.e. 1,000 value in this field means 1 - // node hour. Guaranteed to not exceed the train budget. - TrainCostMilliNodeHours int64 `json:"trainCostMilliNodeHours,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") 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. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesTrainingOperationMetadata struct { - // CreateModelStage: Current stage of creating model. - // - // Possible values: - // "CREATE_MODEL_STAGE_UNSPECIFIED" - Unspecified stage. - // "DATA_PREPROCESSING" - Prepare the model training pipeline and run - // data processing. - // "TRAINING" - Training model. - // "EVALUATING" - Run evaluation. - // "MODEL_POST_PROCESSING" - Finalizing model training pipeline. - CreateModelStage string `json:"createModelStage,omitempty"` - - // OptimizationObjective: The optimization objective for model. - OptimizationObjective string `json:"optimizationObjective,omitempty"` - - // TopTrials: This field is for training. When the operation is - // terminated successfully, AutoML Backend post this field to operation - // metadata in spanner. If the metadata has no trials returned, the - // training operation is supposed to be a failure. - TopTrials []*XPSTuningTrial `json:"topTrials,omitempty"` - - // TrainBudgetMilliNodeHours: Creating model budget. - TrainBudgetMilliNodeHours int64 `json:"trainBudgetMilliNodeHours,omitempty,string"` - - // TrainingObjectivePoints: This field records the training objective - // value with respect to time, giving insight into how the model - // architecture search is performing as training time elapses. - TrainingObjectivePoints []*XPSTrainingObjectivePoint `json:"trainingObjectivePoints,omitempty"` - - // TrainingStartTime: Timestamp when training process starts. - TrainingStartTime string `json:"trainingStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateModelStage") 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. "CreateModelStage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextComponentModel: Component model. Next ID: 10 -type XPSTextComponentModel struct { - // BatchPredictionModelGcsUri: The Cloud Storage resource path to hold - // batch prediction model. - BatchPredictionModelGcsUri string `json:"batchPredictionModelGcsUri,omitempty"` - - // OnlinePredictionModelGcsUri: The Cloud Storage resource path to hold - // online prediction model. - OnlinePredictionModelGcsUri string `json:"onlinePredictionModelGcsUri,omitempty"` - - // Partition: The partition where the model is deployed. Populated by - // uCAIP BE as part of online PredictRequest. - // - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - Partition string `json:"partition,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud Ai Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ServoModelName: The name of servo model. Populated by uCAIP BE as - // part of online PredictRequest. - ServoModelName string `json:"servoModelName,omitempty"` - - // SubmodelName: The name of the trained NL submodel. - SubmodelName string `json:"submodelName,omitempty"` - - // SubmodelType: The type of trained NL submodel - // - // Possible values: - // "TEXT_MODEL_TYPE_UNSPECIFIED" - // "TEXT_MODEL_TYPE_DEFAULT" - // "TEXT_MODEL_TYPE_META_ARCHITECT" - // "TEXT_MODEL_TYPE_ATC" - // "TEXT_MODEL_TYPE_CLARA2" - // "TEXT_MODEL_TYPE_CHATBASE" - // "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING" - // "TEXT_MODEL_TYPE_TEXT_EXTRACTION" - Model type for entity - // extraction. - // "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION" - Model type for - // relationship extraction. - // "TEXT_MODEL_TYPE_COMPOSITE" - A composite model represents a set of - // component models that have to be used together for prediction. A - // composite model appears to be a single model to the model user. It - // may contain only one component model. Please refer to - // go/cnl-composite-models for more information. - // "TEXT_MODEL_TYPE_ALL_MODELS" - Model type used to train default, - // MA, and ATC models in a single batch worker pipeline. - // "TEXT_MODEL_TYPE_BERT" - BERT pipeline needs a specific model type, - // since it uses a different TFX configuration compared with DEFAULT - // (despite sharing most of the code). - // "TEXT_MODEL_TYPE_ENC_PALM" - Model type for EncPaLM. - SubmodelType string `json:"submodelType,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // VersionNumber: The servomatic model version number. Populated by - // uCAIP BE as part of online PredictRequest. - VersionNumber int64 `json:"versionNumber,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "BatchPredictionModelGcsUri") 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. - // "BatchPredictionModelGcsUri") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextComponentModel) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextComponentModel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTextExtractionEvaluationMetrics struct { - // BestF1ConfidenceMetrics: Values are at the highest F1 score on the - // precision-recall curve. Only confidence_threshold, recall, precision, - // and f1_score will be set. - BestF1ConfidenceMetrics *XPSConfidenceMetricsEntry `json:"bestF1ConfidenceMetrics,omitempty"` - - // ConfidenceMetricsEntries: If the enclosing EvaluationMetrics.label is - // empty, confidence_metrics_entries is an evaluation of the entire - // model across all labels. If the enclosing EvaluationMetrics.label is - // set, confidence_metrics_entries applies to that label. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the model, at the default - // confidence threshold (0.0). Only set for whole-model evaluation, not - // for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // PerLabelConfidenceMetrics: Only recall, precision, and f1_score will - // be set. - PerLabelConfidenceMetrics map[string]XPSConfidenceMetricsEntry `json:"perLabelConfidenceMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BestF1ConfidenceMetrics") 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. "BestF1ConfidenceMetrics") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextExtractionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextExtractionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextSentimentEvaluationMetrics: Model evaluation metrics for text -// sentiment problems. -type XPSTextSentimentEvaluationMetrics struct { - // ConfusionMatrix: Output only. Confusion matrix of the evaluation. - // Only set for the overall model evaluation, not for evaluation of a - // single annotation spec. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // LinearKappa: Output only. Linear weighted kappa. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - LinearKappa float64 `json:"linearKappa,omitempty"` - - // MeanAbsoluteError: Output only. Mean absolute error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanSquaredError: Output only. Mean squared error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanSquaredError float64 `json:"meanSquaredError,omitempty"` - - // Precision: Output only. Precision. - Precision float64 `json:"precision,omitempty"` - - // QuadraticKappa: Output only. Quadratic weighted kappa. Only set for - // the overall model evaluation, not for evaluation of a single - // annotation spec. - QuadraticKappa float64 `json:"quadraticKappa,omitempty"` - - // Recall: Output only. Recall. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfusionMatrix") 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. "ConfusionMatrix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextSentimentEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextSentimentEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTextSentimentEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTextSentimentEvaluationMetrics - var s1 struct { - F1Score gensupport.JSONFloat64 `json:"f1Score"` - LinearKappa gensupport.JSONFloat64 `json:"linearKappa"` - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanSquaredError gensupport.JSONFloat64 `json:"meanSquaredError"` - Precision gensupport.JSONFloat64 `json:"precision"` - QuadraticKappa gensupport.JSONFloat64 `json:"quadraticKappa"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.F1Score = float64(s1.F1Score) - s.LinearKappa = float64(s1.LinearKappa) - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanSquaredError = float64(s1.MeanSquaredError) - s.Precision = float64(s1.Precision) - s.QuadraticKappa = float64(s1.QuadraticKappa) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSTextToSpeechTrainResponse: TextToSpeech train response -type XPSTextToSpeechTrainResponse struct { -} - -type XPSTextTrainResponse struct { - // ComponentModel: Component submodels. - ComponentModel []*XPSTextComponentModel `json:"componentModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ComponentModel") 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. "ComponentModel") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTfJsFormat: A TensorFlow.js (https://www.tensorflow.org/js) model -// that can be used in the browser and in Node.js using JavaScript. -type XPSTfJsFormat struct { -} - -// XPSTfLiteFormat: LINT.IfChange A model format used for mobile and IoT -// devices. See https://www.tensorflow.org/lite. -type XPSTfLiteFormat struct { -} - -// XPSTfSavedModelFormat: A tensorflow model format in SavedModel -// format. -type XPSTfSavedModelFormat struct { -} - -// XPSTimestampStats: The data statistics of a series of TIMESTAMP -// values. -type XPSTimestampStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // GranularStats: The string key is the pre-defined granularity. - // Currently supported: hour_of_day, day_of_week, month_of_year. - // Granularities finer that the granularity of timestamp data are not - // populated (e.g. if timestamps are at day granularity, then - // hour_of_day is not populated). - GranularStats map[string]XPSTimestampStatsGranularStats `json:"granularStats,omitempty"` - - MedianTimestampNanos int64 `json:"medianTimestampNanos,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTimestampStatsGranularStats: Stats split by a defined in context -// granularity. -type XPSTimestampStatsGranularStats struct { - // Buckets: A map from granularity key to example count for that key. - // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means - // May). - Buckets map[string]string `json:"buckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStatsGranularStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStatsGranularStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTrackMetricsEntry: Track matching model metrics for a single track -// match threshold and multiple label match confidence thresholds. Next -// tag: 6. -type XPSTrackMetricsEntry struct { - // ConfidenceMetricsEntries: Output only. Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - // Precision-recall curve is derived from them. - ConfidenceMetricsEntries []*XPSTrackMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: Output only. The intersection-over-union threshold - // value between bounding boxes across frames used to compute this - // metric entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanBoundingBoxIou: Output only. The mean bounding box iou over all - // confidence thresholds. - MeanBoundingBoxIou float64 `json:"meanBoundingBoxIou,omitempty"` - - // MeanMismatchRate: Output only. The mean mismatch rate over all - // confidence thresholds. - MeanMismatchRate float64 `json:"meanMismatchRate,omitempty"` - - // MeanTrackingAveragePrecision: Output only. The mean average precision - // over all confidence thresholds. - MeanTrackingAveragePrecision float64 `json:"meanTrackingAveragePrecision,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanBoundingBoxIou gensupport.JSONFloat64 `json:"meanBoundingBoxIou"` - MeanMismatchRate gensupport.JSONFloat64 `json:"meanMismatchRate"` - MeanTrackingAveragePrecision gensupport.JSONFloat64 `json:"meanTrackingAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanBoundingBoxIou = float64(s1.MeanBoundingBoxIou) - s.MeanMismatchRate = float64(s1.MeanMismatchRate) - s.MeanTrackingAveragePrecision = float64(s1.MeanTrackingAveragePrecision) - return nil -} - -// XPSTrackMetricsEntryConfidenceMetricsEntry: Metrics for a single -// confidence threshold. Next tag: 6. -type XPSTrackMetricsEntryConfidenceMetricsEntry struct { - // BoundingBoxIou: Output only. Bounding box intersection-over-union - // precision. Measures how well the bounding boxes overlap between each - // other (e.g. complete overlap or just barely above iou_threshold). - BoundingBoxIou float64 `json:"boundingBoxIou,omitempty"` - - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // MismatchRate: Output only. Mismatch rate, which measures the tracking - // consistency, i.e. correctness of instance ID continuity. - MismatchRate float64 `json:"mismatchRate,omitempty"` - - // TrackingPrecision: Output only. Tracking precision. - TrackingPrecision float64 `json:"trackingPrecision,omitempty"` - - // TrackingRecall: Output only. Tracking recall. - TrackingRecall float64 `json:"trackingRecall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BoundingBoxIou") 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. "BoundingBoxIou") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - var s1 struct { - BoundingBoxIou gensupport.JSONFloat64 `json:"boundingBoxIou"` - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - MismatchRate gensupport.JSONFloat64 `json:"mismatchRate"` - TrackingPrecision gensupport.JSONFloat64 `json:"trackingPrecision"` - TrackingRecall gensupport.JSONFloat64 `json:"trackingRecall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxIou = float64(s1.BoundingBoxIou) - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.MismatchRate = float64(s1.MismatchRate) - s.TrackingPrecision = float64(s1.TrackingPrecision) - s.TrackingRecall = float64(s1.TrackingRecall) - return nil -} - -// XPSTrainResponse: Next ID: 18 -type XPSTrainResponse struct { - // DeployedModelSizeBytes: Estimated model size in bytes once deployed. - DeployedModelSizeBytes int64 `json:"deployedModelSizeBytes,omitempty,string"` - - // ErrorAnalysisConfigs: Optional vision model error analysis - // configuration. The field is set when model error analysis is enabled - // in the training request. The results of error analysis will be binded - // together with evaluation results (in the format of AnnotatedExample). - ErrorAnalysisConfigs []*XPSVisionErrorAnalysisConfig `json:"errorAnalysisConfigs,omitempty"` - - // EvaluatedExampleSet: Examples used to evaluate the model (usually the - // test set), with the predicted annotations. The file_spec should point - // to recordio file(s) of AnnotatedExample. For each returned example, - // the example_id_token and annotations predicted by the model must be - // set. The example payload can and is recommended to be omitted. - EvaluatedExampleSet *XPSExampleSet `json:"evaluatedExampleSet,omitempty"` - - // EvaluationMetricsSet: The trained model evaluation metrics. This can - // be optionally returned. - EvaluationMetricsSet *XPSEvaluationMetricsSet `json:"evaluationMetricsSet,omitempty"` - - // ExplanationConfigs: VisionExplanationConfig for XAI on test set. - // Optional for when XAI is enable in training request. - ExplanationConfigs []*XPSResponseExplanationSpec `json:"explanationConfigs,omitempty"` - - ImageClassificationTrainResp *XPSImageClassificationTrainResponse `json:"imageClassificationTrainResp,omitempty"` - - ImageObjectDetectionTrainResp *XPSImageObjectDetectionModelSpec `json:"imageObjectDetectionTrainResp,omitempty"` - - ImageSegmentationTrainResp *XPSImageSegmentationTrainResponse `json:"imageSegmentationTrainResp,omitempty"` - - // ModelToken: Token that represents the trained model. This is - // considered immutable and is persisted in AutoML. xPS can put their - // own proto in the byte string, to e.g. point to the model checkpoints. - // The token is passed to other xPS APIs to refer to the model. - ModelToken string `json:"modelToken,omitempty"` - - SpeechTrainResp *XPSSpeechModelSpec `json:"speechTrainResp,omitempty"` - - TablesTrainResp *XPSTablesTrainResponse `json:"tablesTrainResp,omitempty"` - - TextToSpeechTrainResp *XPSTextToSpeechTrainResponse `json:"textToSpeechTrainResp,omitempty"` - - // TextTrainResp: Will only be needed for uCAIP from Beta. - TextTrainResp *XPSTextTrainResponse `json:"textTrainResp,omitempty"` - - TranslationTrainResp *XPSTranslationTrainResponse `json:"translationTrainResp,omitempty"` - - VideoActionRecognitionTrainResp *XPSVideoActionRecognitionTrainResponse `json:"videoActionRecognitionTrainResp,omitempty"` - - VideoClassificationTrainResp *XPSVideoClassificationTrainResponse `json:"videoClassificationTrainResp,omitempty"` - - VideoObjectTrackingTrainResp *XPSVideoObjectTrackingTrainResponse `json:"videoObjectTrackingTrainResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "DeployedModelSizeBytes") 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. "DeployedModelSizeBytes") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTrainingObjectivePoint struct { - // CreateTime: The time at which this point was recorded. - CreateTime string `json:"createTime,omitempty"` - - // Value: The objective value when this point was recorded. - Value float64 `json:"value,omitempty"` - - // 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 *XPSTrainingObjectivePoint) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainingObjectivePoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrainingObjectivePoint) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrainingObjectivePoint - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// XPSTranslationEvaluationMetrics: Evaluation metrics for the dataset. -type XPSTranslationEvaluationMetrics struct { - // BaseBleuScore: BLEU score for base model. - BaseBleuScore float64 `json:"baseBleuScore,omitempty"` - - // BleuScore: BLEU score. - BleuScore float64 `json:"bleuScore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BaseBleuScore") 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. "BaseBleuScore") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTranslationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTranslationEvaluationMetrics - var s1 struct { - BaseBleuScore gensupport.JSONFloat64 `json:"baseBleuScore"` - BleuScore gensupport.JSONFloat64 `json:"bleuScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BaseBleuScore = float64(s1.BaseBleuScore) - s.BleuScore = float64(s1.BleuScore) - return nil -} - -// XPSTranslationPreprocessResponse: Translation preprocess response. -type XPSTranslationPreprocessResponse struct { - // ParsedExampleCount: Total example count parsed. - ParsedExampleCount int64 `json:"parsedExampleCount,omitempty,string"` - - // ValidExampleCount: Total valid example count. - ValidExampleCount int64 `json:"validExampleCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ParsedExampleCount") - // 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. "ParsedExampleCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTranslationTrainResponse: Train response for translation. -type XPSTranslationTrainResponse struct { - // ModelType: Type of the model. - // - // Possible values: - // "MODEL_TYPE_UNSPECIFIED" - Default - // "LEGACY" - Legacy model. Will be deprecated. - // "CURRENT" - Current model. - ModelType string `json:"modelType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelType") 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. "ModelType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTuningTrial: Metrics for a tuning job generated, will get -// forwarded to Stackdriver as model tuning logs. Setting this as a -// standalone message out of CreateModelMetadata to avoid confusion as -// we expose this message only to users. -type XPSTuningTrial struct { - // ModelStructure: Model parameters for the trial. - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // TrainingObjectivePoint: The optimization objective evaluation of the - // eval split data. - TrainingObjectivePoint *XPSTrainingObjectivePoint `json:"trainingObjectivePoint,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") 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. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTuningTrial) MarshalJSON() ([]byte, error) { - type NoMethod XPSTuningTrial - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoActionMetricsEntry: The Evaluation metrics entry given a -// specific precision_window_length. -type XPSVideoActionMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSVideoActionMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` - - // PrecisionWindowLength: This VideoActionMetricsEntry is calculated - // based on this prediction window length. If the predicted action's - // timestamp is inside the time window whose center is the ground truth - // action's timestamp with this specific length, the prediction result - // is treated as a true positive. - PrecisionWindowLength string `json:"precisionWindowLength,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntry - var s1 struct { - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSVideoActionMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSVideoActionMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Output only. Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Output only. Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSVideoActionRecognitionEvaluationMetrics: Model evaluation metrics -// for video action recognition. -type XPSVideoActionRecognitionEvaluationMetrics struct { - // EvaluatedActionCount: Output only. The number of ground truth actions - // used to create this evaluation. - EvaluatedActionCount int64 `json:"evaluatedActionCount,omitempty"` - - // VideoActionMetricsEntries: Output only. The metric entries for - // precision window lengths: 1s,2s,3s,4s, 5s. - VideoActionMetricsEntries []*XPSVideoActionMetricsEntry `json:"videoActionMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EvaluatedActionCount") 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. "EvaluatedActionCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoActionRecognitionTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // 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. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoBatchPredictOperationMetadata struct { - // OutputExamples: All the partial batch prediction results that are - // completed at the moment. Output examples are sorted by completion - // time. The order will not be changed. Each output example should be - // the path of a single RecordIO file of AnnotatedExamples. - OutputExamples []string `json:"outputExamples,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExamples") 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. "OutputExamples") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoBatchPredictOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoBatchPredictOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoClassificationTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // 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. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSVideoExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") 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. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoModelArtifactSpec struct { - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExportArtifact") 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. "ExportArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoObjectTrackingEvaluationMetrics: Model evaluation metrics for -// ObjectTracking problems. Next tag: 10. -type XPSVideoObjectTrackingEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: Output only. The single metric for - // bounding boxes evaluation: the mean_average_precision averaged over - // all bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: Output only. The bounding boxes match - // metrics for each Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingboxCount: The number of bounding boxes used for - // model evaluation. - EvaluatedBoundingboxCount int64 `json:"evaluatedBoundingboxCount,omitempty"` - - // EvaluatedFrameCount: The number of video frames used for model - // evaluation. - EvaluatedFrameCount int64 `json:"evaluatedFrameCount,omitempty"` - - // EvaluatedTrackCount: The number of tracks used for model evaluation. - EvaluatedTrackCount int64 `json:"evaluatedTrackCount,omitempty"` - - // TrackMeanAveragePrecision: Output only. The single metric for tracks - // accuracy evaluation: the mean_average_precision averaged over all - // track_metrics_entries. - TrackMeanAveragePrecision float64 `json:"trackMeanAveragePrecision,omitempty"` - - // TrackMeanBoundingBoxIou: Output only. The single metric for tracks - // bounding box iou evaluation: the mean_bounding_box_iou averaged over - // all track_metrics_entries. - TrackMeanBoundingBoxIou float64 `json:"trackMeanBoundingBoxIou,omitempty"` - - // TrackMeanMismatchRate: Output only. The single metric for tracking - // consistency evaluation: the mean_mismatch_rate averaged over all - // track_metrics_entries. - TrackMeanMismatchRate float64 `json:"trackMeanMismatchRate,omitempty"` - - // TrackMetricsEntries: Output only. The tracks match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - TrackMetricsEntries []*XPSTrackMetricsEntry `json:"trackMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") 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. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - TrackMeanAveragePrecision gensupport.JSONFloat64 `json:"trackMeanAveragePrecision"` - TrackMeanBoundingBoxIou gensupport.JSONFloat64 `json:"trackMeanBoundingBoxIou"` - TrackMeanMismatchRate gensupport.JSONFloat64 `json:"trackMeanMismatchRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - s.TrackMeanAveragePrecision = float64(s1.TrackMeanAveragePrecision) - s.TrackMeanBoundingBoxIou = float64(s1.TrackMeanBoundingBoxIou) - s.TrackMeanMismatchRate = float64(s1.TrackMeanMismatchRate) - return nil -} - -type XPSVideoObjectTrackingTrainResponse struct { - // ExportModelSpec: Populated for AutoML request only. - ExportModelSpec *XPSVideoExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ExportModelSpec") 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. "ExportModelSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoTrainingOperationMetadata struct { - // TrainCostMilliNodeHour: This is an estimation of the node hours - // necessary for training a model, expressed in milli node hours (i.e. - // 1,000 value in this field means 1 node hour). A node hour represents - // the time a virtual machine spends running your training job. The cost - // of one node running for one hour is a node hour. - TrainCostMilliNodeHour int64 `json:"trainCostMilliNodeHour,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "TrainCostMilliNodeHour") 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. "TrainCostMilliNodeHour") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisionErrorAnalysisConfig: The vision model error analysis -// configuration. Next tag: 3 -type XPSVisionErrorAnalysisConfig struct { - // ExampleCount: The number of query examples in error analysis. - ExampleCount int64 `json:"exampleCount,omitempty"` - - // QueryType: The query type used in retrieval. The enum values are - // frozen in the foreseeable future. - // - // Possible values: - // "QUERY_TYPE_UNSPECIFIED" - Unspecified query type for model error - // analysis. - // "QUERY_TYPE_ALL_SIMILAR" - Query similar samples across all classes - // in the dataset. - // "QUERY_TYPE_SAME_CLASS_SIMILAR" - Query similar samples from the - // same class of the input sample. - // "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - Query dissimilar samples from - // the same class of the input sample. - QueryType string `json:"queryType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") 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. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionErrorAnalysisConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionErrorAnalysisConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVisionTrainingOperationMetadata struct { - // ExplanationUsage: Aggregated infra usage within certain time period, - // for billing report purpose if XAI is enable in training request. - ExplanationUsage *InfraUsage `json:"explanationUsage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationUsage") 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. "ExplanationUsage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisualization: Visualization configurations for image explanation. -type XPSVisualization struct { - // ClipPercentLowerbound: Excludes attributions below the specified - // percentile, from the highlighted areas. Defaults to 62. - ClipPercentLowerbound float64 `json:"clipPercentLowerbound,omitempty"` - - // ClipPercentUpperbound: Excludes attributions above the specified - // percentile from the highlighted areas. Using the - // clip_percent_upperbound and clip_percent_lowerbound together can be - // useful for filtering out noise and making it easier to see areas of - // strong attribution. Defaults to 99.9. - ClipPercentUpperbound float64 `json:"clipPercentUpperbound,omitempty"` - - // ColorMap: The color scheme used for the highlighted areas. Defaults - // to PINK_GREEN for Integrated Gradients attribution, which shows - // positive attributions in green and negative in pink. Defaults to - // VIRIDIS for XRAI attribution, which highlights the most influential - // regions in yellow and the least influential in blue. - // - // Possible values: - // "COLOR_MAP_UNSPECIFIED" - Should not be used. - // "PINK_GREEN" - Positive: green. Negative: pink. - // "VIRIDIS" - Viridis color map: A perceptually uniform color mapping - // which is easier to see by those with colorblindness and progresses - // from yellow to green to blue. Positive: yellow. Negative: blue. - // "RED" - Positive: red. Negative: red. - // "GREEN" - Positive: green. Negative: green. - // "RED_GREEN" - Positive: green. Negative: red. - // "PINK_WHITE_GREEN" - PiYG palette. - ColorMap string `json:"colorMap,omitempty"` - - // OverlayType: How the original image is displayed in the - // visualization. Adjusting the overlay can help increase visual clarity - // if the original image makes it difficult to view the visualization. - // Defaults to NONE. - // - // Possible values: - // "OVERLAY_TYPE_UNSPECIFIED" - Default value. This is the same as - // NONE. - // "NONE" - No overlay. - // "ORIGINAL" - The attributions are shown on top of the original - // image. - // "GRAYSCALE" - The attributions are shown on top of grayscaled - // version of the original image. - // "MASK_BLACK" - The attributions are used as a mask to reveal - // predictive parts of the image and hide the un-predictive parts. - OverlayType string `json:"overlayType,omitempty"` - - // Polarity: Whether to only highlight pixels with positive - // contributions, negative or both. Defaults to POSITIVE. - // - // Possible values: - // "POLARITY_UNSPECIFIED" - Default value. This is the same as - // POSITIVE. - // "POSITIVE" - Highlights the pixels/outlines that were most - // influential to the model's prediction. - // "NEGATIVE" - Setting polarity to negative highlights areas that - // does not lead to the models's current prediction. - // "BOTH" - Shows both positive and negative attributions. - Polarity string `json:"polarity,omitempty"` - - // Type: Type of the image visualization. Only applicable to Integrated - // Gradients attribution. OUTLINES shows regions of attribution, while - // PIXELS shows per-pixel attribution. Defaults to OUTLINES. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Should not be used. - // "PIXELS" - Shows which pixel contributed to the image prediction. - // "OUTLINES" - Shows which region contributed to the image prediction - // by outlining the region. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClipPercentLowerbound") 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. "ClipPercentLowerbound") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisualization) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisualization - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVisualization) UnmarshalJSON(data []byte) error { - type NoMethod XPSVisualization - var s1 struct { - ClipPercentLowerbound gensupport.JSONFloat64 `json:"clipPercentLowerbound"` - ClipPercentUpperbound gensupport.JSONFloat64 `json:"clipPercentUpperbound"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ClipPercentLowerbound = float64(s1.ClipPercentLowerbound) - s.ClipPercentUpperbound = float64(s1.ClipPercentUpperbound) - return nil -} - -type XPSXpsOperationMetadata struct { - // ExampleCount: Optional. XPS server can opt to provide example count - // of the long running operation (e.g. training, data importing, batch - // prediction). - ExampleCount int64 `json:"exampleCount,omitempty,string"` - - // ReportingMetrics: Metrics for the operation. By the time the - // operation is terminated (whether succeeded or failed) as returned - // from XPS, AutoML BE assumes the metrics are finalized. AutoML BE - // transparently posts the metrics to Chemist if it's not empty, - // regardless of the response content or error type. If user is supposed - // to be charged in case of cancellation/error, this field should be - // set. In the case where the type of LRO doesn't require any billing, - // this field should be left unset. - ReportingMetrics *XPSReportingMetrics `json:"reportingMetrics,omitempty"` - - TablesTrainingOperationMetadata *XPSTablesTrainingOperationMetadata `json:"tablesTrainingOperationMetadata,omitempty"` - - VideoBatchPredictOperationMetadata *XPSVideoBatchPredictOperationMetadata `json:"videoBatchPredictOperationMetadata,omitempty"` - - VideoTrainingOperationMetadata *XPSVideoTrainingOperationMetadata `json:"videoTrainingOperationMetadata,omitempty"` - - VisionTrainingOperationMetadata *XPSVisionTrainingOperationMetadata `json:"visionTrainingOperationMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") 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. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXpsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSXpsOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSXraiAttribution: An explanation method that redistributes -// Integrated Gradients attributions to segmented regions, taking -// advantage of the model's fully differentiable structure. Refer to -// this paper for more details: https://arxiv.org/abs/1906.02825 Only -// supports image Models (modality is IMAGE). -type XPSXraiAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is met within the desired error range. Valid range of - // its value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") 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. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXraiAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSXraiAttribution +func (s *V2Model) MarshalJSON() ([]byte, error) { + type NoMethod V2Model raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } diff --git a/language/v2/language-api.json b/language/v2/language-api.json index 23d4aa6d419..88b57e50812 100644 --- a/language/v2/language-api.json +++ b/language/v2/language-api.json @@ -208,7 +208,7 @@ } } }, - "revision": "20240211", + "revision": "20240217", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -338,35 +338,12 @@ "type": "string" }, "features": { - "$ref": "AnnotateTextRequestFeatures", + "$ref": "Features", "description": "Required. The enabled features." } }, "type": "object" }, - "AnnotateTextRequestFeatures": { - "description": "All available features. Setting each one to true will enable that specific analysis for the input.", - "id": "AnnotateTextRequestFeatures", - "properties": { - "classifyText": { - "description": "Optional. Classify the full document into categories.", - "type": "boolean" - }, - "extractDocumentSentiment": { - "description": "Optional. Extract document-level sentiment.", - "type": "boolean" - }, - "extractEntities": { - "description": "Optional. Extract entities.", - "type": "boolean" - }, - "moderateText": { - "description": "Optional. Moderate the document for harmful and sensitive categories.", - "type": "boolean" - } - }, - "type": "object" - }, "AnnotateTextResponse": { "description": "The text annotations response message.", "id": "AnnotateTextResponse", @@ -463,450 +440,6 @@ }, "type": "object" }, - "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", - "id": "Color", - "properties": { - "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", - "format": "float", - "type": "number" - }, - "blue": { - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "green": { - "description": "The amount of green in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "red": { - "description": "The amount of red in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "CpuMetric": { - "description": "Metric for billing reports.", - "id": "CpuMetric", - "properties": { - "coreNumber": { - "description": "Required. Number of CPU cores.", - "format": "int64", - "type": "string" - }, - "coreSec": { - "description": "Required. Total seconds of core usage, e.g. 4.", - "format": "int64", - "type": "string" - }, - "cpuType": { - "description": "Required. Type of cpu, e.g. N2.", - "enum": [ - "UNKNOWN_CPU_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "GPU-based machine, skip quota reporting.", - "GPU-based machine, skip quota reporting.", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "GPU-based machine, skip quota reporting.", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, - "DiskMetric": { - "id": "DiskMetric", - "properties": { - "diskType": { - "description": "Required. Type of Disk, e.g. REGIONAL_SSD.", - "enum": [ - "UNKNOWN_DISK_TYPE", - "REGIONAL_SSD", - "REGIONAL_STORAGE", - "PD_SSD", - "PD_STANDARD", - "STORAGE_SNAPSHOT" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "gibSec": { - "description": "Required. Seconds of physical disk usage, e.g. 3600.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "Document": { "description": "Represents the input to API methods.", "id": "Document", @@ -1037,414 +570,25 @@ }, "type": "object" }, - "GpuMetric": { - "id": "GpuMetric", - "properties": { - "gpuSec": { - "description": "Required. Seconds of GPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "gpuType": { - "description": "Required. Type of GPU, e.g. NVIDIA_TESLA_V100.", - "enum": [ - "UNKNOWN_GPU_TYPE", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_TESLA_K80", - "NVIDIA_L4", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_V100", - "NVIDIA_H100_80GB" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, - "InfraUsage": { - "description": "Infra Usage of billing metrics. Next ID: 6", - "id": "InfraUsage", + "Features": { + "description": "All available features. Setting each one to true will enable that specific analysis for the input.", + "id": "Features", "properties": { - "cpuMetrics": { - "description": "Aggregated core metrics since requested start_time.", - "items": { - "$ref": "CpuMetric" - }, - "type": "array" - }, - "diskMetrics": { - "description": "Aggregated persistent disk metrics since requested start_time.", - "items": { - "$ref": "DiskMetric" - }, - "type": "array" + "classifyText": { + "description": "Optional. Classify the full document into categories.", + "type": "boolean" }, - "gpuMetrics": { - "description": "Aggregated gpu metrics since requested start_time.", - "items": { - "$ref": "GpuMetric" - }, - "type": "array" + "extractDocumentSentiment": { + "description": "Optional. Extract document-level sentiment.", + "type": "boolean" }, - "ramMetrics": { - "description": "Aggregated ram metrics since requested start_time.", - "items": { - "$ref": "RamMetric" - }, - "type": "array" + "extractEntities": { + "description": "Optional. Extract entities.", + "type": "boolean" }, - "tpuMetrics": { - "description": "Aggregated tpu metrics since requested start_time.", - "items": { - "$ref": "TpuMetric" - }, - "type": "array" + "moderateText": { + "description": "Optional. Moderate the document for harmful and sensitive categories.", + "type": "boolean" } }, "type": "object" @@ -1482,391 +626,6 @@ }, "type": "object" }, - "RamMetric": { - "id": "RamMetric", - "properties": { - "gibSec": { - "description": "Required. VM memory in Gigabyte second, e.g. 3600. Using int64 type to match billing metrics definition.", - "format": "int64", - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "memories": { - "description": "Required. VM memory in gb.", - "format": "double", - "type": "number" - }, - "ramType": { - "description": "Required. Type of ram.", - "enum": [ - "UNKNOWN_RAM_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "", - "", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, "Sentence": { "description": "Represents a sentence in the input document.", "id": "Sentence", @@ -1941,3080 +700,6 @@ } }, "type": "object" - }, - "TpuMetric": { - "id": "TpuMetric", - "properties": { - "tpuSec": { - "description": "Required. Seconds of TPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "tpuType": { - "description": "Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD.", - "enum": [ - "UNKNOWN_TPU_TYPE", - "TPU_V2_POD", - "TPU_V2", - "TPU_V3_POD", - "TPU_V3", - "TPU_V5_LITEPOD" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSArrayStats": { - "description": "The data statistics of a series of ARRAY values.", - "id": "XPSArrayStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "memberStats": { - "$ref": "XPSDataStats", - "description": "Stats of all the values of all arrays, as if they were a single long series of data. The type depends on the element type of the array." - } - }, - "type": "object" - }, - "XPSBatchPredictResponse": { - "id": "XPSBatchPredictResponse", - "properties": { - "exampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples for batch prediction result. Under full API implementation, results are stored in shared RecordIO of AnnotatedExample protobufs, the annotations field of which is populated by XPS backend." - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntry": { - "description": "Bounding box matching model metrics for a single intersection-over-union threshold and multiple label match confidence thresholds.", - "id": "XPSBoundingBoxMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "The intersection-over-union threshold value used to compute this metrics entry.", - "format": "float", - "type": "number" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSCategoryStats": { - "description": "The data statistics of a series of CATEGORY values.", - "id": "XPSCategoryStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topCategoryStats": { - "description": "The statistics of the top 20 CATEGORY values, ordered by CategoryStats.SingleCategoryStats.count.", - "items": { - "$ref": "XPSCategoryStatsSingleCategoryStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCategoryStatsSingleCategoryStats": { - "description": "The statistics of a single CATEGORY value.", - "id": "XPSCategoryStatsSingleCategoryStats", - "properties": { - "count": { - "description": "The number of occurrences of this value in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The CATEGORY value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSClassificationEvaluationMetrics": { - "description": "Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9.", - "id": "XPSClassificationEvaluationMetrics", - "properties": { - "auPrc": { - "description": "The Area under precision recall curve metric.", - "format": "float", - "type": "number" - }, - "auRoc": { - "description": "The Area Under Receiver Operating Characteristic curve metric. Micro-averaged for the overall evaluation.", - "format": "float", - "type": "number" - }, - "baseAuPrc": { - "description": "The Area under precision recall curve metric based on priors.", - "format": "float", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the evaluation. Only set for MULTICLASS classification problems where number of annotation specs is no more than 10. Only set for model level evaluation, not for evaluation per label." - }, - "evaluatedExamplesCount": { - "description": "The number of examples used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "logLoss": { - "description": "The Log Loss metric.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSColorMap": { - "description": "Map from color to display name. Will only be used by Image Segmentation for uCAIP.", - "id": "XPSColorMap", - "properties": { - "annotationSpecIdToken": { - "description": "Should be used during training.", - "type": "string" - }, - "color": { - "$ref": "Color", - "deprecated": true, - "description": "This type is deprecated in favor of the IntColor below. This is because google.type.Color represent color has a float which semantically does not reflect discrete classes/categories concept. Moreover, to handle it well we need to have some tolerance when converting to a discretized color. As such, the recommendation is to have API surface still use google.type.Color while internally IntColor is used." - }, - "displayName": { - "description": "Should be used during preprocessing.", - "type": "string" - }, - "intColor": { - "$ref": "XPSColorMapIntColor" - } - }, - "type": "object" - }, - "XPSColorMapIntColor": { - "description": "RGB color and each channel is represented by an integer.", - "id": "XPSColorMapIntColor", - "properties": { - "blue": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "green": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "red": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSColumnSpec": { - "id": "XPSColumnSpec", - "properties": { - "columnId": { - "description": "The unique id of the column. When Preprocess, the Tables BE will popuate the order id of the column, which reflects the order of the column inside the table, i.e. 0 means the first column in the table, N-1 means the last column. AutoML BE will persist this order id in Spanner and set the order id here when calling RefreshTablesStats and Train. Note: it's different than the column_spec_id that is generated in AutoML BE.", - "format": "int32", - "type": "integer" - }, - "dataStats": { - "$ref": "XPSDataStats", - "description": "The data stats of the column. It's outputed in RefreshTablesStats and a required input for Train." - }, - "dataType": { - "$ref": "XPSDataType", - "description": "The data type of the column. It's outputed in Preprocess rpc and a required input for RefreshTablesStats and Train." - }, - "displayName": { - "description": "The display name of the column. It's outputed in Preprocess and a required input for RefreshTablesStats and Train.", - "type": "string" - }, - "forecastingMetadata": { - "$ref": "XPSColumnSpecForecastingMetadata" - }, - "topCorrelatedColumns": { - "description": "It's outputed in RefreshTablesStats, and a required input in Train.", - "items": { - "$ref": "XPSColumnSpecCorrelatedColumn" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSColumnSpecCorrelatedColumn": { - "description": "Identifies a table's column, and its correlation with the column this ColumnSpec describes.", - "id": "XPSColumnSpecCorrelatedColumn", - "properties": { - "columnId": { - "format": "int32", - "type": "integer" - }, - "correlationStats": { - "$ref": "XPSCorrelationStats" - } - }, - "type": "object" - }, - "XPSColumnSpecForecastingMetadata": { - "description": "=========================================================================== # The fields below are used exclusively for Forecasting.", - "id": "XPSColumnSpecForecastingMetadata", - "properties": { - "columnType": { - "description": "The type of the column for FORECASTING model training purposes.", - "enum": [ - "COLUMN_TYPE_UNSPECIFIED", - "KEY", - "KEY_METADATA", - "TIME_SERIES_AVAILABLE_PAST_ONLY", - "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - ], - "enumDescriptions": [ - "An un-set value of this enum.", - "Key columns are used to identify timeseries.", - "This column contains information describing static properties of the entities identified by the key column(s) (e.g. city's ZIP code).", - "This column contains information for the given entity, at any time poinrt, they are only available in the time series before.", - "This column contains information for the given entity is known both for the past and the sufficiently far future." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSCommonStats": { - "description": "Common statistics for a column with a specified data type.", - "id": "XPSCommonStats", - "properties": { - "distinctValueCount": { - "format": "int64", - "type": "string" - }, - "nullValueCount": { - "format": "int64", - "type": "string" - }, - "validValueCount": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfidenceMetricsEntry": { - "description": "ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next tag: 16.", - "id": "XPSConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Metrics are computed with an assumption that the model never return predictions with score lower than this value.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "f1ScoreAt1": { - "description": "The harmonic mean of recall_at1 and precision_at1.", - "format": "float", - "type": "number" - }, - "falseNegativeCount": { - "description": "The number of ground truth labels that are not matched by a model created label.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "The number of model created labels that do not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "False Positive Rate for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "falsePositiveRateAt1": { - "description": "The False Positive Rate when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "positionThreshold": { - "description": "Metrics are computed with an assumption that the model always returns at most this many predictions (ordered by their score, descendingly), but they all still need to meet the confidence_threshold.", - "format": "int32", - "type": "integer" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "precisionAt1": { - "description": "The precision when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall (true positive rate) for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recallAt1": { - "description": "The recall (true positive rate) when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "trueNegativeCount": { - "description": "The number of labels that were not created by the model, but if they would, they would not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "The number of model created labels that match a ground truth label.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfusionMatrix": { - "description": "Confusion matrix of the model running the classification.", - "id": "XPSConfusionMatrix", - "properties": { - "annotationSpecIdToken": { - "description": "For the following three repeated fields, only one is intended to be set. annotation_spec_id_token is preferable to be set. ID tokens of the annotation specs used in the confusion matrix.", - "items": { - "type": "string" - }, - "type": "array" - }, - "category": { - "description": "Category (mainly for segmentation). Set only for image segmentation models. Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "row": { - "description": "Rows in the confusion matrix. The number of rows is equal to the size of `annotation_spec_id_token`. `row[i].value[j]` is the number of examples that have ground truth of the `annotation_spec_id_token[i]` and are predicted as `annotation_spec_id_token[j]` by the model being evaluated.", - "items": { - "$ref": "XPSConfusionMatrixRow" - }, - "type": "array" - }, - "sentimentLabel": { - "description": "Sentiment labels used in the confusion matrix. Set only for text sentiment models. For AutoML Text Revamp, use `annotation_spec_id_token` instead and leave this field empty.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSConfusionMatrixRow": { - "description": "A row in the confusion matrix.", - "id": "XPSConfusionMatrixRow", - "properties": { - "count": { - "description": "Same as above except intended to represent other counts (for e.g. for segmentation this is pixel count). NOTE(params): Only example_count or count is set (oneoff does not support repeated fields unless they are embedded inside another message).", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "exampleCount": { - "description": "Value of the specific cell in the confusion matrix. The number of values each row has (i.e. the length of the row) is equal to the length of the annotation_spec_id_token field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCoreMlFormat": { - "description": "A model format used for iOS mobile devices.", - "id": "XPSCoreMlFormat", - "properties": {}, - "type": "object" - }, - "XPSCorrelationStats": { - "description": "A correlation statistics between two series of DataType values. The series may have differing DataType-s, but within a single series the DataType must be the same.", - "id": "XPSCorrelationStats", - "properties": { - "cramersV": { - "description": "The correlation value using the Cramer's V measure.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSDataErrors": { - "description": "Different types of errors and the stats associatesd with each error.", - "id": "XPSDataErrors", - "properties": { - "count": { - "description": "Number of records having errors associated with the enum.", - "format": "int32", - "type": "integer" - }, - "errorType": { - "description": "Type of the error.", - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "UNSUPPORTED_AUDIO_FORMAT", - "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT", - "FILE_TOO_LARGE", - "MISSING_TRANSCRIPTION" - ], - "enumDescriptions": [ - "Not specified.", - "Audio format not in the formats by cloud-speech AutoML. Currently only wav and flac file formats are supported.", - "File format differnt from what is specified in the file name extension.", - "File too large. Maximum allowed size is 50 MB.", - "Transcript is missing." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDataStats": { - "description": "The data statistics of a series of values that share the same DataType.", - "id": "XPSDataStats", - "properties": { - "arrayStats": { - "$ref": "XPSArrayStats", - "description": "The statistics for ARRAY DataType." - }, - "categoryStats": { - "$ref": "XPSCategoryStats", - "description": "The statistics for CATEGORY DataType." - }, - "distinctValueCount": { - "description": "The number of distinct values.", - "format": "int64", - "type": "string" - }, - "float64Stats": { - "$ref": "XPSFloat64Stats", - "description": "The statistics for FLOAT64 DataType." - }, - "nullValueCount": { - "description": "The number of values that are null.", - "format": "int64", - "type": "string" - }, - "stringStats": { - "$ref": "XPSStringStats", - "description": "The statistics for STRING DataType." - }, - "structStats": { - "$ref": "XPSStructStats", - "description": "The statistics for STRUCT DataType." - }, - "timestampStats": { - "$ref": "XPSTimestampStats", - "description": "The statistics for TIMESTAMP DataType." - }, - "validValueCount": { - "description": "The number of values that are valid.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSDataType": { - "description": "Indicated the type of data that can be stored in a structured data entity (e.g. a table).", - "id": "XPSDataType", - "properties": { - "compatibleDataTypes": { - "description": "The highly compatible data types to this data type.", - "items": { - "$ref": "XPSDataType" - }, - "type": "array" - }, - "listElementType": { - "$ref": "XPSDataType", - "description": "If type_code == ARRAY, then `list_element_type` is the type of the elements." - }, - "nullable": { - "description": "If true, this DataType can also be `null`.", - "type": "boolean" - }, - "structType": { - "$ref": "XPSStructType", - "description": "If type_code == STRUCT, then `struct_type` provides type information for the struct's fields." - }, - "timeFormat": { - "description": "If type_code == TIMESTAMP then `time_format` provides the format in which that time field is expressed. The time_format must be written in `strftime` syntax. If time_format is not set, then the default format as described on the field is used.", - "type": "string" - }, - "typeCode": { - "description": "Required. The TypeCode for this type.", - "enum": [ - "TYPE_CODE_UNSPECIFIED", - "FLOAT64", - "TIMESTAMP", - "STRING", - "ARRAY", - "STRUCT", - "CATEGORY" - ], - "enumDescriptions": [ - "Not specified. Should not be used.", - "Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or `\"-Infinity\"`.", - "Must be between 0AD and 9999AD. Encoded as `string` according to time_format, or, if that format is not set, then in RFC 3339 `date-time` format, where `time-offset` = `\"Z\"` (e.g. 1985-04-12T23:20:50.52Z).", - "Encoded as `string`.", - "Encoded as `list`, where the list elements are represented according to list_element_type.", - "Encoded as `struct`, where field values are represented according to struct_type.", - "Values of this type are not further understood by AutoML, e.g. AutoML is unable to tell the order of values (as it could with FLOAT64), or is unable to say if one value contains another (as it could with STRING). Encoded as `string` (bytes should be base64-encoded, as described in RFC 4648, section 4)." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDockerFormat": { - "description": "A model format used for Docker containers. Use the params field to customize the container. The container is verified to work correctly on ubuntu 16.04 operating system.", - "id": "XPSDockerFormat", - "properties": { - "cpuArchitecture": { - "description": "Optional. Additional cpu information describing the requirements for the to be exported model files.", - "enum": [ - "CPU_ARCHITECTURE_UNSPECIFIED", - "CPU_ARCHITECTURE_X86_64" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "gpuArchitecture": { - "description": "Optional. Additional gpu information describing the requirements for the to be exported model files.", - "enum": [ - "GPU_ARCHITECTURE_UNSPECIFIED", - "GPU_ARCHITECTURE_NVIDIA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSEdgeTpuTfLiteFormat": { - "description": "A model format used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "id": "XPSEdgeTpuTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSEvaluationMetrics": { - "description": "Contains xPS-specific model evaluation metrics either for a single annotation spec (label), or for the model overall. Next tag: 18.", - "id": "XPSEvaluationMetrics", - "properties": { - "annotationSpecIdToken": { - "description": "The annotation_spec for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The value comes from the input annotations in AnnotatedExample. For MVP product or for text sentiment models where annotation_spec_id_token is not available, set label instead.", - "type": "string" - }, - "category": { - "description": "The integer category label for which this evaluation metric instance had been created. Valid categories are 0 or higher. Overall model evaluation should set this to negative values (rather than implicit zero). Only used for Image Segmentation (prefer to set annotation_spec_id_token instead). Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "format": "int32", - "type": "integer" - }, - "evaluatedExampleCount": { - "description": "The number of examples used to create this evaluation metrics instance.", - "format": "int32", - "type": "integer" - }, - "imageClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "imageObjectDetectionEvalMetrics": { - "$ref": "XPSImageObjectDetectionEvaluationMetrics" - }, - "imageSegmentationEvalMetrics": { - "$ref": "XPSImageSegmentationEvaluationMetrics" - }, - "label": { - "description": "The label for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The label maps to AnnotationSpec.display_name in Public API protos. Only used by MVP implementation and text sentiment FULL implementation.", - "type": "string" - }, - "regressionEvalMetrics": { - "$ref": "XPSRegressionEvaluationMetrics" - }, - "tablesClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "tablesEvalMetrics": { - "$ref": "XPSTablesEvaluationMetrics" - }, - "textClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "textExtractionEvalMetrics": { - "$ref": "XPSTextExtractionEvaluationMetrics" - }, - "textSentimentEvalMetrics": { - "$ref": "XPSTextSentimentEvaluationMetrics" - }, - "translationEvalMetrics": { - "$ref": "XPSTranslationEvaluationMetrics" - }, - "videoActionRecognitionEvalMetrics": { - "$ref": "XPSVideoActionRecognitionEvaluationMetrics" - }, - "videoClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "videoObjectTrackingEvalMetrics": { - "$ref": "XPSVideoObjectTrackingEvaluationMetrics" - } - }, - "type": "object" - }, - "XPSEvaluationMetricsSet": { - "description": "Specifies location of model evaluation metrics.", - "id": "XPSEvaluationMetricsSet", - "properties": { - "evaluationMetrics": { - "description": "Inline EvaluationMetrics - should be relatively small. For passing large quantities of exhaustive metrics, use file_spec.", - "items": { - "$ref": "XPSEvaluationMetrics" - }, - "type": "array" - }, - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec containing evaluation metrics of a model, must point to RecordIO file(s) of intelligence.cloud.automl.xps.EvaluationMetrics messages." - }, - "numEvaluationMetrics": { - "description": "Number of the evaluation metrics (usually one per label plus overall).", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExampleSet": { - "description": "Set of examples or input sources.", - "id": "XPSExampleSet", - "properties": { - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec of the examples or input sources." - }, - "fingerprint": { - "description": "Fingerprint of the example set.", - "format": "int64", - "type": "string" - }, - "numExamples": { - "description": "Number of examples.", - "format": "int64", - "type": "string" - }, - "numInputSources": { - "description": "Number of input sources.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExportModelOutputConfig": { - "id": "XPSExportModelOutputConfig", - "properties": { - "coreMlFormat": { - "$ref": "XPSCoreMlFormat" - }, - "dockerFormat": { - "$ref": "XPSDockerFormat" - }, - "edgeTpuTfLiteFormat": { - "$ref": "XPSEdgeTpuTfLiteFormat" - }, - "exportFirebaseAuxiliaryInfo": { - "description": "For any model and format: If true, will additionally export FirebaseExportedModelInfo in a firebase.txt file.", - "type": "boolean" - }, - "outputGcrUri": { - "description": "The Google Contained Registry (GCR) path the exported files to be pushed to. This location is set if the exported format is DOCKDER.", - "type": "string" - }, - "outputGcsUri": { - "description": "The Google Cloud Storage (GCS) directory where XPS will output the exported models and related files. Format: gs://bucket/directory", - "type": "string" - }, - "tfJsFormat": { - "$ref": "XPSTfJsFormat" - }, - "tfLiteFormat": { - "$ref": "XPSTfLiteFormat" - }, - "tfSavedModelFormat": { - "$ref": "XPSTfSavedModelFormat" - } - }, - "type": "object" - }, - "XPSFileSpec": { - "description": "Spec of input and output files, on external file systems (CNS, GCS, etc).", - "id": "XPSFileSpec", - "properties": { - "directoryPath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - }, - "fileFormat": { - "enum": [ - "FILE_FORMAT_UNKNOWN", - "FILE_FORMAT_SSTABLE", - "FILE_FORMAT_TRANSLATION_RKV", - "FILE_FORMAT_RECORDIO", - "FILE_FORMAT_RAW_CSV", - "FILE_FORMAT_RAW_CAPACITOR" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "Internal format for parallel text data used by Google Translate. go/rkvtools", - "", - "Only the lexicographically first file described by the file_spec contains the header line.", - "" - ], - "type": "string" - }, - "fileSpec": { - "description": "Single file path, or file pattern of format \"/path/to/file@shard_count\". E.g. /cns/cell-d/somewhere/file@2 is expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and /cns/cell-d/somewhere/file-00001-of-00002.", - "type": "string" - }, - "singleFilePath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - } - }, - "type": "object" - }, - "XPSFloat64Stats": { - "description": "The data statistics of a series of FLOAT64 values.", - "id": "XPSFloat64Stats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "histogramBuckets": { - "description": "Histogram buckets of the data series. Sorted by the min value of the bucket, ascendingly, and the number of the buckets is dynamically generated. The buckets are non-overlapping and completely cover whole FLOAT64 range with min of first bucket being `\"-Infinity\"`, and max of the last one being `\"Infinity\"`.", - "items": { - "$ref": "XPSFloat64StatsHistogramBucket" - }, - "type": "array" - }, - "mean": { - "description": "The mean of the series.", - "format": "double", - "type": "number" - }, - "quantiles": { - "description": "Ordered from 0 to k k-quantile values of the data series of n values. The value at index i is, approximately, the i*n/k-th smallest value in the series; for i = 0 and i = k these are, respectively, the min and max values.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - }, - "standardDeviation": { - "description": "The standard deviation of the series.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSFloat64StatsHistogramBucket": { - "description": "A bucket of a histogram.", - "id": "XPSFloat64StatsHistogramBucket", - "properties": { - "count": { - "description": "The number of data values that are in the bucket, i.e. are between min and max values.", - "format": "int64", - "type": "string" - }, - "max": { - "description": "The maximum value of the bucket, exclusive unless max = `\"Infinity\"`, in which case it's inclusive.", - "format": "double", - "type": "number" - }, - "min": { - "description": "The minimum value of the bucket, inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageClassificationTrainResponse": { - "id": "XPSImageClassificationTrainResponse", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Populated for AutoMl requests." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostInNodeTime": { - "description": "The actual cost to create this model. - For edge type model, the cost is expressed in node hour. - For cloud type model,the cost is expressed in compute hour. - Populated for models created before GA. To be deprecated after GA.", - "format": "google-duration", - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual training cost, expressed in node seconds. Populated for models trained in node time.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSImageExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageModelArtifactSpec": { - "description": "Stores the locations and related metadata of the model artifacts. Populated for uCAIP requests only.", - "id": "XPSImageModelArtifactSpec", - "properties": { - "checkpointArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The Tensorflow checkpoint files. e.g. Used for resumable training." - }, - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "labelGcsUri": { - "description": "GCS uri of decoded labels file for model export 'dict.txt'.", - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud AI Platform API." - }, - "tfJsBinaryGcsPrefix": { - "description": "GCS uri prefix of Tensorflow JavaScript binary files 'groupX-shardXofX.bin' Deprecated.", - "type": "string" - }, - "tfLiteMetadataGcsUri": { - "description": "GCS uri of Tensorflow Lite metadata 'tflite_metadata.json'.", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpec": { - "description": "Serving specification for image models.", - "id": "XPSImageModelServingSpec", - "properties": { - "modelThroughputEstimation": { - "description": "Populate under uCAIP request scope.", - "items": { - "$ref": "XPSImageModelServingSpecModelThroughputEstimation" - }, - "type": "array" - }, - "nodeQps": { - "description": "An estimated value of how much traffic a node can serve. Populated for AutoMl request only.", - "format": "double", - "type": "number" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpecModelThroughputEstimation": { - "id": "XPSImageModelServingSpecModelThroughputEstimation", - "properties": { - "computeEngineAcceleratorType": { - "enum": [ - "UNSPECIFIED", - "NVIDIA_TESLA_K80", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_V100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_L4", - "NVIDIA_H100_80GB", - "TPU_V2", - "TPU_V3", - "TPU_V4_POD", - "TPU_V5_LITEPOD" - ], - "enumDescriptions": [ - "", - "Nvidia Tesla K80 GPU.", - "Nvidia Tesla P100 GPU.", - "Nvidia Tesla V100 GPU.", - "Nvidia Tesla P4 GPU.", - "Nvidia Tesla T4 GPU.", - "Nvidia Tesla A100 GPU.", - "Nvidia A100 80GB GPU.", - "Nvidia L4 GPU.", - "Nvidia H100 80Gb GPU.", - "TPU v2 (JellyFish).", - "TPU v3 (DragonFish).", - "TPU_v4 (PufferFish).", - "TPU v5 Lite Pods." - ], - "type": "string" - }, - "latencyInMilliseconds": { - "description": "Estimated latency.", - "format": "double", - "type": "number" - }, - "nodeQps": { - "description": "The approximate qps a deployed node can serve.", - "format": "double", - "type": "number" - }, - "servomaticPartitionType": { - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionEvaluationMetrics": { - "description": "Model evaluation metrics for image object detection problems. Evaluates prediction quality of labeled bounding boxes.", - "id": "XPSImageObjectDetectionEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingBoxCount": { - "description": "The total number of bounding boxes (i.e. summed over all images) the ground truth used to create this evaluation had.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionModelSpec": { - "id": "XPSImageObjectDetectionModelSpec", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec" - }, - "maxBoundingBoxCount": { - "description": "Max number of bounding box.", - "format": "int64", - "type": "string" - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetrics": { - "description": "Model evaluation metrics for image segmentation problems. Next tag: 4.", - "id": "XPSImageSegmentationEvaluationMetrics", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the per confidence_threshold evaluation. Pixel counts are set here. Only set for model level evaluation, not for evaluation per label." - }, - "diceScoreCoefficient": { - "description": "DSC or the F1 score: The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "iouScore": { - "description": "IOU score.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageSegmentationTrainResponse": { - "id": "XPSImageSegmentationTrainResponse", - "properties": { - "colorMaps": { - "description": "Color map of the model.", - "items": { - "$ref": "XPSColorMap" - }, - "type": "array" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "NOTE: These fields are not used/needed in EAP but will be set later." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope. Model artifact spec stores and model gcs pathes and related metadata" - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSIntegratedGradientsAttribution": { - "deprecated": true, - "description": "An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365", - "id": "XPSIntegratedGradientsAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSMetricEntry": { - "id": "XPSMetricEntry", - "properties": { - "argentumMetricId": { - "description": "For billing metrics that are using legacy sku's, set the legacy billing metric id here. This will be sent to Chemist as the \"cloudbilling.googleapis.com/argentum_metric_id\" label. Otherwise leave empty.", - "type": "string" - }, - "doubleValue": { - "description": "A double value.", - "format": "double", - "type": "number" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "format": "int64", - "type": "string" - }, - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" - }, - "systemLabels": { - "description": "Billing system labels for this (metric, value) pair.", - "items": { - "$ref": "XPSMetricEntryLabel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSMetricEntryLabel": { - "id": "XPSMetricEntryLabel", - "properties": { - "labelName": { - "description": "The name of the label.", - "type": "string" - }, - "labelValue": { - "description": "The value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "XPSModelArtifactItem": { - "description": "A single model artifact item.", - "id": "XPSModelArtifactItem", - "properties": { - "artifactFormat": { - "description": "The model artifact format.", - "enum": [ - "ARTIFACT_FORMAT_UNSPECIFIED", - "TF_CHECKPOINT", - "TF_SAVED_MODEL", - "TF_LITE", - "EDGE_TPU_TF_LITE", - "TF_JS", - "CORE_ML" - ], - "enumDescriptions": [ - "Should not be used.", - "The Tensorflow checkpoints. See https://www.tensorflow.org/guide/checkpoint.", - "The Tensorflow SavedModel binary.", - "Model artifact in generic TensorFlow Lite (.tflite) format. See https://www.tensorflow.org/lite.", - "Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "Used for iOS mobile devices in (.mlmodel) format. See https://developer.apple.com/documentation/coreml" - ], - "type": "string" - }, - "gcsUri": { - "description": "The Google Cloud Storage (GCS) uri that stores the model binary files.", - "type": "string" - } - }, - "type": "object" - }, - "XPSPreprocessResponse": { - "description": "Next ID: 8", - "id": "XPSPreprocessResponse", - "properties": { - "outputExampleSet": { - "$ref": "XPSExampleSet", - "description": "Preprocessed examples, that are to be imported into AutoML storage. This should point to RecordIO file(s) of PreprocessedExample messages. The PreprocessedExample.mvp_training_data-s returned here are later verbatim passed to Train() call in TrainExample.mvp_training_data." - }, - "speechPreprocessResp": { - "$ref": "XPSSpeechPreprocessResponse" - }, - "tablesPreprocessResponse": { - "$ref": "XPSTablesPreprocessResponse" - }, - "translationPreprocessResp": { - "$ref": "XPSTranslationPreprocessResponse" - } - }, - "type": "object" - }, - "XPSRegressionEvaluationMetrics": { - "description": "Model evaluation metrics for regression problems. It can be used for Tables.", - "id": "XPSRegressionEvaluationMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean Absolute Error (MAE).", - "format": "float", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error. Only set if all ground truth values are positive.", - "format": "float", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "float", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root Mean Squared Error (RMSE).", - "format": "float", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSRegressionMetricsEntry": { - "description": "A pair of actual \u0026 observed values for the model being evaluated.", - "id": "XPSRegressionMetricsEntry", - "properties": { - "predictedValue": { - "description": "The observed value for a row in the dataset.", - "format": "float", - "type": "number" - }, - "trueValue": { - "description": "The actual target value for a row in the dataset.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSReportingMetrics": { - "id": "XPSReportingMetrics", - "properties": { - "effectiveTrainingDuration": { - "deprecated": true, - "description": "The effective time training used. If set, this is used for quota management and billing. Deprecated. AutoML BE doesn't use this. Don't set.", - "format": "google-duration", - "type": "string" - }, - "metricEntries": { - "description": "One entry per metric name. The values must be aggregated per metric name.", - "items": { - "$ref": "XPSMetricEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadata": { - "deprecated": true, - "id": "XPSResponseExplanationMetadata", - "properties": { - "inputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataInputMetadata" - }, - "description": "Metadata of the input.", - "type": "object" - }, - "outputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataOutputMetadata" - }, - "description": "Metadata of the output.", - "type": "object" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataInputMetadata": { - "description": "Metadata of the input of a feature.", - "id": "XPSResponseExplanationMetadataInputMetadata", - "properties": { - "inputTensorName": { - "description": "Name of the input tensor for this model. Only needed in train response.", - "type": "string" - }, - "modality": { - "description": "Modality of the feature. Valid values are: numeric, image. Defaults to numeric.", - "enum": [ - "MODALITY_UNSPECIFIED", - "NUMERIC", - "IMAGE", - "CATEGORICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "visualizationConfig": { - "$ref": "XPSVisualization", - "description": "Visualization configurations for image explanation." - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataOutputMetadata": { - "description": "Metadata of the prediction output to be explained.", - "id": "XPSResponseExplanationMetadataOutputMetadata", - "properties": { - "outputTensorName": { - "description": "Name of the output tensor. Only needed in train response.", - "type": "string" - } - }, - "type": "object" - }, - "XPSResponseExplanationParameters": { - "deprecated": true, - "id": "XPSResponseExplanationParameters", - "properties": { - "integratedGradientsAttribution": { - "$ref": "XPSIntegratedGradientsAttribution", - "description": "An attribution method that computes Aumann-Shapley values taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365" - }, - "xraiAttribution": { - "$ref": "XPSXraiAttribution", - "description": "An attribution method that redistributes Integrated Gradients attribution to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 XRAI currently performs better on natural images, like a picture of a house or an animal. If the images are taken in artificial environments, like a lab or manufacturing line, or from diagnostic equipment, like x-rays or quality-control cameras, use Integrated Gradients instead." - } - }, - "type": "object" - }, - "XPSResponseExplanationSpec": { - "deprecated": true, - "description": "Specification of Model explanation. Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 for context.", - "id": "XPSResponseExplanationSpec", - "properties": { - "explanationType": { - "description": "Explanation type. For AutoML Image Classification models, possible values are: * `image-integrated-gradients` * `image-xrai`", - "type": "string" - }, - "metadata": { - "$ref": "XPSResponseExplanationMetadata", - "description": "Metadata describing the Model's input and output for explanation." - }, - "parameters": { - "$ref": "XPSResponseExplanationParameters", - "description": "Parameters that configure explaining of the Model's predictions." - } - }, - "type": "object" - }, - "XPSRow": { - "id": "XPSRow", - "properties": { - "columnIds": { - "description": "The ids of the columns. Note: The below `values` field must match order of this field, if this field is set.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "values": { - "description": "The values of the row cells, given in the same order as the column_ids. If column_ids is not set, then in the same order as the input_feature_column_ids in TablesModelMetadata.", - "items": { - "type": "any" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetrics": { - "id": "XPSSpeechEvaluationMetrics", - "properties": { - "subModelEvaluationMetrics": { - "description": "Evaluation metrics for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetricsSubModelEvaluationMetric": { - "id": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - }, - "numDeletions": { - "format": "int32", - "type": "integer" - }, - "numInsertions": { - "format": "int32", - "type": "integer" - }, - "numSubstitutions": { - "format": "int32", - "type": "integer" - }, - "numUtterances": { - "description": "Number of utterances used in the wer computation.", - "format": "int32", - "type": "integer" - }, - "numWords": { - "description": "Number of words over which the word error rate was computed.", - "format": "int32", - "type": "integer" - }, - "sentenceAccuracy": { - "description": "Below fields are used for debugging purposes", - "format": "double", - "type": "number" - }, - "wer": { - "description": "Word error rate (standard error metric used for speech recognition).", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSSpeechModelSpec": { - "id": "XPSSpeechModelSpec", - "properties": { - "datasetId": { - "description": "Required for speech xps backend. Speech xps has to use dataset_id and model_id as the primary key in db so that speech API can query the db directly.", - "format": "int64", - "type": "string" - }, - "language": { - "type": "string" - }, - "subModelSpecs": { - "description": "Model specs for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechModelSpecSubModelSpec" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechModelSpecSubModelSpec": { - "id": "XPSSpeechModelSpecSubModelSpec", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "clientId": { - "description": "In S3, Recognition ClientContextId.client_id", - "type": "string" - }, - "contextId": { - "description": "In S3, Recognition ClientContextId.context_id", - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - } - }, - "type": "object" - }, - "XPSSpeechPreprocessResponse": { - "id": "XPSSpeechPreprocessResponse", - "properties": { - "cnsTestDataPath": { - "description": "Location od shards of sstables (test data) of DataUtterance protos.", - "type": "string" - }, - "cnsTrainDataPath": { - "description": "Location of shards of sstables (training data) of DataUtterance protos.", - "type": "string" - }, - "prebuiltModelEvaluationMetrics": { - "$ref": "XPSSpeechEvaluationMetrics", - "description": "The metrics for prebuilt speech models. They are included here because there is no prebuilt speech models stored in the AutoML." - }, - "speechPreprocessStats": { - "$ref": "XPSSpeechPreprocessStats", - "description": "Stats associated with the data." - } - }, - "type": "object" - }, - "XPSSpeechPreprocessStats": { - "id": "XPSSpeechPreprocessStats", - "properties": { - "dataErrors": { - "description": "Different types of data errors and the counts associated with them.", - "items": { - "$ref": "XPSDataErrors" - }, - "type": "array" - }, - "numHumanLabeledExamples": { - "description": "The number of rows marked HUMAN_LABELLED", - "format": "int32", - "type": "integer" - }, - "numLogsExamples": { - "description": "The number of samples found in the previously recorded logs data.", - "format": "int32", - "type": "integer" - }, - "numMachineTranscribedExamples": { - "description": "The number of rows marked as MACHINE_TRANSCRIBED", - "format": "int32", - "type": "integer" - }, - "testExamplesCount": { - "description": "The number of examples labelled as TEST by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "testSentencesCount": { - "description": "The number of sentences in the test data set.", - "format": "int32", - "type": "integer" - }, - "testWordsCount": { - "description": "The number of words in the test data set.", - "format": "int32", - "type": "integer" - }, - "trainExamplesCount": { - "description": "The number of examples labeled as TRAIN by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "trainSentencesCount": { - "description": "The number of sentences in the training data set.", - "format": "int32", - "type": "integer" - }, - "trainWordsCount": { - "description": "The number of words in the training data set.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSStringStats": { - "description": "The data statistics of a series of STRING values.", - "id": "XPSStringStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topUnigramStats": { - "description": "The statistics of the top 20 unigrams, ordered by StringStats.UnigramStats.count.", - "items": { - "$ref": "XPSStringStatsUnigramStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSStringStatsUnigramStats": { - "description": "The statistics of a unigram.", - "id": "XPSStringStatsUnigramStats", - "properties": { - "count": { - "description": "The number of occurrences of this unigram in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The unigram.", - "type": "string" - } - }, - "type": "object" - }, - "XPSStructStats": { - "description": "The data statistics of a series of STRUCT values.", - "id": "XPSStructStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "fieldStats": { - "additionalProperties": { - "$ref": "XPSDataStats" - }, - "description": "Map from a field name of the struct to data stats aggregated over series of all data in that field across all the structs.", - "type": "object" - } - }, - "type": "object" - }, - "XPSStructType": { - "description": "`StructType` defines the DataType-s of a STRUCT type.", - "id": "XPSStructType", - "properties": { - "fields": { - "additionalProperties": { - "$ref": "XPSDataType" - }, - "description": "Unordered map of struct field names to their data types.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTableSpec": { - "id": "XPSTableSpec", - "properties": { - "columnSpecs": { - "additionalProperties": { - "$ref": "XPSColumnSpec" - }, - "description": "Mapping from column id to column spec.", - "type": "object" - }, - "importedDataSizeInBytes": { - "description": "The total size of imported data of the table.", - "format": "int64", - "type": "string" - }, - "rowCount": { - "description": "The number of rows in the table.", - "format": "int64", - "type": "string" - }, - "timeColumnId": { - "description": "The id of the time column.", - "format": "int32", - "type": "integer" - }, - "validRowCount": { - "description": "The number of valid rows.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetrics": { - "description": "Metrics for Tables classification problems.", - "id": "XPSTablesClassificationMetrics", - "properties": { - "curveMetrics": { - "description": "Metrics building a curve.", - "items": { - "$ref": "XPSTablesClassificationMetricsCurveMetrics" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetricsCurveMetrics": { - "description": "Metrics curve data point for a single value.", - "id": "XPSTablesClassificationMetricsCurveMetrics", - "properties": { - "aucPr": { - "description": "The area under the precision-recall curve.", - "format": "double", - "type": "number" - }, - "aucRoc": { - "description": "The area under receiver operating characteristic curve.", - "format": "double", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve and ROC curve can be derived from them.", - "items": { - "$ref": "XPSTablesConfidenceMetricsEntry" - }, - "type": "array" - }, - "logLoss": { - "description": "The Log loss metric.", - "format": "double", - "type": "number" - }, - "positionThreshold": { - "description": "The position threshold value used to compute the metrics.", - "format": "int32", - "type": "integer" - }, - "value": { - "description": "The CATEGORY row value (for ARRAY unnested) the curve metrics are for.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSTablesConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "double", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision. (2 * precision * recall) / (precision + recall)", - "format": "double", - "type": "number" - }, - "falseNegativeCount": { - "description": "False negative count.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "False positive count.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "FPR = #false positives / (#false positives + #true negatives)", - "format": "double", - "type": "number" - }, - "precision": { - "description": "Precision = #true positives / (#true positives + #false positives).", - "format": "double", - "type": "number" - }, - "recall": { - "description": "Recall = #true positives / (#true positives + #false negatives).", - "format": "double", - "type": "number" - }, - "trueNegativeCount": { - "description": "True negative count.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "True positive count.", - "format": "int64", - "type": "string" - }, - "truePositiveRate": { - "description": "TPR = #true positives / (#true positives + #false negatvies)", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesDatasetMetadata": { - "description": "Metadata for a dataset used for AutoML Tables. Next ID: 6", - "id": "XPSTablesDatasetMetadata", - "properties": { - "mlUseColumnId": { - "description": "Id the column to split the table.", - "format": "int32", - "type": "integer" - }, - "primaryTableSpec": { - "$ref": "XPSTableSpec", - "description": "Primary table." - }, - "targetColumnCorrelations": { - "additionalProperties": { - "$ref": "XPSCorrelationStats" - }, - "description": "(the column id : its CorrelationStats with target column).", - "type": "object" - }, - "targetColumnId": { - "description": "Id of the primary table column that should be used as the training label.", - "format": "int32", - "type": "integer" - }, - "weightColumnId": { - "description": "Id of the primary table column that should be used as the weight column.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSTablesEvaluationMetrics": { - "id": "XPSTablesEvaluationMetrics", - "properties": { - "classificationMetrics": { - "$ref": "XPSTablesClassificationMetrics", - "description": "Classification metrics." - }, - "regressionMetrics": { - "$ref": "XPSTablesRegressionMetrics", - "description": "Regression metrics." - } - }, - "type": "object" - }, - "XPSTablesModelColumnInfo": { - "description": "An information specific to given column and Tables Model, in context of the Model and the predictions created by it.", - "id": "XPSTablesModelColumnInfo", - "properties": { - "columnId": { - "description": "The ID of the column.", - "format": "int32", - "type": "integer" - }, - "featureImportance": { - "description": "When given as part of a Model: Measurement of how much model predictions correctness on the TEST data depend on values in this column. A value between 0 and 1, higher means higher influence. These values are normalized - for all input feature columns of a given model they add to 1. When given back by Predict or Batch Predict: Measurement of how impactful for the prediction returned for the given row the value in this column was. Specifically, the feature importance specifies the marginal contribution that the feature made to the prediction score compared to the baseline score. These values are computed using the Sampled Shapley method.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesModelStructure": { - "description": "A description of Tables model structure.", - "id": "XPSTablesModelStructure", - "properties": { - "modelParameters": { - "description": "A list of models.", - "items": { - "$ref": "XPSTablesModelStructureModelParameters" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParameters": { - "description": "Model hyper-parameters for a model.", - "id": "XPSTablesModelStructureModelParameters", - "properties": { - "hyperparameters": { - "items": { - "$ref": "XPSTablesModelStructureModelParametersParameter" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParametersParameter": { - "id": "XPSTablesModelStructureModelParametersParameter", - "properties": { - "floatValue": { - "description": "Float type parameter value.", - "format": "double", - "type": "number" - }, - "intValue": { - "description": "Integer type parameter value.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Parameter name.", - "type": "string" - }, - "stringValue": { - "description": "String type parameter value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesPreprocessResponse": { - "id": "XPSTablesPreprocessResponse", - "properties": { - "tablesDatasetMetadata": { - "$ref": "XPSTablesDatasetMetadata", - "description": "The table/column id, column_name and the DataTypes of the columns will be populated." - } - }, - "type": "object" - }, - "XPSTablesRegressionMetrics": { - "description": "Metrics for Tables regression problems.", - "id": "XPSTablesRegressionMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean absolute error.", - "format": "double", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error, only set if all of the target column's values are positive.", - "format": "double", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "double", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root mean squared error.", - "format": "double", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesTrainResponse": { - "id": "XPSTablesTrainResponse", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure" - }, - "predictionSampleRows": { - "description": "Sample rows from the dataset this model was trained.", - "items": { - "$ref": "XPSRow" - }, - "type": "array" - }, - "tablesModelColumnInfo": { - "description": "Output only. Auxiliary information for each of the input_feature_column_specs, with respect to this particular model.", - "items": { - "$ref": "XPSTablesModelColumnInfo" - }, - "type": "array" - }, - "trainCostMilliNodeHours": { - "description": "The actual training cost of the model, expressed in milli node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed to not exceed the train budget.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesTrainingOperationMetadata": { - "id": "XPSTablesTrainingOperationMetadata", - "properties": { - "createModelStage": { - "description": "Current stage of creating model.", - "enum": [ - "CREATE_MODEL_STAGE_UNSPECIFIED", - "DATA_PREPROCESSING", - "TRAINING", - "EVALUATING", - "MODEL_POST_PROCESSING" - ], - "enumDescriptions": [ - "Unspecified stage.", - "Prepare the model training pipeline and run data processing.", - "Training model.", - "Run evaluation.", - "Finalizing model training pipeline." - ], - "type": "string" - }, - "optimizationObjective": { - "description": "The optimization objective for model.", - "type": "string" - }, - "topTrials": { - "description": "This field is for training. When the operation is terminated successfully, AutoML Backend post this field to operation metadata in spanner. If the metadata has no trials returned, the training operation is supposed to be a failure.", - "items": { - "$ref": "XPSTuningTrial" - }, - "type": "array" - }, - "trainBudgetMilliNodeHours": { - "description": "Creating model budget.", - "format": "int64", - "type": "string" - }, - "trainingObjectivePoints": { - "description": "This field records the training objective value with respect to time, giving insight into how the model architecture search is performing as training time elapses.", - "items": { - "$ref": "XPSTrainingObjectivePoint" - }, - "type": "array" - }, - "trainingStartTime": { - "description": "Timestamp when training process starts.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextComponentModel": { - "description": "Component model. Next ID: 10", - "id": "XPSTextComponentModel", - "properties": { - "batchPredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold batch prediction model.", - "type": "string" - }, - "onlinePredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold online prediction model.", - "type": "string" - }, - "partition": { - "description": "The partition where the model is deployed. Populated by uCAIP BE as part of online PredictRequest.", - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud Ai Platform API." - }, - "servoModelName": { - "description": "The name of servo model. Populated by uCAIP BE as part of online PredictRequest.", - "type": "string" - }, - "submodelName": { - "description": "The name of the trained NL submodel.", - "type": "string" - }, - "submodelType": { - "description": "The type of trained NL submodel", - "enum": [ - "TEXT_MODEL_TYPE_UNSPECIFIED", - "TEXT_MODEL_TYPE_DEFAULT", - "TEXT_MODEL_TYPE_META_ARCHITECT", - "TEXT_MODEL_TYPE_ATC", - "TEXT_MODEL_TYPE_CLARA2", - "TEXT_MODEL_TYPE_CHATBASE", - "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING", - "TEXT_MODEL_TYPE_TEXT_EXTRACTION", - "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION", - "TEXT_MODEL_TYPE_COMPOSITE", - "TEXT_MODEL_TYPE_ALL_MODELS", - "TEXT_MODEL_TYPE_BERT", - "TEXT_MODEL_TYPE_ENC_PALM" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "Model type for entity extraction.", - "Model type for relationship extraction.", - "A composite model represents a set of component models that have to be used together for prediction. A composite model appears to be a single model to the model user. It may contain only one component model. Please refer to go/cnl-composite-models for more information.", - "Model type used to train default, MA, and ATC models in a single batch worker pipeline.", - "BERT pipeline needs a specific model type, since it uses a different TFX configuration compared with DEFAULT (despite sharing most of the code).", - "Model type for EncPaLM." - ], - "type": "string" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - }, - "versionNumber": { - "description": "The servomatic model version number. Populated by uCAIP BE as part of online PredictRequest.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextExtractionEvaluationMetrics": { - "id": "XPSTextExtractionEvaluationMetrics", - "properties": { - "bestF1ConfidenceMetrics": { - "$ref": "XPSConfidenceMetricsEntry", - "deprecated": true, - "description": "Values are at the highest F1 score on the precision-recall curve. Only confidence_threshold, recall, precision, and f1_score will be set." - }, - "confidenceMetricsEntries": { - "description": "If the enclosing EvaluationMetrics.label is empty, confidence_metrics_entries is an evaluation of the entire model across all labels. If the enclosing EvaluationMetrics.label is set, confidence_metrics_entries applies to that label.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the model, at the default confidence threshold (0.0). Only set for whole-model evaluation, not for evaluation per label." - }, - "perLabelConfidenceMetrics": { - "additionalProperties": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "deprecated": true, - "description": "Only recall, precision, and f1_score will be set.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTextSentimentEvaluationMetrics": { - "description": "Model evaluation metrics for text sentiment problems.", - "id": "XPSTextSentimentEvaluationMetrics", - "properties": { - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Output only. Confusion matrix of the evaluation. Only set for the overall model evaluation, not for evaluation of a single annotation spec." - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "linearKappa": { - "description": "Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanAbsoluteError": { - "description": "Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanSquaredError": { - "description": "Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision.", - "format": "float", - "type": "number" - }, - "quadraticKappa": { - "description": "Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTextToSpeechTrainResponse": { - "description": "TextToSpeech train response", - "id": "XPSTextToSpeechTrainResponse", - "properties": {}, - "type": "object" - }, - "XPSTextTrainResponse": { - "id": "XPSTextTrainResponse", - "properties": { - "componentModel": { - "description": "Component submodels.", - "items": { - "$ref": "XPSTextComponentModel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTfJsFormat": { - "description": "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "id": "XPSTfJsFormat", - "properties": {}, - "type": "object" - }, - "XPSTfLiteFormat": { - "description": "LINT.IfChange A model format used for mobile and IoT devices. See https://www.tensorflow.org/lite.", - "id": "XPSTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSTfSavedModelFormat": { - "description": "A tensorflow model format in SavedModel format.", - "id": "XPSTfSavedModelFormat", - "properties": {}, - "type": "object" - }, - "XPSTimestampStats": { - "description": "The data statistics of a series of TIMESTAMP values.", - "id": "XPSTimestampStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "granularStats": { - "additionalProperties": { - "$ref": "XPSTimestampStatsGranularStats" - }, - "description": "The string key is the pre-defined granularity. Currently supported: hour_of_day, day_of_week, month_of_year. Granularities finer that the granularity of timestamp data are not populated (e.g. if timestamps are at day granularity, then hour_of_day is not populated).", - "type": "object" - }, - "medianTimestampNanos": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTimestampStatsGranularStats": { - "description": "Stats split by a defined in context granularity.", - "id": "XPSTimestampStatsGranularStats", - "properties": { - "buckets": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "A map from granularity key to example count for that key. E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).", - "type": "object" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntry": { - "description": "Track matching model metrics for a single track match threshold and multiple label match confidence thresholds. Next tag: 6.", - "id": "XPSTrackMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Output only. Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is derived from them.", - "items": { - "$ref": "XPSTrackMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "Output only. The intersection-over-union threshold value between bounding boxes across frames used to compute this metric entry.", - "format": "float", - "type": "number" - }, - "meanBoundingBoxIou": { - "description": "Output only. The mean bounding box iou over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanMismatchRate": { - "description": "Output only. The mean mismatch rate over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanTrackingAveragePrecision": { - "description": "Output only. The mean average precision over all confidence thresholds.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold. Next tag: 6.", - "id": "XPSTrackMetricsEntryConfidenceMetricsEntry", - "properties": { - "boundingBoxIou": { - "description": "Output only. Bounding box intersection-over-union precision. Measures how well the bounding boxes overlap between each other (e.g. complete overlap or just barely above iou_threshold).", - "format": "float", - "type": "number" - }, - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "mismatchRate": { - "description": "Output only. Mismatch rate, which measures the tracking consistency, i.e. correctness of instance ID continuity.", - "format": "float", - "type": "number" - }, - "trackingPrecision": { - "description": "Output only. Tracking precision.", - "format": "float", - "type": "number" - }, - "trackingRecall": { - "description": "Output only. Tracking recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrainResponse": { - "description": "Next ID: 18", - "id": "XPSTrainResponse", - "properties": { - "deployedModelSizeBytes": { - "description": "Estimated model size in bytes once deployed.", - "format": "int64", - "type": "string" - }, - "errorAnalysisConfigs": { - "description": "Optional vision model error analysis configuration. The field is set when model error analysis is enabled in the training request. The results of error analysis will be binded together with evaluation results (in the format of AnnotatedExample).", - "items": { - "$ref": "XPSVisionErrorAnalysisConfig" - }, - "type": "array" - }, - "evaluatedExampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples used to evaluate the model (usually the test set), with the predicted annotations. The file_spec should point to recordio file(s) of AnnotatedExample. For each returned example, the example_id_token and annotations predicted by the model must be set. The example payload can and is recommended to be omitted." - }, - "evaluationMetricsSet": { - "$ref": "XPSEvaluationMetricsSet", - "description": "The trained model evaluation metrics. This can be optionally returned." - }, - "explanationConfigs": { - "deprecated": true, - "description": "VisionExplanationConfig for XAI on test set. Optional for when XAI is enable in training request.", - "items": { - "$ref": "XPSResponseExplanationSpec" - }, - "type": "array" - }, - "imageClassificationTrainResp": { - "$ref": "XPSImageClassificationTrainResponse" - }, - "imageObjectDetectionTrainResp": { - "$ref": "XPSImageObjectDetectionModelSpec" - }, - "imageSegmentationTrainResp": { - "$ref": "XPSImageSegmentationTrainResponse" - }, - "modelToken": { - "description": "Token that represents the trained model. This is considered immutable and is persisted in AutoML. xPS can put their own proto in the byte string, to e.g. point to the model checkpoints. The token is passed to other xPS APIs to refer to the model.", - "format": "byte", - "type": "string" - }, - "speechTrainResp": { - "$ref": "XPSSpeechModelSpec" - }, - "tablesTrainResp": { - "$ref": "XPSTablesTrainResponse" - }, - "textToSpeechTrainResp": { - "$ref": "XPSTextToSpeechTrainResponse" - }, - "textTrainResp": { - "$ref": "XPSTextTrainResponse", - "description": "Will only be needed for uCAIP from Beta." - }, - "translationTrainResp": { - "$ref": "XPSTranslationTrainResponse" - }, - "videoActionRecognitionTrainResp": { - "$ref": "XPSVideoActionRecognitionTrainResponse" - }, - "videoClassificationTrainResp": { - "$ref": "XPSVideoClassificationTrainResponse" - }, - "videoObjectTrackingTrainResp": { - "$ref": "XPSVideoObjectTrackingTrainResponse" - } - }, - "type": "object" - }, - "XPSTrainingObjectivePoint": { - "id": "XPSTrainingObjectivePoint", - "properties": { - "createTime": { - "description": "The time at which this point was recorded.", - "format": "google-datetime", - "type": "string" - }, - "value": { - "description": "The objective value when this point was recorded.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationEvaluationMetrics": { - "description": "Evaluation metrics for the dataset.", - "id": "XPSTranslationEvaluationMetrics", - "properties": { - "baseBleuScore": { - "description": "BLEU score for base model.", - "format": "double", - "type": "number" - }, - "bleuScore": { - "description": "BLEU score.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationPreprocessResponse": { - "description": "Translation preprocess response.", - "id": "XPSTranslationPreprocessResponse", - "properties": { - "parsedExampleCount": { - "description": "Total example count parsed.", - "format": "int64", - "type": "string" - }, - "validExampleCount": { - "description": "Total valid example count.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTranslationTrainResponse": { - "description": "Train response for translation.", - "id": "XPSTranslationTrainResponse", - "properties": { - "modelType": { - "description": "Type of the model.", - "enum": [ - "MODEL_TYPE_UNSPECIFIED", - "LEGACY", - "CURRENT" - ], - "enumDescriptions": [ - "Default", - "Legacy model. Will be deprecated.", - "Current model." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSTuningTrial": { - "description": "Metrics for a tuning job generated, will get forwarded to Stackdriver as model tuning logs. Setting this as a standalone message out of CreateModelMetadata to avoid confusion as we expose this message only to users.", - "id": "XPSTuningTrial", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure", - "description": "Model parameters for the trial." - }, - "trainingObjectivePoint": { - "$ref": "XPSTrainingObjectivePoint", - "description": "The optimization objective evaluation of the eval split data." - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntry": { - "description": "The Evaluation metrics entry given a specific precision_window_length.", - "id": "XPSVideoActionMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSVideoActionMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - }, - "precisionWindowLength": { - "description": "This VideoActionMetricsEntry is calculated based on this prediction window length. If the predicted action's timestamp is inside the time window whose center is the ground truth action's timestamp with this specific length, the prediction result is treated as a true positive.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSVideoActionMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionEvaluationMetrics": { - "description": "Model evaluation metrics for video action recognition.", - "id": "XPSVideoActionRecognitionEvaluationMetrics", - "properties": { - "evaluatedActionCount": { - "description": "Output only. The number of ground truth actions used to create this evaluation.", - "format": "int32", - "type": "integer" - }, - "videoActionMetricsEntries": { - "description": "Output only. The metric entries for precision window lengths: 1s,2s,3s,4s, 5s.", - "items": { - "$ref": "XPSVideoActionMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionTrainResponse": { - "id": "XPSVideoActionRecognitionTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoBatchPredictOperationMetadata": { - "id": "XPSVideoBatchPredictOperationMetadata", - "properties": { - "outputExamples": { - "description": "All the partial batch prediction results that are completed at the moment. Output examples are sorted by completion time. The order will not be changed. Each output example should be the path of a single RecordIO file of AnnotatedExamples.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoClassificationTrainResponse": { - "id": "XPSVideoClassificationTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSVideoExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoModelArtifactSpec": { - "id": "XPSVideoModelArtifactSpec", - "properties": { - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. batch predict) via public Cloud AI Platform API." - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingEvaluationMetrics": { - "description": "Model evaluation metrics for ObjectTracking problems. Next tag: 10.", - "id": "XPSVideoObjectTrackingEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "Output only. The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "Output only. The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingboxCount": { - "description": "The number of bounding boxes used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedFrameCount": { - "description": "The number of video frames used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedTrackCount": { - "description": "The number of tracks used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "trackMeanAveragePrecision": { - "description": "Output only. The single metric for tracks accuracy evaluation: the mean_average_precision averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanBoundingBoxIou": { - "description": "Output only. The single metric for tracks bounding box iou evaluation: the mean_bounding_box_iou averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanMismatchRate": { - "description": "Output only. The single metric for tracking consistency evaluation: the mean_mismatch_rate averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMetricsEntries": { - "description": "Output only. The tracks match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSTrackMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingTrainResponse": { - "id": "XPSVideoObjectTrackingTrainResponse", - "properties": { - "exportModelSpec": { - "$ref": "XPSVideoExportModelSpec", - "description": "Populated for AutoML request only." - }, - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoTrainingOperationMetadata": { - "id": "XPSVideoTrainingOperationMetadata", - "properties": { - "trainCostMilliNodeHour": { - "description": "This is an estimation of the node hours necessary for training a model, expressed in milli node hours (i.e. 1,000 value in this field means 1 node hour). A node hour represents the time a virtual machine spends running your training job. The cost of one node running for one hour is a node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionErrorAnalysisConfig": { - "description": "The vision model error analysis configuration. Next tag: 3", - "id": "XPSVisionErrorAnalysisConfig", - "properties": { - "exampleCount": { - "description": "The number of query examples in error analysis.", - "format": "int32", - "type": "integer" - }, - "queryType": { - "description": "The query type used in retrieval. The enum values are frozen in the foreseeable future.", - "enum": [ - "QUERY_TYPE_UNSPECIFIED", - "QUERY_TYPE_ALL_SIMILAR", - "QUERY_TYPE_SAME_CLASS_SIMILAR", - "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - ], - "enumDescriptions": [ - "Unspecified query type for model error analysis.", - "Query similar samples across all classes in the dataset.", - "Query similar samples from the same class of the input sample.", - "Query dissimilar samples from the same class of the input sample." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionTrainingOperationMetadata": { - "deprecated": true, - "id": "XPSVisionTrainingOperationMetadata", - "properties": { - "explanationUsage": { - "$ref": "InfraUsage", - "description": "Aggregated infra usage within certain time period, for billing report purpose if XAI is enable in training request." - } - }, - "type": "object" - }, - "XPSVisualization": { - "deprecated": true, - "description": "Visualization configurations for image explanation.", - "id": "XPSVisualization", - "properties": { - "clipPercentLowerbound": { - "description": "Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62.", - "format": "float", - "type": "number" - }, - "clipPercentUpperbound": { - "description": "Excludes attributions above the specified percentile from the highlighted areas. Using the clip_percent_upperbound and clip_percent_lowerbound together can be useful for filtering out noise and making it easier to see areas of strong attribution. Defaults to 99.9.", - "format": "float", - "type": "number" - }, - "colorMap": { - "description": "The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue.", - "enum": [ - "COLOR_MAP_UNSPECIFIED", - "PINK_GREEN", - "VIRIDIS", - "RED", - "GREEN", - "RED_GREEN", - "PINK_WHITE_GREEN" - ], - "enumDescriptions": [ - "Should not be used.", - "Positive: green. Negative: pink.", - "Viridis color map: A perceptually uniform color mapping which is easier to see by those with colorblindness and progresses from yellow to green to blue. Positive: yellow. Negative: blue.", - "Positive: red. Negative: red.", - "Positive: green. Negative: green.", - "Positive: green. Negative: red.", - "PiYG palette." - ], - "type": "string" - }, - "overlayType": { - "description": "How the original image is displayed in the visualization. Adjusting the overlay can help increase visual clarity if the original image makes it difficult to view the visualization. Defaults to NONE.", - "enum": [ - "OVERLAY_TYPE_UNSPECIFIED", - "NONE", - "ORIGINAL", - "GRAYSCALE", - "MASK_BLACK" - ], - "enumDescriptions": [ - "Default value. This is the same as NONE.", - "No overlay.", - "The attributions are shown on top of the original image.", - "The attributions are shown on top of grayscaled version of the original image.", - "The attributions are used as a mask to reveal predictive parts of the image and hide the un-predictive parts." - ], - "type": "string" - }, - "polarity": { - "description": "Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE.", - "enum": [ - "POLARITY_UNSPECIFIED", - "POSITIVE", - "NEGATIVE", - "BOTH" - ], - "enumDescriptions": [ - "Default value. This is the same as POSITIVE.", - "Highlights the pixels/outlines that were most influential to the model's prediction.", - "Setting polarity to negative highlights areas that does not lead to the models's current prediction.", - "Shows both positive and negative attributions." - ], - "type": "string" - }, - "type": { - "description": "Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES.", - "enum": [ - "TYPE_UNSPECIFIED", - "PIXELS", - "OUTLINES" - ], - "enumDescriptions": [ - "Should not be used.", - "Shows which pixel contributed to the image prediction.", - "Shows which region contributed to the image prediction by outlining the region." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSXpsOperationMetadata": { - "id": "XPSXpsOperationMetadata", - "properties": { - "exampleCount": { - "description": "Optional. XPS server can opt to provide example count of the long running operation (e.g. training, data importing, batch prediction).", - "format": "int64", - "type": "string" - }, - "reportingMetrics": { - "$ref": "XPSReportingMetrics", - "description": "Metrics for the operation. By the time the operation is terminated (whether succeeded or failed) as returned from XPS, AutoML BE assumes the metrics are finalized. AutoML BE transparently posts the metrics to Chemist if it's not empty, regardless of the response content or error type. If user is supposed to be charged in case of cancellation/error, this field should be set. In the case where the type of LRO doesn't require any billing, this field should be left unset." - }, - "tablesTrainingOperationMetadata": { - "$ref": "XPSTablesTrainingOperationMetadata" - }, - "videoBatchPredictOperationMetadata": { - "$ref": "XPSVideoBatchPredictOperationMetadata" - }, - "videoTrainingOperationMetadata": { - "$ref": "XPSVideoTrainingOperationMetadata" - }, - "visionTrainingOperationMetadata": { - "$ref": "XPSVisionTrainingOperationMetadata" - } - }, - "type": "object" - }, - "XPSXraiAttribution": { - "deprecated": true, - "description": "An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Only supports image Models (modality is IMAGE).", - "id": "XPSXraiAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/language/v2/language-gen.go b/language/v2/language-gen.go index e3e350b8855..54b88ccd8a8 100644 --- a/language/v2/language-gen.go +++ b/language/v2/language-gen.go @@ -378,7 +378,7 @@ type AnnotateTextRequest struct { EncodingType string `json:"encodingType,omitempty"` // Features: Required. The enabled features. - Features *AnnotateTextRequestFeatures `json:"features,omitempty"` + Features *Features `json:"features,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with @@ -403,45 +403,6 @@ func (s *AnnotateTextRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AnnotateTextRequestFeatures: All available features. Setting each one -// to true will enable that specific analysis for the input. -type AnnotateTextRequestFeatures struct { - // ClassifyText: Optional. Classify the full document into categories. - ClassifyText bool `json:"classifyText,omitempty"` - - // ExtractDocumentSentiment: Optional. Extract document-level sentiment. - ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - - // ExtractEntities: Optional. Extract entities. - ExtractEntities bool `json:"extractEntities,omitempty"` - - // ModerateText: Optional. Moderate the document for harmful and - // sensitive categories. - ModerateText bool `json:"moderateText,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClassifyText") 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. "ClassifyText") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AnnotateTextRequestFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AnnotateTextRequestFeatures - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // AnnotateTextResponse: The text annotations response message. type AnnotateTextResponse struct { // Categories: Categories identified in the input document. @@ -623,385 +584,6 @@ func (s *ClassifyTextResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Color: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to and from -// color representations in various languages over compactness. For -// example, the fields of this representation can be trivially provided -// to the constructor of `java.awt.Color` in Java; it can also be -// trivially provided to UIColor's `+colorWithRed:green:blue:alpha` -// method in iOS; and, with just a little work, it can be easily -// formatted into a CSS `rgba()` string in JavaScript. This reference -// page doesn't have information about the absolute color space that -// should be used to interpret the RGB value—for example, sRGB, Adobe -// RGB, DCI-P3, and BT.2020. By default, applications should assume the -// sRGB color space. When color equality needs to be decided, -// implementations, unless documented otherwise, treat two colors as -// equal if all their red, green, blue, and alpha values each differ by -// at most `1e-5`. Example (Java): import com.google.type.Color; // ... -// public static java.awt.Color fromProto(Color protocolor) { float -// alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : -// 1.0; return new java.awt.Color( protocolor.getRed(), -// protocolor.getGreen(), protocolor.getBlue(), alpha); } public static -// Color toProto(java.awt.Color color) { float red = (float) -// color.getRed(); float green = (float) color.getGreen(); float blue = -// (float) color.getBlue(); float denominator = 255.0; Color.Builder -// resultBuilder = Color .newBuilder() .setRed(red / denominator) -// .setGreen(green / denominator) .setBlue(blue / denominator); int -// alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( -// FloatValue .newBuilder() .setValue(((float) alpha) / denominator) -// .build()); } return resultBuilder.build(); } // ... Example (iOS / -// Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float -// red = [protocolor red]; float green = [protocolor green]; float blue -// = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; -// float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper -// value]; } return [UIColor colorWithRed:red green:green blue:blue -// alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, -// green, blue, alpha; if (![color getRed:&red green:&green blue:&blue -// alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; -// [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; -// if (alpha <= 0.9999) { [result -// setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; -// return result; } // ... Example (JavaScript): // ... var -// protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red -// || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = -// rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green -// = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); -// if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, -// blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams -// = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', -// alphaFrac, ')'].join(”); }; var rgbToCssColor = function(red, green, -// blue) { var rgbNumber = new Number((red << 16) | (green << 8) | -// blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - -// hexString.length; var resultBuilder = ['#']; for (var i = 0; i < -// missingZeros; i++) { resultBuilder.push('0'); } -// resultBuilder.push(hexString); return resultBuilder.join(”); }; // -// ... -type Color struct { - // Alpha: The fraction of this color that should be applied to the - // pixel. That is, the final pixel color is defined by the equation: - // `pixel color = alpha * (this color) + (1.0 - alpha) * (background - // color)` This means that a value of 1.0 corresponds to a solid color, - // whereas a value of 0.0 corresponds to a completely transparent color. - // This uses a wrapper message rather than a simple float scalar so that - // it is possible to distinguish between a default value and the value - // being unset. If omitted, this color object is rendered as a solid - // color (as if the alpha value had been explicitly given a value of - // 1.0). - Alpha float64 `json:"alpha,omitempty"` - - // Blue: The amount of blue in the color as a value in the interval [0, - // 1]. - Blue float64 `json:"blue,omitempty"` - - // Green: The amount of green in the color as a value in the interval - // [0, 1]. - Green float64 `json:"green,omitempty"` - - // Red: The amount of red in the color as a value in the interval [0, - // 1]. - Red float64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Color) MarshalJSON() ([]byte, error) { - type NoMethod Color - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Color) UnmarshalJSON(data []byte) error { - type NoMethod Color - var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Alpha = float64(s1.Alpha) - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) - return nil -} - -// CpuMetric: Metric for billing reports. -type CpuMetric struct { - // CoreNumber: Required. Number of CPU cores. - CoreNumber int64 `json:"coreNumber,omitempty,string"` - - // CoreSec: Required. Total seconds of core usage, e.g. 4. - CoreSec int64 `json:"coreSec,omitempty,string"` - - // CpuType: Required. Type of cpu, e.g. N2. - // - // Possible values: - // "UNKNOWN_CPU_TYPE" - // "A2" - GPU-based machine, skip quota reporting. - // "A3" - GPU-based machine, skip quota reporting. - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - GPU-based machine, skip quota reporting. - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - CpuType string `json:"cpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreNumber") 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. "CoreNumber") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod CpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskMetric struct { - // DiskType: Required. Type of Disk, e.g. REGIONAL_SSD. - // - // Possible values: - // "UNKNOWN_DISK_TYPE" - // "REGIONAL_SSD" - // "REGIONAL_STORAGE" - // "PD_SSD" - // "PD_STANDARD" - // "STORAGE_SNAPSHOT" - DiskType string `json:"diskType,omitempty"` - - // GibSec: Required. Seconds of physical disk usage, e.g. 3600. - GibSec int64 `json:"gibSec,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DiskType") 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. "DiskType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskMetric) MarshalJSON() ([]byte, error) { - type NoMethod DiskMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Document: Represents the input to API methods. type Document struct { // Content: The content of the input in string format. Cloud audit @@ -1197,236 +779,23 @@ func (s *EntityMention) UnmarshalJSON(data []byte) error { return nil } -type GpuMetric struct { - // GpuSec: Required. Seconds of GPU usage, e.g. 3600. - GpuSec int64 `json:"gpuSec,omitempty,string"` - - // GpuType: Required. Type of GPU, e.g. NVIDIA_TESLA_V100. - // - // Possible values: - // "UNKNOWN_GPU_TYPE" - // "NVIDIA_TESLA_A100" - // "NVIDIA_A100_80GB" - // "NVIDIA_TESLA_K80" - // "NVIDIA_L4" - // "NVIDIA_TESLA_P100" - // "NVIDIA_TESLA_P4" - // "NVIDIA_TESLA_T4" - // "NVIDIA_TESLA_V100" - // "NVIDIA_H100_80GB" - GpuType string `json:"gpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GpuSec") 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. "GpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod GpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InfraUsage: Infra Usage of billing metrics. Next ID: 6 -type InfraUsage struct { - // CpuMetrics: Aggregated core metrics since requested start_time. - CpuMetrics []*CpuMetric `json:"cpuMetrics,omitempty"` - - // DiskMetrics: Aggregated persistent disk metrics since requested - // start_time. - DiskMetrics []*DiskMetric `json:"diskMetrics,omitempty"` +// Features: All available features. Setting each one to true will +// enable that specific analysis for the input. +type Features struct { + // ClassifyText: Optional. Classify the full document into categories. + ClassifyText bool `json:"classifyText,omitempty"` - // GpuMetrics: Aggregated gpu metrics since requested start_time. - GpuMetrics []*GpuMetric `json:"gpuMetrics,omitempty"` + // ExtractDocumentSentiment: Optional. Extract document-level sentiment. + ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - // RamMetrics: Aggregated ram metrics since requested start_time. - RamMetrics []*RamMetric `json:"ramMetrics,omitempty"` + // ExtractEntities: Optional. Extract entities. + ExtractEntities bool `json:"extractEntities,omitempty"` - // TpuMetrics: Aggregated tpu metrics since requested start_time. - TpuMetrics []*TpuMetric `json:"tpuMetrics,omitempty"` + // ModerateText: Optional. Moderate the document for harmful and + // sensitive categories. + ModerateText bool `json:"moderateText,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpuMetrics") to + // ForceSendFields is a list of field names (e.g. "ClassifyText") 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 @@ -1434,17 +803,17 @@ type InfraUsage struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CpuMetrics") to include in - // API requests with the JSON null value. By default, fields with 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. "ClassifyText") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InfraUsage) MarshalJSON() ([]byte, error) { - type NoMethod InfraUsage +func (s *Features) MarshalJSON() ([]byte, error) { + type NoMethod Features raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1521,240 +890,6 @@ func (s *ModerateTextResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RamMetric struct { - // GibSec: Required. VM memory in Gigabyte second, e.g. 3600. Using - // int64 type to match billing metrics definition. - GibSec int64 `json:"gibSec,omitempty,string"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // Memories: Required. VM memory in gb. - Memories float64 `json:"memories,omitempty"` - - // RamType: Required. Type of ram. - // - // Possible values: - // "UNKNOWN_RAM_TYPE" - // "A2" - // "A3" - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - RamType string `json:"ramType,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GibSec") 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. "GibSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RamMetric) MarshalJSON() ([]byte, error) { - type NoMethod RamMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *RamMetric) UnmarshalJSON(data []byte) error { - type NoMethod RamMetric - var s1 struct { - Memories gensupport.JSONFloat64 `json:"memories"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Memories = float64(s1.Memories) - return nil -} - // Sentence: Represents a sentence in the input document. type Sentence struct { // Sentiment: For calls to AnalyzeSentiment or if @@ -1917,5155 +1052,6 @@ func (s *TextSpan) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TpuMetric struct { - // TpuSec: Required. Seconds of TPU usage, e.g. 3600. - TpuSec int64 `json:"tpuSec,omitempty,string"` - - // TpuType: Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD. - // - // Possible values: - // "UNKNOWN_TPU_TYPE" - // "TPU_V2_POD" - // "TPU_V2" - // "TPU_V3_POD" - // "TPU_V3" - // "TPU_V5_LITEPOD" - TpuType string `json:"tpuType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TpuSec") 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. "TpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod TpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSArrayStats: The data statistics of a series of ARRAY values. -type XPSArrayStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // MemberStats: Stats of all the values of all arrays, as if they were a - // single long series of data. The type depends on the element type of - // the array. - MemberStats *XPSDataStats `json:"memberStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSArrayStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSArrayStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSBatchPredictResponse struct { - // ExampleSet: Examples for batch prediction result. Under full API - // implementation, results are stored in shared RecordIO of - // AnnotatedExample protobufs, the annotations field of which is - // populated by XPS backend. - ExampleSet *XPSExampleSet `json:"exampleSet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleSet") 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. "ExampleSet") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSBatchPredictResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSBatchPredictResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSBoundingBoxMetricsEntry: Bounding box matching model metrics for a -// single intersection-over-union threshold and multiple label match -// confidence thresholds. -type XPSBoundingBoxMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSBoundingBoxMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: The intersection-over-union threshold value used to - // compute this metrics entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSBoundingBoxMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSBoundingBoxMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSBoundingBoxMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSCategoryStats: The data statistics of a series of CATEGORY values. -type XPSCategoryStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopCategoryStats: The statistics of the top 20 CATEGORY values, - // ordered by CategoryStats.SingleCategoryStats.count. - TopCategoryStats []*XPSCategoryStatsSingleCategoryStats `json:"topCategoryStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCategoryStatsSingleCategoryStats: The statistics of a single -// CATEGORY value. -type XPSCategoryStatsSingleCategoryStats struct { - // Count: The number of occurrences of this value in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The CATEGORY value. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStatsSingleCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStatsSingleCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSClassificationEvaluationMetrics: Model evaluation metrics for -// classification problems. It can be used for image and video -// classification. Next tag: 9. -type XPSClassificationEvaluationMetrics struct { - // AuPrc: The Area under precision recall curve metric. - AuPrc float64 `json:"auPrc,omitempty"` - - // AuRoc: The Area Under Receiver Operating Characteristic curve metric. - // Micro-averaged for the overall evaluation. - AuRoc float64 `json:"auRoc,omitempty"` - - // BaseAuPrc: The Area under precision recall curve metric based on - // priors. - BaseAuPrc float64 `json:"baseAuPrc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the evaluation. Only set for - // MULTICLASS classification problems where number of annotation specs - // is no more than 10. Only set for model level evaluation, not for - // evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // EvaluatedExamplesCount: The number of examples used for model - // evaluation. - EvaluatedExamplesCount int64 `json:"evaluatedExamplesCount,omitempty"` - - // LogLoss: The Log Loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuPrc") 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. "AuPrc") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSClassificationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSClassificationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSClassificationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSClassificationEvaluationMetrics - var s1 struct { - AuPrc gensupport.JSONFloat64 `json:"auPrc"` - AuRoc gensupport.JSONFloat64 `json:"auRoc"` - BaseAuPrc gensupport.JSONFloat64 `json:"baseAuPrc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AuPrc = float64(s1.AuPrc) - s.AuRoc = float64(s1.AuRoc) - s.BaseAuPrc = float64(s1.BaseAuPrc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSColorMap: Map from color to display name. Will only be used by -// Image Segmentation for uCAIP. -type XPSColorMap struct { - // AnnotationSpecIdToken: Should be used during training. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Color: This type is deprecated in favor of the IntColor below. This - // is because google.type.Color represent color has a float which - // semantically does not reflect discrete classes/categories concept. - // Moreover, to handle it well we need to have some tolerance when - // converting to a discretized color. As such, the recommendation is to - // have API surface still use google.type.Color while internally - // IntColor is used. - Color *Color `json:"color,omitempty"` - - // DisplayName: Should be used during preprocessing. - DisplayName string `json:"displayName,omitempty"` - - IntColor *XPSColorMapIntColor `json:"intColor,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMap) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMap - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColorMapIntColor: RGB color and each channel is represented by an -// integer. -type XPSColorMapIntColor struct { - // Blue: The value should be in range of [0, 255]. - Blue int64 `json:"blue,omitempty"` - - // Green: The value should be in range of [0, 255]. - Green int64 `json:"green,omitempty"` - - // Red: The value should be in range of [0, 255]. - Red int64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Blue") 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. "Blue") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMapIntColor) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMapIntColor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSColumnSpec struct { - // ColumnId: The unique id of the column. When Preprocess, the Tables BE - // will popuate the order id of the column, which reflects the order of - // the column inside the table, i.e. 0 means the first column in the - // table, N-1 means the last column. AutoML BE will persist this order - // id in Spanner and set the order id here when calling - // RefreshTablesStats and Train. Note: it's different than the - // column_spec_id that is generated in AutoML BE. - ColumnId int64 `json:"columnId,omitempty"` - - // DataStats: The data stats of the column. It's outputed in - // RefreshTablesStats and a required input for Train. - DataStats *XPSDataStats `json:"dataStats,omitempty"` - - // DataType: The data type of the column. It's outputed in Preprocess - // rpc and a required input for RefreshTablesStats and Train. - DataType *XPSDataType `json:"dataType,omitempty"` - - // DisplayName: The display name of the column. It's outputed in - // Preprocess and a required input for RefreshTablesStats and Train. - DisplayName string `json:"displayName,omitempty"` - - ForecastingMetadata *XPSColumnSpecForecastingMetadata `json:"forecastingMetadata,omitempty"` - - // TopCorrelatedColumns: It's outputed in RefreshTablesStats, and a - // required input in Train. - TopCorrelatedColumns []*XPSColumnSpecCorrelatedColumn `json:"topCorrelatedColumns,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecCorrelatedColumn: Identifies a table's column, and its -// correlation with the column this ColumnSpec describes. -type XPSColumnSpecCorrelatedColumn struct { - ColumnId int64 `json:"columnId,omitempty"` - - CorrelationStats *XPSCorrelationStats `json:"correlationStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecCorrelatedColumn) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecCorrelatedColumn - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecForecastingMetadata: -// ====================================================================== -// ===== # The fields below are used exclusively for Forecasting. -type XPSColumnSpecForecastingMetadata struct { - // ColumnType: The type of the column for FORECASTING model training - // purposes. - // - // Possible values: - // "COLUMN_TYPE_UNSPECIFIED" - An un-set value of this enum. - // "KEY" - Key columns are used to identify timeseries. - // "KEY_METADATA" - This column contains information describing static - // properties of the entities identified by the key column(s) (e.g. - // city's ZIP code). - // "TIME_SERIES_AVAILABLE_PAST_ONLY" - This column contains - // information for the given entity, at any time poinrt, they are only - // available in the time series before. - // "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - This column contains - // information for the given entity is known both for the past and the - // sufficiently far future. - ColumnType string `json:"columnType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnType") 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. "ColumnType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecForecastingMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecForecastingMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCommonStats: Common statistics for a column with a specified data -// type. -type XPSCommonStats struct { - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DistinctValueCount") - // 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. "DistinctValueCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSCommonStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCommonStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfidenceMetricsEntry: ConfidenceMetricsEntry includes generic -// precision, recall, f1 score etc. Next tag: 16. -type XPSConfidenceMetricsEntry struct { - // ConfidenceThreshold: Metrics are computed with an assumption that the - // model never return predictions with score lower than this value. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // F1ScoreAt1: The harmonic mean of recall_at1 and precision_at1. - F1ScoreAt1 float64 `json:"f1ScoreAt1,omitempty"` - - // FalseNegativeCount: The number of ground truth labels that are not - // matched by a model created label. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: The number of model created labels that do not - // match a ground truth label. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: False Positive Rate for the given confidence - // threshold. - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // FalsePositiveRateAt1: The False Positive Rate when only considering - // the label that has the highest prediction score and not below the - // confidence threshold for each example. - FalsePositiveRateAt1 float64 `json:"falsePositiveRateAt1,omitempty"` - - // PositionThreshold: Metrics are computed with an assumption that the - // model always returns at most this many predictions (ordered by their - // score, descendingly), but they all still need to meet the - // confidence_threshold. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // PrecisionAt1: The precision when only considering the label that has - // the highest prediction score and not below the confidence threshold - // for each example. - PrecisionAt1 float64 `json:"precisionAt1,omitempty"` - - // Recall: Recall (true positive rate) for the given confidence - // threshold. - Recall float64 `json:"recall,omitempty"` - - // RecallAt1: The recall (true positive rate) when only considering the - // label that has the highest prediction score and not below the - // confidence threshold for each example. - RecallAt1 float64 `json:"recallAt1,omitempty"` - - // TrueNegativeCount: The number of labels that were not created by the - // model, but if they would, they would not match a ground truth label. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: The number of model created labels that match a - // ground truth label. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - F1ScoreAt1 gensupport.JSONFloat64 `json:"f1ScoreAt1"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - FalsePositiveRateAt1 gensupport.JSONFloat64 `json:"falsePositiveRateAt1"` - Precision gensupport.JSONFloat64 `json:"precision"` - PrecisionAt1 gensupport.JSONFloat64 `json:"precisionAt1"` - Recall gensupport.JSONFloat64 `json:"recall"` - RecallAt1 gensupport.JSONFloat64 `json:"recallAt1"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.F1ScoreAt1 = float64(s1.F1ScoreAt1) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.FalsePositiveRateAt1 = float64(s1.FalsePositiveRateAt1) - s.Precision = float64(s1.Precision) - s.PrecisionAt1 = float64(s1.PrecisionAt1) - s.Recall = float64(s1.Recall) - s.RecallAt1 = float64(s1.RecallAt1) - return nil -} - -// XPSConfusionMatrix: Confusion matrix of the model running the -// classification. -type XPSConfusionMatrix struct { - // AnnotationSpecIdToken: For the following three repeated fields, only - // one is intended to be set. annotation_spec_id_token is preferable to - // be set. ID tokens of the annotation specs used in the confusion - // matrix. - AnnotationSpecIdToken []string `json:"annotationSpecIdToken,omitempty"` - - // Category: Category (mainly for segmentation). Set only for image - // segmentation models. Note: uCAIP Image Segmentation should use - // annotation_spec_id_token. - Category []int64 `json:"category,omitempty"` - - // Row: Rows in the confusion matrix. The number of rows is equal to the - // size of `annotation_spec_id_token`. `row[i].value[j]` is the number - // of examples that have ground truth of the - // `annotation_spec_id_token[i]` and are predicted as - // `annotation_spec_id_token[j]` by the model being evaluated. - Row []*XPSConfusionMatrixRow `json:"row,omitempty"` - - // SentimentLabel: Sentiment labels used in the confusion matrix. Set - // only for text sentiment models. For AutoML Text Revamp, use - // `annotation_spec_id_token` instead and leave this field empty. - SentimentLabel []int64 `json:"sentimentLabel,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrix) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrix - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfusionMatrixRow: A row in the confusion matrix. -type XPSConfusionMatrixRow struct { - // Count: Same as above except intended to represent other counts (for - // e.g. for segmentation this is pixel count). NOTE(params): Only - // example_count or count is set (oneoff does not support repeated - // fields unless they are embedded inside another message). - Count googleapi.Int64s `json:"count,omitempty"` - - // ExampleCount: Value of the specific cell in the confusion matrix. The - // number of values each row has (i.e. the length of the row) is equal - // to the length of the annotation_spec_id_token field. - ExampleCount []int64 `json:"exampleCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrixRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrixRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCoreMlFormat: A model format used for iOS mobile devices. -type XPSCoreMlFormat struct { -} - -// XPSCorrelationStats: A correlation statistics between two series of -// DataType values. The series may have differing DataType-s, but within -// a single series the DataType must be the same. -type XPSCorrelationStats struct { - // CramersV: The correlation value using the Cramer's V measure. - CramersV float64 `json:"cramersV,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CramersV") 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. "CramersV") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCorrelationStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCorrelationStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSCorrelationStats) UnmarshalJSON(data []byte) error { - type NoMethod XPSCorrelationStats - var s1 struct { - CramersV gensupport.JSONFloat64 `json:"cramersV"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CramersV = float64(s1.CramersV) - return nil -} - -// XPSDataErrors: Different types of errors and the stats associatesd -// with each error. -type XPSDataErrors struct { - // Count: Number of records having errors associated with the enum. - Count int64 `json:"count,omitempty"` - - // ErrorType: Type of the error. - // - // Possible values: - // "ERROR_TYPE_UNSPECIFIED" - Not specified. - // "UNSUPPORTED_AUDIO_FORMAT" - Audio format not in the formats by - // cloud-speech AutoML. Currently only wav and flac file formats are - // supported. - // "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT" - File format differnt - // from what is specified in the file name extension. - // "FILE_TOO_LARGE" - File too large. Maximum allowed size is 50 MB. - // "MISSING_TRANSCRIPTION" - Transcript is missing. - ErrorType string `json:"errorType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataErrors) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataStats: The data statistics of a series of values that share -// the same DataType. -type XPSDataStats struct { - // ArrayStats: The statistics for ARRAY DataType. - ArrayStats *XPSArrayStats `json:"arrayStats,omitempty"` - - // CategoryStats: The statistics for CATEGORY DataType. - CategoryStats *XPSCategoryStats `json:"categoryStats,omitempty"` - - // DistinctValueCount: The number of distinct values. - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - // Float64Stats: The statistics for FLOAT64 DataType. - Float64Stats *XPSFloat64Stats `json:"float64Stats,omitempty"` - - // NullValueCount: The number of values that are null. - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - // StringStats: The statistics for STRING DataType. - StringStats *XPSStringStats `json:"stringStats,omitempty"` - - // StructStats: The statistics for STRUCT DataType. - StructStats *XPSStructStats `json:"structStats,omitempty"` - - // TimestampStats: The statistics for TIMESTAMP DataType. - TimestampStats *XPSTimestampStats `json:"timestampStats,omitempty"` - - // ValidValueCount: The number of values that are valid. - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ArrayStats") 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. "ArrayStats") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataType: Indicated the type of data that can be stored in a -// structured data entity (e.g. a table). -type XPSDataType struct { - // CompatibleDataTypes: The highly compatible data types to this data - // type. - CompatibleDataTypes []*XPSDataType `json:"compatibleDataTypes,omitempty"` - - // ListElementType: If type_code == ARRAY, then `list_element_type` is - // the type of the elements. - ListElementType *XPSDataType `json:"listElementType,omitempty"` - - // Nullable: If true, this DataType can also be `null`. - Nullable bool `json:"nullable,omitempty"` - - // StructType: If type_code == STRUCT, then `struct_type` provides type - // information for the struct's fields. - StructType *XPSStructType `json:"structType,omitempty"` - - // TimeFormat: If type_code == TIMESTAMP then `time_format` provides the - // format in which that time field is expressed. The time_format must be - // written in `strftime` syntax. If time_format is not set, then the - // default format as described on the field is used. - TimeFormat string `json:"timeFormat,omitempty"` - - // TypeCode: Required. The TypeCode for this type. - // - // Possible values: - // "TYPE_CODE_UNSPECIFIED" - Not specified. Should not be used. - // "FLOAT64" - Encoded as `number`, or the strings "NaN", - // "Infinity", or "-Infinity". - // "TIMESTAMP" - Must be between 0AD and 9999AD. Encoded as `string` - // according to time_format, or, if that format is not set, then in RFC - // 3339 `date-time` format, where `time-offset` = "Z" (e.g. - // 1985-04-12T23:20:50.52Z). - // "STRING" - Encoded as `string`. - // "ARRAY" - Encoded as `list`, where the list elements are - // represented according to list_element_type. - // "STRUCT" - Encoded as `struct`, where field values are represented - // according to struct_type. - // "CATEGORY" - Values of this type are not further understood by - // AutoML, e.g. AutoML is unable to tell the order of values (as it - // could with FLOAT64), or is unable to say if one value contains - // another (as it could with STRING). Encoded as `string` (bytes should - // be base64-encoded, as described in RFC 4648, section 4). - TypeCode string `json:"typeCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CompatibleDataTypes") - // 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. "CompatibleDataTypes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataType) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDockerFormat: A model format used for Docker containers. Use the -// params field to customize the container. The container is verified to -// work correctly on ubuntu 16.04 operating system. -type XPSDockerFormat struct { - // CpuArchitecture: Optional. Additional cpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "CPU_ARCHITECTURE_UNSPECIFIED" - // "CPU_ARCHITECTURE_X86_64" - CpuArchitecture string `json:"cpuArchitecture,omitempty"` - - // GpuArchitecture: Optional. Additional gpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "GPU_ARCHITECTURE_UNSPECIFIED" - // "GPU_ARCHITECTURE_NVIDIA" - GpuArchitecture string `json:"gpuArchitecture,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CpuArchitecture") 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. "CpuArchitecture") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDockerFormat) MarshalJSON() ([]byte, error) { - type NoMethod XPSDockerFormat - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEdgeTpuTfLiteFormat: A model format used for Edge TPU -// (https://cloud.google.com/edge-tpu/) devices. -type XPSEdgeTpuTfLiteFormat struct { -} - -// XPSEvaluationMetrics: Contains xPS-specific model evaluation metrics -// either for a single annotation spec (label), or for the model -// overall. Next tag: 18. -type XPSEvaluationMetrics struct { - // AnnotationSpecIdToken: The annotation_spec for which this evaluation - // metrics instance had been created. Empty iff this is an overall model - // evaluation (like Tables evaluation metrics), i.e. aggregated across - // all labels. The value comes from the input annotations in - // AnnotatedExample. For MVP product or for text sentiment models where - // annotation_spec_id_token is not available, set label instead. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Category: The integer category label for which this evaluation metric - // instance had been created. Valid categories are 0 or higher. Overall - // model evaluation should set this to negative values (rather than - // implicit zero). Only used for Image Segmentation (prefer to set - // annotation_spec_id_token instead). Note: uCAIP Image Segmentation - // should use annotation_spec_id_token. - Category int64 `json:"category,omitempty"` - - // EvaluatedExampleCount: The number of examples used to create this - // evaluation metrics instance. - EvaluatedExampleCount int64 `json:"evaluatedExampleCount,omitempty"` - - ImageClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"imageClassificationEvalMetrics,omitempty"` - - ImageObjectDetectionEvalMetrics *XPSImageObjectDetectionEvaluationMetrics `json:"imageObjectDetectionEvalMetrics,omitempty"` - - ImageSegmentationEvalMetrics *XPSImageSegmentationEvaluationMetrics `json:"imageSegmentationEvalMetrics,omitempty"` - - // Label: The label for which this evaluation metrics instance had been - // created. Empty iff this is an overall model evaluation (like Tables - // evaluation metrics), i.e. aggregated across all labels. The label - // maps to AnnotationSpec.display_name in Public API protos. Only used - // by MVP implementation and text sentiment FULL implementation. - Label string `json:"label,omitempty"` - - RegressionEvalMetrics *XPSRegressionEvaluationMetrics `json:"regressionEvalMetrics,omitempty"` - - TablesClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"tablesClassificationEvalMetrics,omitempty"` - - TablesEvalMetrics *XPSTablesEvaluationMetrics `json:"tablesEvalMetrics,omitempty"` - - TextClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"textClassificationEvalMetrics,omitempty"` - - TextExtractionEvalMetrics *XPSTextExtractionEvaluationMetrics `json:"textExtractionEvalMetrics,omitempty"` - - TextSentimentEvalMetrics *XPSTextSentimentEvaluationMetrics `json:"textSentimentEvalMetrics,omitempty"` - - TranslationEvalMetrics *XPSTranslationEvaluationMetrics `json:"translationEvalMetrics,omitempty"` - - VideoActionRecognitionEvalMetrics *XPSVideoActionRecognitionEvaluationMetrics `json:"videoActionRecognitionEvalMetrics,omitempty"` - - VideoClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"videoClassificationEvalMetrics,omitempty"` - - VideoObjectTrackingEvalMetrics *XPSVideoObjectTrackingEvaluationMetrics `json:"videoObjectTrackingEvalMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") 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. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEvaluationMetricsSet: Specifies location of model evaluation -// metrics. -type XPSEvaluationMetricsSet struct { - // EvaluationMetrics: Inline EvaluationMetrics - should be relatively - // small. For passing large quantities of exhaustive metrics, use - // file_spec. - EvaluationMetrics []*XPSEvaluationMetrics `json:"evaluationMetrics,omitempty"` - - // FileSpec: File spec containing evaluation metrics of a model, must - // point to RecordIO file(s) of - // intelligence.cloud.automl.xps.EvaluationMetrics messages. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // NumEvaluationMetrics: Number of the evaluation metrics (usually one - // per label plus overall). - NumEvaluationMetrics int64 `json:"numEvaluationMetrics,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "EvaluationMetrics") - // 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. "EvaluationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetricsSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetricsSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSExampleSet: Set of examples or input sources. -type XPSExampleSet struct { - // FileSpec: File spec of the examples or input sources. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // Fingerprint: Fingerprint of the example set. - Fingerprint int64 `json:"fingerprint,omitempty,string"` - - // NumExamples: Number of examples. - NumExamples int64 `json:"numExamples,omitempty,string"` - - // NumInputSources: Number of input sources. - NumInputSources int64 `json:"numInputSources,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "FileSpec") 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. "FileSpec") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExampleSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSExampleSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSExportModelOutputConfig struct { - CoreMlFormat *XPSCoreMlFormat `json:"coreMlFormat,omitempty"` - - DockerFormat *XPSDockerFormat `json:"dockerFormat,omitempty"` - - EdgeTpuTfLiteFormat *XPSEdgeTpuTfLiteFormat `json:"edgeTpuTfLiteFormat,omitempty"` - - // ExportFirebaseAuxiliaryInfo: For any model and format: If true, will - // additionally export FirebaseExportedModelInfo in a firebase.txt file. - ExportFirebaseAuxiliaryInfo bool `json:"exportFirebaseAuxiliaryInfo,omitempty"` - - // OutputGcrUri: The Google Contained Registry (GCR) path the exported - // files to be pushed to. This location is set if the exported format is - // DOCKDER. - OutputGcrUri string `json:"outputGcrUri,omitempty"` - - // OutputGcsUri: The Google Cloud Storage (GCS) directory where XPS will - // output the exported models and related files. Format: - // gs://bucket/directory - OutputGcsUri string `json:"outputGcsUri,omitempty"` - - TfJsFormat *XPSTfJsFormat `json:"tfJsFormat,omitempty"` - - TfLiteFormat *XPSTfLiteFormat `json:"tfLiteFormat,omitempty"` - - TfSavedModelFormat *XPSTfSavedModelFormat `json:"tfSavedModelFormat,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreMlFormat") 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. "CoreMlFormat") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExportModelOutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSExportModelOutputConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFileSpec: Spec of input and output files, on external file systems -// (CNS, GCS, etc). -type XPSFileSpec struct { - // DirectoryPath: Deprecated. Use file_spec. - DirectoryPath string `json:"directoryPath,omitempty"` - - // Possible values: - // "FILE_FORMAT_UNKNOWN" - // "FILE_FORMAT_SSTABLE" - // "FILE_FORMAT_TRANSLATION_RKV" - Internal format for parallel text - // data used by Google Translate. go/rkvtools - // "FILE_FORMAT_RECORDIO" - // "FILE_FORMAT_RAW_CSV" - Only the lexicographically first file - // described by the file_spec contains the header line. - // "FILE_FORMAT_RAW_CAPACITOR" - FileFormat string `json:"fileFormat,omitempty"` - - // FileSpec: Single file path, or file pattern of format - // "/path/to/file@shard_count". E.g. /cns/cell-d/somewhere/file@2 is - // expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and - // /cns/cell-d/somewhere/file-00001-of-00002. - FileSpec string `json:"fileSpec,omitempty"` - - // SingleFilePath: Deprecated. Use file_spec. - SingleFilePath string `json:"singleFilePath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DirectoryPath") 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. "DirectoryPath") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFileSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSFileSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFloat64Stats: The data statistics of a series of FLOAT64 values. -type XPSFloat64Stats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // HistogramBuckets: Histogram buckets of the data series. Sorted by the - // min value of the bucket, ascendingly, and the number of the buckets - // is dynamically generated. The buckets are non-overlapping and - // completely cover whole FLOAT64 range with min of first bucket being - // "-Infinity", and max of the last one being "Infinity". - HistogramBuckets []*XPSFloat64StatsHistogramBucket `json:"histogramBuckets,omitempty"` - - // Mean: The mean of the series. - Mean float64 `json:"mean,omitempty"` - - // Quantiles: Ordered from 0 to k k-quantile values of the data series - // of n values. The value at index i is, approximately, the i*n/k-th - // smallest value in the series; for i = 0 and i = k these are, - // respectively, the min and max values. - Quantiles []float64 `json:"quantiles,omitempty"` - - // StandardDeviation: The standard deviation of the series. - StandardDeviation float64 `json:"standardDeviation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64Stats) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64Stats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64Stats) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64Stats - var s1 struct { - Mean gensupport.JSONFloat64 `json:"mean"` - Quantiles []gensupport.JSONFloat64 `json:"quantiles"` - StandardDeviation gensupport.JSONFloat64 `json:"standardDeviation"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Mean = float64(s1.Mean) - s.Quantiles = make([]float64, len(s1.Quantiles)) - for i := range s1.Quantiles { - s.Quantiles[i] = float64(s1.Quantiles[i]) - } - s.StandardDeviation = float64(s1.StandardDeviation) - return nil -} - -// XPSFloat64StatsHistogramBucket: A bucket of a histogram. -type XPSFloat64StatsHistogramBucket struct { - // Count: The number of data values that are in the bucket, i.e. are - // between min and max values. - Count int64 `json:"count,omitempty,string"` - - // Max: The maximum value of the bucket, exclusive unless max = - // "Infinity", in which case it's inclusive. - Max float64 `json:"max,omitempty"` - - // Min: The minimum value of the bucket, inclusive. - Min float64 `json:"min,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64StatsHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64StatsHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64StatsHistogramBucket) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64StatsHistogramBucket - 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 XPSImageClassificationTrainResponse struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - // ExportModelSpec: Information of downloadable models that are - // pre-generated as part of training flow and will be persisted in - // AutoMl backend. Populated for AutoMl requests. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostInNodeTime: The actual cost to create this model. - For edge - // type model, the cost is expressed in node hour. - For cloud type - // model,the cost is expressed in compute hour. - Populated for models - // created before GA. To be deprecated after GA. - TrainCostInNodeTime string `json:"trainCostInNodeTime,omitempty"` - - // TrainCostNodeSeconds: The actual training cost, expressed in node - // seconds. Populated for models trained in node time. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") 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. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSImageExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") 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. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelArtifactSpec: Stores the locations and related metadata -// of the model artifacts. Populated for uCAIP requests only. -type XPSImageModelArtifactSpec struct { - // CheckpointArtifact: The Tensorflow checkpoint files. e.g. Used for - // resumable training. - CheckpointArtifact *XPSModelArtifactItem `json:"checkpointArtifact,omitempty"` - - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // LabelGcsUri: GCS uri of decoded labels file for model export - // 'dict.txt'. - LabelGcsUri string `json:"labelGcsUri,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // TfJsBinaryGcsPrefix: GCS uri prefix of Tensorflow JavaScript binary - // files 'groupX-shardXofX.bin' Deprecated. - TfJsBinaryGcsPrefix string `json:"tfJsBinaryGcsPrefix,omitempty"` - - // TfLiteMetadataGcsUri: GCS uri of Tensorflow Lite metadata - // 'tflite_metadata.json'. - TfLiteMetadataGcsUri string `json:"tfLiteMetadataGcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CheckpointArtifact") - // 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. "CheckpointArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelServingSpec: Serving specification for image models. -type XPSImageModelServingSpec struct { - // ModelThroughputEstimation: Populate under uCAIP request scope. - ModelThroughputEstimation []*XPSImageModelServingSpecModelThroughputEstimation `json:"modelThroughputEstimation,omitempty"` - - // NodeQps: An estimated value of how much traffic a node can serve. - // Populated for AutoMl request only. - NodeQps float64 `json:"nodeQps,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ModelThroughputEstimation") 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. - // "ModelThroughputEstimation") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpec) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpec - var s1 struct { - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.NodeQps = float64(s1.NodeQps) - return nil -} - -type XPSImageModelServingSpecModelThroughputEstimation struct { - // Possible values: - // "UNSPECIFIED" - // "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU. - // "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU. - // "NVIDIA_TESLA_V100" - Nvidia Tesla V100 GPU. - // "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU. - // "NVIDIA_TESLA_T4" - Nvidia Tesla T4 GPU. - // "NVIDIA_TESLA_A100" - Nvidia Tesla A100 GPU. - // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. - // "NVIDIA_L4" - Nvidia L4 GPU. - // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. - // "TPU_V2" - TPU v2 (JellyFish). - // "TPU_V3" - TPU v3 (DragonFish). - // "TPU_V4_POD" - TPU_v4 (PufferFish). - // "TPU_V5_LITEPOD" - TPU v5 Lite Pods. - ComputeEngineAcceleratorType string `json:"computeEngineAcceleratorType,omitempty"` - - // LatencyInMilliseconds: Estimated latency. - LatencyInMilliseconds float64 `json:"latencyInMilliseconds,omitempty"` - - // NodeQps: The approximate qps a deployed node can serve. - NodeQps float64 `json:"nodeQps,omitempty"` - - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - ServomaticPartitionType string `json:"servomaticPartitionType,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ComputeEngineAcceleratorType") 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. - // "ComputeEngineAcceleratorType") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - var s1 struct { - LatencyInMilliseconds gensupport.JSONFloat64 `json:"latencyInMilliseconds"` - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LatencyInMilliseconds = float64(s1.LatencyInMilliseconds) - s.NodeQps = float64(s1.NodeQps) - return nil -} - -// XPSImageObjectDetectionEvaluationMetrics: Model evaluation metrics -// for image object detection problems. Evaluates prediction quality of -// labeled bounding boxes. -type XPSImageObjectDetectionEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: The single metric for bounding boxes - // evaluation: the mean_average_precision averaged over all - // bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: The bounding boxes match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence - // threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingBoxCount: The total number of bounding boxes (i.e. - // summed over all images) the ground truth used to create this - // evaluation had. - EvaluatedBoundingBoxCount int64 `json:"evaluatedBoundingBoxCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") 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. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - return nil -} - -type XPSImageObjectDetectionModelSpec struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // MaxBoundingBoxCount: Max number of bounding box. - MaxBoundingBoxCount int64 `json:"maxBoundingBoxCount,omitempty,string"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") 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. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetrics: Model evaluation metrics for -// image segmentation problems. Next tag: 4. -type XPSImageSegmentationEvaluationMetrics struct { - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry: Metrics -// for a single confidence threshold. -type XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // ConfusionMatrix: Confusion matrix of the per confidence_threshold - // evaluation. Pixel counts are set here. Only set for model level - // evaluation, not for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // DiceScoreCoefficient: DSC or the F1 score: The harmonic mean of - // recall and precision. - DiceScoreCoefficient float64 `json:"diceScoreCoefficient,omitempty"` - - // IouScore: IOU score. - IouScore float64 `json:"iouScore,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - DiceScoreCoefficient gensupport.JSONFloat64 `json:"diceScoreCoefficient"` - IouScore gensupport.JSONFloat64 `json:"iouScore"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.DiceScoreCoefficient = float64(s1.DiceScoreCoefficient) - s.IouScore = float64(s1.IouScore) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -type XPSImageSegmentationTrainResponse struct { - // ColorMaps: Color map of the model. - ColorMaps []*XPSColorMap `json:"colorMaps,omitempty"` - - // ExportModelSpec: NOTE: These fields are not used/needed in EAP but - // will be set later. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. Model artifact spec stores and model gcs pathes and - // related metadata - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColorMaps") 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. "ColorMaps") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSIntegratedGradientsAttribution: An attribution method that -// computes the Aumann-Shapley value taking advantage of the model's -// fully differentiable structure. Refer to this paper for more details: -// https://arxiv.org/abs/1703.01365 -type XPSIntegratedGradientsAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is within the desired error range. Valid range of its - // value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") 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. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSIntegratedGradientsAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSIntegratedGradientsAttribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSMetricEntry struct { - // ArgentumMetricId: For billing metrics that are using legacy sku's, - // set the legacy billing metric id here. This will be sent to Chemist - // as the "cloudbilling.googleapis.com/argentum_metric_id" label. - // Otherwise leave empty. - ArgentumMetricId string `json:"argentumMetricId,omitempty"` - - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - - // Int64Value: A signed 64-bit integer value. - Int64Value int64 `json:"int64Value,omitempty,string"` - - // MetricName: The metric name defined in the service configuration. - MetricName string `json:"metricName,omitempty"` - - // SystemLabels: Billing system labels for this (metric, value) pair. - SystemLabels []*XPSMetricEntryLabel `json:"systemLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArgentumMetricId") 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. "ArgentumMetricId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSMetricEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSMetricEntry - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil -} - -type XPSMetricEntryLabel struct { - // LabelName: The name of the label. - LabelName string `json:"labelName,omitempty"` - - // LabelValue: The value of the label. - LabelValue string `json:"labelValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelName") 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. "LabelName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntryLabel) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntryLabel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSModelArtifactItem: A single model artifact item. -type XPSModelArtifactItem struct { - // ArtifactFormat: The model artifact format. - // - // Possible values: - // "ARTIFACT_FORMAT_UNSPECIFIED" - Should not be used. - // "TF_CHECKPOINT" - The Tensorflow checkpoints. See - // https://www.tensorflow.org/guide/checkpoint. - // "TF_SAVED_MODEL" - The Tensorflow SavedModel binary. - // "TF_LITE" - Model artifact in generic TensorFlow Lite (.tflite) - // format. See https://www.tensorflow.org/lite. - // "EDGE_TPU_TF_LITE" - Used for [Edge - // TPU](https://cloud.google.com/edge-tpu/) devices. - // "TF_JS" - A [TensorFlow.js](https://www.tensorflow.org/js) model - // that can be used in the browser and in Node.js using JavaScript. - // "CORE_ML" - Used for iOS mobile devices in (.mlmodel) format. See - // https://developer.apple.com/documentation/coreml - ArtifactFormat string `json:"artifactFormat,omitempty"` - - // GcsUri: The Google Cloud Storage (GCS) uri that stores the model - // binary files. - GcsUri string `json:"gcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArtifactFormat") 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. "ArtifactFormat") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSModelArtifactItem) MarshalJSON() ([]byte, error) { - type NoMethod XPSModelArtifactItem - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSPreprocessResponse: Next ID: 8 -type XPSPreprocessResponse struct { - // OutputExampleSet: Preprocessed examples, that are to be imported into - // AutoML storage. This should point to RecordIO file(s) of - // PreprocessedExample messages. The - // PreprocessedExample.mvp_training_data-s returned here are later - // verbatim passed to Train() call in TrainExample.mvp_training_data. - OutputExampleSet *XPSExampleSet `json:"outputExampleSet,omitempty"` - - SpeechPreprocessResp *XPSSpeechPreprocessResponse `json:"speechPreprocessResp,omitempty"` - - TablesPreprocessResponse *XPSTablesPreprocessResponse `json:"tablesPreprocessResponse,omitempty"` - - TranslationPreprocessResp *XPSTranslationPreprocessResponse `json:"translationPreprocessResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExampleSet") 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. "OutputExampleSet") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSRegressionEvaluationMetrics: Model evaluation metrics for -// regression problems. It can be used for Tables. -type XPSRegressionEvaluationMetrics struct { - // MeanAbsoluteError: Mean Absolute Error (MAE). - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error. Only set - // if all ground truth values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root Mean Squared Error (RMSE). - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // 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. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionEvaluationMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -// XPSRegressionMetricsEntry: A pair of actual & observed values for the -// model being evaluated. -type XPSRegressionMetricsEntry struct { - // PredictedValue: The observed value for a row in the dataset. - PredictedValue float64 `json:"predictedValue,omitempty"` - - // TrueValue: The actual target value for a row in the dataset. - TrueValue float64 `json:"trueValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PredictedValue") 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. "PredictedValue") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionMetricsEntry - var s1 struct { - PredictedValue gensupport.JSONFloat64 `json:"predictedValue"` - TrueValue gensupport.JSONFloat64 `json:"trueValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PredictedValue = float64(s1.PredictedValue) - s.TrueValue = float64(s1.TrueValue) - return nil -} - -type XPSReportingMetrics struct { - // EffectiveTrainingDuration: The effective time training used. If set, - // this is used for quota management and billing. Deprecated. AutoML BE - // doesn't use this. Don't set. - EffectiveTrainingDuration string `json:"effectiveTrainingDuration,omitempty"` - - // MetricEntries: One entry per metric name. The values must be - // aggregated per metric name. - MetricEntries []*XPSMetricEntry `json:"metricEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EffectiveTrainingDuration") 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. - // "EffectiveTrainingDuration") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSReportingMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSReportingMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationMetadata struct { - // Inputs: Metadata of the input. - Inputs map[string]XPSResponseExplanationMetadataInputMetadata `json:"inputs,omitempty"` - - // Outputs: Metadata of the output. - Outputs map[string]XPSResponseExplanationMetadataOutputMetadata `json:"outputs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Inputs") 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. "Inputs") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataInputMetadata: Metadata of the input of -// a feature. -type XPSResponseExplanationMetadataInputMetadata struct { - // InputTensorName: Name of the input tensor for this model. Only needed - // in train response. - InputTensorName string `json:"inputTensorName,omitempty"` - - // Modality: Modality of the feature. Valid values are: numeric, image. - // Defaults to numeric. - // - // Possible values: - // "MODALITY_UNSPECIFIED" - // "NUMERIC" - // "IMAGE" - // "CATEGORICAL" - Modality string `json:"modality,omitempty"` - - // VisualizationConfig: Visualization configurations for image - // explanation. - VisualizationConfig *XPSVisualization `json:"visualizationConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputTensorName") 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. "InputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataInputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataInputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataOutputMetadata: Metadata of the -// prediction output to be explained. -type XPSResponseExplanationMetadataOutputMetadata struct { - // OutputTensorName: Name of the output tensor. Only needed in train - // response. - OutputTensorName string `json:"outputTensorName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputTensorName") 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. "OutputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataOutputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataOutputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationParameters struct { - // IntegratedGradientsAttribution: An attribution method that computes - // Aumann-Shapley values taking advantage of the model's fully - // differentiable structure. Refer to this paper for more details: - // https://arxiv.org/abs/1703.01365 - IntegratedGradientsAttribution *XPSIntegratedGradientsAttribution `json:"integratedGradientsAttribution,omitempty"` - - // XraiAttribution: An attribution method that redistributes Integrated - // Gradients attribution to segmented regions, taking advantage of the - // model's fully differentiable structure. Refer to this paper for more - // details: https://arxiv.org/abs/1906.02825 XRAI currently performs - // better on natural images, like a picture of a house or an animal. If - // the images are taken in artificial environments, like a lab or - // manufacturing line, or from diagnostic equipment, like x-rays or - // quality-control cameras, use Integrated Gradients instead. - XraiAttribution *XPSXraiAttribution `json:"xraiAttribution,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IntegratedGradientsAttribution") 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. - // "IntegratedGradientsAttribution") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationSpec: Specification of Model explanation. -// Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 -// for context. -type XPSResponseExplanationSpec struct { - // ExplanationType: Explanation type. For AutoML Image Classification - // models, possible values are: * `image-integrated-gradients` * - // `image-xrai` - ExplanationType string `json:"explanationType,omitempty"` - - // Metadata: Metadata describing the Model's input and output for - // explanation. - Metadata *XPSResponseExplanationMetadata `json:"metadata,omitempty"` - - // Parameters: Parameters that configure explaining of the Model's - // predictions. - Parameters *XPSResponseExplanationParameters `json:"parameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationType") 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. "ExplanationType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSRow struct { - // ColumnIds: The ids of the columns. Note: The below `values` field - // must match order of this field, if this field is set. - ColumnIds []int64 `json:"columnIds,omitempty"` - - // Values: The values of the row cells, given in the same order as the - // column_ids. If column_ids is not set, then in the same order as the - // input_feature_column_ids in TablesModelMetadata. - Values []interface{} `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnIds") 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. "ColumnIds") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetrics struct { - // SubModelEvaluationMetrics: Evaluation metrics for all submodels - // contained in this model. - SubModelEvaluationMetrics []*XPSSpeechEvaluationMetricsSubModelEvaluationMetric `json:"subModelEvaluationMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SubModelEvaluationMetrics") 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. - // "SubModelEvaluationMetrics") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetricsSubModelEvaluationMetric struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - NumDeletions int64 `json:"numDeletions,omitempty"` - - NumInsertions int64 `json:"numInsertions,omitempty"` - - NumSubstitutions int64 `json:"numSubstitutions,omitempty"` - - // NumUtterances: Number of utterances used in the wer computation. - NumUtterances int64 `json:"numUtterances,omitempty"` - - // NumWords: Number of words over which the word error rate was - // computed. - NumWords int64 `json:"numWords,omitempty"` - - // SentenceAccuracy: Below fields are used for debugging purposes - SentenceAccuracy float64 `json:"sentenceAccuracy,omitempty"` - - // Wer: Word error rate (standard error metric used for speech - // recognition). - Wer float64 `json:"wer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") 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. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) UnmarshalJSON(data []byte) error { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - var s1 struct { - SentenceAccuracy gensupport.JSONFloat64 `json:"sentenceAccuracy"` - Wer gensupport.JSONFloat64 `json:"wer"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SentenceAccuracy = float64(s1.SentenceAccuracy) - s.Wer = float64(s1.Wer) - return nil -} - -type XPSSpeechModelSpec struct { - // DatasetId: Required for speech xps backend. Speech xps has to use - // dataset_id and model_id as the primary key in db so that speech API - // can query the db directly. - DatasetId int64 `json:"datasetId,omitempty,string"` - - Language string `json:"language,omitempty"` - - // SubModelSpecs: Model specs for all submodels contained in this model. - SubModelSpecs []*XPSSpeechModelSpecSubModelSpec `json:"subModelSpecs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatasetId") 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. "DatasetId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechModelSpecSubModelSpec struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // ClientId: In S3, Recognition ClientContextId.client_id - ClientId string `json:"clientId,omitempty"` - - // ContextId: In S3, Recognition ClientContextId.context_id - ContextId string `json:"contextId,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") 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. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpecSubModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpecSubModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessResponse struct { - // CnsTestDataPath: Location od shards of sstables (test data) of - // DataUtterance protos. - CnsTestDataPath string `json:"cnsTestDataPath,omitempty"` - - // CnsTrainDataPath: Location of shards of sstables (training data) of - // DataUtterance protos. - CnsTrainDataPath string `json:"cnsTrainDataPath,omitempty"` - - // PrebuiltModelEvaluationMetrics: The metrics for prebuilt speech - // models. They are included here because there is no prebuilt speech - // models stored in the AutoML. - PrebuiltModelEvaluationMetrics *XPSSpeechEvaluationMetrics `json:"prebuiltModelEvaluationMetrics,omitempty"` - - // SpeechPreprocessStats: Stats associated with the data. - SpeechPreprocessStats *XPSSpeechPreprocessStats `json:"speechPreprocessStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CnsTestDataPath") 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. "CnsTestDataPath") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessStats struct { - // DataErrors: Different types of data errors and the counts associated - // with them. - DataErrors []*XPSDataErrors `json:"dataErrors,omitempty"` - - // NumHumanLabeledExamples: The number of rows marked HUMAN_LABELLED - NumHumanLabeledExamples int64 `json:"numHumanLabeledExamples,omitempty"` - - // NumLogsExamples: The number of samples found in the previously - // recorded logs data. - NumLogsExamples int64 `json:"numLogsExamples,omitempty"` - - // NumMachineTranscribedExamples: The number of rows marked as - // MACHINE_TRANSCRIBED - NumMachineTranscribedExamples int64 `json:"numMachineTranscribedExamples,omitempty"` - - // TestExamplesCount: The number of examples labelled as TEST by Speech - // xps server. - TestExamplesCount int64 `json:"testExamplesCount,omitempty"` - - // TestSentencesCount: The number of sentences in the test data set. - TestSentencesCount int64 `json:"testSentencesCount,omitempty"` - - // TestWordsCount: The number of words in the test data set. - TestWordsCount int64 `json:"testWordsCount,omitempty"` - - // TrainExamplesCount: The number of examples labeled as TRAIN by Speech - // xps server. - TrainExamplesCount int64 `json:"trainExamplesCount,omitempty"` - - // TrainSentencesCount: The number of sentences in the training data - // set. - TrainSentencesCount int64 `json:"trainSentencesCount,omitempty"` - - // TrainWordsCount: The number of words in the training data set. - TrainWordsCount int64 `json:"trainWordsCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DataErrors") 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. "DataErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStats: The data statistics of a series of STRING values. -type XPSStringStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopUnigramStats: The statistics of the top 20 unigrams, ordered by - // StringStats.UnigramStats.count. - TopUnigramStats []*XPSStringStatsUnigramStats `json:"topUnigramStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStatsUnigramStats: The statistics of a unigram. -type XPSStringStatsUnigramStats struct { - // Count: The number of occurrences of this unigram in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The unigram. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStatsUnigramStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStatsUnigramStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructStats: The data statistics of a series of STRUCT values. -type XPSStructStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // FieldStats: Map from a field name of the struct to data stats - // aggregated over series of all data in that field across all the - // structs. - FieldStats map[string]XPSDataStats `json:"fieldStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructType: `StructType` defines the DataType-s of a STRUCT type. -type XPSStructType struct { - // Fields: Unordered map of struct field names to their data types. - Fields map[string]XPSDataType `json:"fields,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fields") 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. "Fields") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructType) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTableSpec struct { - // ColumnSpecs: Mapping from column id to column spec. - ColumnSpecs map[string]XPSColumnSpec `json:"columnSpecs,omitempty"` - - // ImportedDataSizeInBytes: The total size of imported data of the - // table. - ImportedDataSizeInBytes int64 `json:"importedDataSizeInBytes,omitempty,string"` - - // RowCount: The number of rows in the table. - RowCount int64 `json:"rowCount,omitempty,string"` - - // TimeColumnId: The id of the time column. - TimeColumnId int64 `json:"timeColumnId,omitempty"` - - // ValidRowCount: The number of valid rows. - ValidRowCount int64 `json:"validRowCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColumnSpecs") 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. "ColumnSpecs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTableSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSTableSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetrics: Metrics for Tables classification -// problems. -type XPSTablesClassificationMetrics struct { - // CurveMetrics: Metrics building a curve. - CurveMetrics []*XPSTablesClassificationMetricsCurveMetrics `json:"curveMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CurveMetrics") 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. "CurveMetrics") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetricsCurveMetrics: Metrics curve data point -// for a single value. -type XPSTablesClassificationMetricsCurveMetrics struct { - // AucPr: The area under the precision-recall curve. - AucPr float64 `json:"aucPr,omitempty"` - - // AucRoc: The area under receiver operating characteristic curve. - AucRoc float64 `json:"aucRoc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve and ROC curve can be derived from them. - ConfidenceMetricsEntries []*XPSTablesConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // LogLoss: The Log loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // PositionThreshold: The position threshold value used to compute the - // metrics. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Value: The CATEGORY row value (for ARRAY unnested) the curve metrics - // are for. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AucPr") 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. "AucPr") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - var s1 struct { - AucPr gensupport.JSONFloat64 `json:"aucPr"` - AucRoc gensupport.JSONFloat64 `json:"aucRoc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AucPr = float64(s1.AucPr) - s.AucRoc = float64(s1.AucRoc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSTablesConfidenceMetricsEntry: Metrics for a single confidence -// threshold. -type XPSTablesConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. (2 * precision * - // recall) / (precision + recall) - F1Score float64 `json:"f1Score,omitempty"` - - // FalseNegativeCount: False negative count. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: False positive count. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: FPR = #false positives / (#false positives + #true - // negatives) - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // Precision: Precision = #true positives / (#true positives + #false - // positives). - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall = #true positives / (#true positives + #false - // negatives). - Recall float64 `json:"recall,omitempty"` - - // TrueNegativeCount: True negative count. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: True positive count. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // TruePositiveRate: TPR = #true positives / (#true positives + #false - // negatvies) - TruePositiveRate float64 `json:"truePositiveRate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - TruePositiveRate gensupport.JSONFloat64 `json:"truePositiveRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - s.TruePositiveRate = float64(s1.TruePositiveRate) - return nil -} - -// XPSTablesDatasetMetadata: Metadata for a dataset used for AutoML -// Tables. Next ID: 6 -type XPSTablesDatasetMetadata struct { - // MlUseColumnId: Id the column to split the table. - MlUseColumnId int64 `json:"mlUseColumnId,omitempty"` - - // PrimaryTableSpec: Primary table. - PrimaryTableSpec *XPSTableSpec `json:"primaryTableSpec,omitempty"` - - // TargetColumnCorrelations: (the column id : its CorrelationStats with - // target column). - TargetColumnCorrelations map[string]XPSCorrelationStats `json:"targetColumnCorrelations,omitempty"` - - // TargetColumnId: Id of the primary table column that should be used as - // the training label. - TargetColumnId int64 `json:"targetColumnId,omitempty"` - - // WeightColumnId: Id of the primary table column that should be used as - // the weight column. - WeightColumnId int64 `json:"weightColumnId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MlUseColumnId") 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. "MlUseColumnId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesDatasetMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesDatasetMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesEvaluationMetrics struct { - // ClassificationMetrics: Classification metrics. - ClassificationMetrics *XPSTablesClassificationMetrics `json:"classificationMetrics,omitempty"` - - // RegressionMetrics: Regression metrics. - RegressionMetrics *XPSTablesRegressionMetrics `json:"regressionMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClassificationMetrics") 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. "ClassificationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelColumnInfo: An information specific to given column and -// Tables Model, in context of the Model and the predictions created by -// it. -type XPSTablesModelColumnInfo struct { - // ColumnId: The ID of the column. - ColumnId int64 `json:"columnId,omitempty"` - - // FeatureImportance: When given as part of a Model: Measurement of how - // much model predictions correctness on the TEST data depend on values - // in this column. A value between 0 and 1, higher means higher - // influence. These values are normalized - for all input feature - // columns of a given model they add to 1. When given back by Predict or - // Batch Predict: Measurement of how impactful for the prediction - // returned for the given row the value in this column was. - // Specifically, the feature importance specifies the marginal - // contribution that the feature made to the prediction score compared - // to the baseline score. These values are computed using the Sampled - // Shapley method. - FeatureImportance float64 `json:"featureImportance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelColumnInfo) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelColumnInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelColumnInfo) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelColumnInfo - var s1 struct { - FeatureImportance gensupport.JSONFloat64 `json:"featureImportance"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FeatureImportance = float64(s1.FeatureImportance) - return nil -} - -// XPSTablesModelStructure: A description of Tables model structure. -type XPSTablesModelStructure struct { - // ModelParameters: A list of models. - ModelParameters []*XPSTablesModelStructureModelParameters `json:"modelParameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelParameters") 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. "ModelParameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructure) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelStructureModelParameters: Model hyper-parameters for a -// model. -type XPSTablesModelStructureModelParameters struct { - Hyperparameters []*XPSTablesModelStructureModelParametersParameter `json:"hyperparameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Hyperparameters") 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. "Hyperparameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesModelStructureModelParametersParameter struct { - // FloatValue: Float type parameter value. - FloatValue float64 `json:"floatValue,omitempty"` - - // IntValue: Integer type parameter value. - IntValue int64 `json:"intValue,omitempty,string"` - - // Name: Parameter name. - Name string `json:"name,omitempty"` - - // StringValue: String type parameter value. - StringValue string `json:"stringValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FloatValue") 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. "FloatValue") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParametersParameter) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParametersParameter - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelStructureModelParametersParameter) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelStructureModelParametersParameter - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -type XPSTablesPreprocessResponse struct { - // TablesDatasetMetadata: The table/column id, column_name and the - // DataTypes of the columns will be populated. - TablesDatasetMetadata *XPSTablesDatasetMetadata `json:"tablesDatasetMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "TablesDatasetMetadata") 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. "TablesDatasetMetadata") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesRegressionMetrics: Metrics for Tables regression problems. -type XPSTablesRegressionMetrics struct { - // MeanAbsoluteError: Mean absolute error. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error, only set - // if all of the target column's values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root mean squared error. - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // 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. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesRegressionMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesRegressionMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesRegressionMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesRegressionMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -type XPSTablesTrainResponse struct { - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // PredictionSampleRows: Sample rows from the dataset this model was - // trained. - PredictionSampleRows []*XPSRow `json:"predictionSampleRows,omitempty"` - - // TablesModelColumnInfo: Output only. Auxiliary information for each of - // the input_feature_column_specs, with respect to this particular - // model. - TablesModelColumnInfo []*XPSTablesModelColumnInfo `json:"tablesModelColumnInfo,omitempty"` - - // TrainCostMilliNodeHours: The actual training cost of the model, - // expressed in milli node hours, i.e. 1,000 value in this field means 1 - // node hour. Guaranteed to not exceed the train budget. - TrainCostMilliNodeHours int64 `json:"trainCostMilliNodeHours,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") 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. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesTrainingOperationMetadata struct { - // CreateModelStage: Current stage of creating model. - // - // Possible values: - // "CREATE_MODEL_STAGE_UNSPECIFIED" - Unspecified stage. - // "DATA_PREPROCESSING" - Prepare the model training pipeline and run - // data processing. - // "TRAINING" - Training model. - // "EVALUATING" - Run evaluation. - // "MODEL_POST_PROCESSING" - Finalizing model training pipeline. - CreateModelStage string `json:"createModelStage,omitempty"` - - // OptimizationObjective: The optimization objective for model. - OptimizationObjective string `json:"optimizationObjective,omitempty"` - - // TopTrials: This field is for training. When the operation is - // terminated successfully, AutoML Backend post this field to operation - // metadata in spanner. If the metadata has no trials returned, the - // training operation is supposed to be a failure. - TopTrials []*XPSTuningTrial `json:"topTrials,omitempty"` - - // TrainBudgetMilliNodeHours: Creating model budget. - TrainBudgetMilliNodeHours int64 `json:"trainBudgetMilliNodeHours,omitempty,string"` - - // TrainingObjectivePoints: This field records the training objective - // value with respect to time, giving insight into how the model - // architecture search is performing as training time elapses. - TrainingObjectivePoints []*XPSTrainingObjectivePoint `json:"trainingObjectivePoints,omitempty"` - - // TrainingStartTime: Timestamp when training process starts. - TrainingStartTime string `json:"trainingStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateModelStage") 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. "CreateModelStage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextComponentModel: Component model. Next ID: 10 -type XPSTextComponentModel struct { - // BatchPredictionModelGcsUri: The Cloud Storage resource path to hold - // batch prediction model. - BatchPredictionModelGcsUri string `json:"batchPredictionModelGcsUri,omitempty"` - - // OnlinePredictionModelGcsUri: The Cloud Storage resource path to hold - // online prediction model. - OnlinePredictionModelGcsUri string `json:"onlinePredictionModelGcsUri,omitempty"` - - // Partition: The partition where the model is deployed. Populated by - // uCAIP BE as part of online PredictRequest. - // - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - Partition string `json:"partition,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud Ai Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ServoModelName: The name of servo model. Populated by uCAIP BE as - // part of online PredictRequest. - ServoModelName string `json:"servoModelName,omitempty"` - - // SubmodelName: The name of the trained NL submodel. - SubmodelName string `json:"submodelName,omitempty"` - - // SubmodelType: The type of trained NL submodel - // - // Possible values: - // "TEXT_MODEL_TYPE_UNSPECIFIED" - // "TEXT_MODEL_TYPE_DEFAULT" - // "TEXT_MODEL_TYPE_META_ARCHITECT" - // "TEXT_MODEL_TYPE_ATC" - // "TEXT_MODEL_TYPE_CLARA2" - // "TEXT_MODEL_TYPE_CHATBASE" - // "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING" - // "TEXT_MODEL_TYPE_TEXT_EXTRACTION" - Model type for entity - // extraction. - // "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION" - Model type for - // relationship extraction. - // "TEXT_MODEL_TYPE_COMPOSITE" - A composite model represents a set of - // component models that have to be used together for prediction. A - // composite model appears to be a single model to the model user. It - // may contain only one component model. Please refer to - // go/cnl-composite-models for more information. - // "TEXT_MODEL_TYPE_ALL_MODELS" - Model type used to train default, - // MA, and ATC models in a single batch worker pipeline. - // "TEXT_MODEL_TYPE_BERT" - BERT pipeline needs a specific model type, - // since it uses a different TFX configuration compared with DEFAULT - // (despite sharing most of the code). - // "TEXT_MODEL_TYPE_ENC_PALM" - Model type for EncPaLM. - SubmodelType string `json:"submodelType,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // VersionNumber: The servomatic model version number. Populated by - // uCAIP BE as part of online PredictRequest. - VersionNumber int64 `json:"versionNumber,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "BatchPredictionModelGcsUri") 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. - // "BatchPredictionModelGcsUri") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextComponentModel) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextComponentModel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTextExtractionEvaluationMetrics struct { - // BestF1ConfidenceMetrics: Values are at the highest F1 score on the - // precision-recall curve. Only confidence_threshold, recall, precision, - // and f1_score will be set. - BestF1ConfidenceMetrics *XPSConfidenceMetricsEntry `json:"bestF1ConfidenceMetrics,omitempty"` - - // ConfidenceMetricsEntries: If the enclosing EvaluationMetrics.label is - // empty, confidence_metrics_entries is an evaluation of the entire - // model across all labels. If the enclosing EvaluationMetrics.label is - // set, confidence_metrics_entries applies to that label. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the model, at the default - // confidence threshold (0.0). Only set for whole-model evaluation, not - // for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // PerLabelConfidenceMetrics: Only recall, precision, and f1_score will - // be set. - PerLabelConfidenceMetrics map[string]XPSConfidenceMetricsEntry `json:"perLabelConfidenceMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BestF1ConfidenceMetrics") 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. "BestF1ConfidenceMetrics") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextExtractionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextExtractionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextSentimentEvaluationMetrics: Model evaluation metrics for text -// sentiment problems. -type XPSTextSentimentEvaluationMetrics struct { - // ConfusionMatrix: Output only. Confusion matrix of the evaluation. - // Only set for the overall model evaluation, not for evaluation of a - // single annotation spec. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // LinearKappa: Output only. Linear weighted kappa. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - LinearKappa float64 `json:"linearKappa,omitempty"` - - // MeanAbsoluteError: Output only. Mean absolute error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanSquaredError: Output only. Mean squared error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanSquaredError float64 `json:"meanSquaredError,omitempty"` - - // Precision: Output only. Precision. - Precision float64 `json:"precision,omitempty"` - - // QuadraticKappa: Output only. Quadratic weighted kappa. Only set for - // the overall model evaluation, not for evaluation of a single - // annotation spec. - QuadraticKappa float64 `json:"quadraticKappa,omitempty"` - - // Recall: Output only. Recall. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfusionMatrix") 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. "ConfusionMatrix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextSentimentEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextSentimentEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTextSentimentEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTextSentimentEvaluationMetrics - var s1 struct { - F1Score gensupport.JSONFloat64 `json:"f1Score"` - LinearKappa gensupport.JSONFloat64 `json:"linearKappa"` - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanSquaredError gensupport.JSONFloat64 `json:"meanSquaredError"` - Precision gensupport.JSONFloat64 `json:"precision"` - QuadraticKappa gensupport.JSONFloat64 `json:"quadraticKappa"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.F1Score = float64(s1.F1Score) - s.LinearKappa = float64(s1.LinearKappa) - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanSquaredError = float64(s1.MeanSquaredError) - s.Precision = float64(s1.Precision) - s.QuadraticKappa = float64(s1.QuadraticKappa) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSTextToSpeechTrainResponse: TextToSpeech train response -type XPSTextToSpeechTrainResponse struct { -} - -type XPSTextTrainResponse struct { - // ComponentModel: Component submodels. - ComponentModel []*XPSTextComponentModel `json:"componentModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ComponentModel") 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. "ComponentModel") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTfJsFormat: A TensorFlow.js (https://www.tensorflow.org/js) model -// that can be used in the browser and in Node.js using JavaScript. -type XPSTfJsFormat struct { -} - -// XPSTfLiteFormat: LINT.IfChange A model format used for mobile and IoT -// devices. See https://www.tensorflow.org/lite. -type XPSTfLiteFormat struct { -} - -// XPSTfSavedModelFormat: A tensorflow model format in SavedModel -// format. -type XPSTfSavedModelFormat struct { -} - -// XPSTimestampStats: The data statistics of a series of TIMESTAMP -// values. -type XPSTimestampStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // GranularStats: The string key is the pre-defined granularity. - // Currently supported: hour_of_day, day_of_week, month_of_year. - // Granularities finer that the granularity of timestamp data are not - // populated (e.g. if timestamps are at day granularity, then - // hour_of_day is not populated). - GranularStats map[string]XPSTimestampStatsGranularStats `json:"granularStats,omitempty"` - - MedianTimestampNanos int64 `json:"medianTimestampNanos,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") 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. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTimestampStatsGranularStats: Stats split by a defined in context -// granularity. -type XPSTimestampStatsGranularStats struct { - // Buckets: A map from granularity key to example count for that key. - // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means - // May). - Buckets map[string]string `json:"buckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Buckets") 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. "Buckets") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStatsGranularStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStatsGranularStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTrackMetricsEntry: Track matching model metrics for a single track -// match threshold and multiple label match confidence thresholds. Next -// tag: 6. -type XPSTrackMetricsEntry struct { - // ConfidenceMetricsEntries: Output only. Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - // Precision-recall curve is derived from them. - ConfidenceMetricsEntries []*XPSTrackMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: Output only. The intersection-over-union threshold - // value between bounding boxes across frames used to compute this - // metric entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanBoundingBoxIou: Output only. The mean bounding box iou over all - // confidence thresholds. - MeanBoundingBoxIou float64 `json:"meanBoundingBoxIou,omitempty"` - - // MeanMismatchRate: Output only. The mean mismatch rate over all - // confidence thresholds. - MeanMismatchRate float64 `json:"meanMismatchRate,omitempty"` - - // MeanTrackingAveragePrecision: Output only. The mean average precision - // over all confidence thresholds. - MeanTrackingAveragePrecision float64 `json:"meanTrackingAveragePrecision,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanBoundingBoxIou gensupport.JSONFloat64 `json:"meanBoundingBoxIou"` - MeanMismatchRate gensupport.JSONFloat64 `json:"meanMismatchRate"` - MeanTrackingAveragePrecision gensupport.JSONFloat64 `json:"meanTrackingAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanBoundingBoxIou = float64(s1.MeanBoundingBoxIou) - s.MeanMismatchRate = float64(s1.MeanMismatchRate) - s.MeanTrackingAveragePrecision = float64(s1.MeanTrackingAveragePrecision) - return nil -} - -// XPSTrackMetricsEntryConfidenceMetricsEntry: Metrics for a single -// confidence threshold. Next tag: 6. -type XPSTrackMetricsEntryConfidenceMetricsEntry struct { - // BoundingBoxIou: Output only. Bounding box intersection-over-union - // precision. Measures how well the bounding boxes overlap between each - // other (e.g. complete overlap or just barely above iou_threshold). - BoundingBoxIou float64 `json:"boundingBoxIou,omitempty"` - - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // MismatchRate: Output only. Mismatch rate, which measures the tracking - // consistency, i.e. correctness of instance ID continuity. - MismatchRate float64 `json:"mismatchRate,omitempty"` - - // TrackingPrecision: Output only. Tracking precision. - TrackingPrecision float64 `json:"trackingPrecision,omitempty"` - - // TrackingRecall: Output only. Tracking recall. - TrackingRecall float64 `json:"trackingRecall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BoundingBoxIou") 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. "BoundingBoxIou") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - var s1 struct { - BoundingBoxIou gensupport.JSONFloat64 `json:"boundingBoxIou"` - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - MismatchRate gensupport.JSONFloat64 `json:"mismatchRate"` - TrackingPrecision gensupport.JSONFloat64 `json:"trackingPrecision"` - TrackingRecall gensupport.JSONFloat64 `json:"trackingRecall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxIou = float64(s1.BoundingBoxIou) - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.MismatchRate = float64(s1.MismatchRate) - s.TrackingPrecision = float64(s1.TrackingPrecision) - s.TrackingRecall = float64(s1.TrackingRecall) - return nil -} - -// XPSTrainResponse: Next ID: 18 -type XPSTrainResponse struct { - // DeployedModelSizeBytes: Estimated model size in bytes once deployed. - DeployedModelSizeBytes int64 `json:"deployedModelSizeBytes,omitempty,string"` - - // ErrorAnalysisConfigs: Optional vision model error analysis - // configuration. The field is set when model error analysis is enabled - // in the training request. The results of error analysis will be binded - // together with evaluation results (in the format of AnnotatedExample). - ErrorAnalysisConfigs []*XPSVisionErrorAnalysisConfig `json:"errorAnalysisConfigs,omitempty"` - - // EvaluatedExampleSet: Examples used to evaluate the model (usually the - // test set), with the predicted annotations. The file_spec should point - // to recordio file(s) of AnnotatedExample. For each returned example, - // the example_id_token and annotations predicted by the model must be - // set. The example payload can and is recommended to be omitted. - EvaluatedExampleSet *XPSExampleSet `json:"evaluatedExampleSet,omitempty"` - - // EvaluationMetricsSet: The trained model evaluation metrics. This can - // be optionally returned. - EvaluationMetricsSet *XPSEvaluationMetricsSet `json:"evaluationMetricsSet,omitempty"` - - // ExplanationConfigs: VisionExplanationConfig for XAI on test set. - // Optional for when XAI is enable in training request. - ExplanationConfigs []*XPSResponseExplanationSpec `json:"explanationConfigs,omitempty"` - - ImageClassificationTrainResp *XPSImageClassificationTrainResponse `json:"imageClassificationTrainResp,omitempty"` - - ImageObjectDetectionTrainResp *XPSImageObjectDetectionModelSpec `json:"imageObjectDetectionTrainResp,omitempty"` - - ImageSegmentationTrainResp *XPSImageSegmentationTrainResponse `json:"imageSegmentationTrainResp,omitempty"` - - // ModelToken: Token that represents the trained model. This is - // considered immutable and is persisted in AutoML. xPS can put their - // own proto in the byte string, to e.g. point to the model checkpoints. - // The token is passed to other xPS APIs to refer to the model. - ModelToken string `json:"modelToken,omitempty"` - - SpeechTrainResp *XPSSpeechModelSpec `json:"speechTrainResp,omitempty"` - - TablesTrainResp *XPSTablesTrainResponse `json:"tablesTrainResp,omitempty"` - - TextToSpeechTrainResp *XPSTextToSpeechTrainResponse `json:"textToSpeechTrainResp,omitempty"` - - // TextTrainResp: Will only be needed for uCAIP from Beta. - TextTrainResp *XPSTextTrainResponse `json:"textTrainResp,omitempty"` - - TranslationTrainResp *XPSTranslationTrainResponse `json:"translationTrainResp,omitempty"` - - VideoActionRecognitionTrainResp *XPSVideoActionRecognitionTrainResponse `json:"videoActionRecognitionTrainResp,omitempty"` - - VideoClassificationTrainResp *XPSVideoClassificationTrainResponse `json:"videoClassificationTrainResp,omitempty"` - - VideoObjectTrackingTrainResp *XPSVideoObjectTrackingTrainResponse `json:"videoObjectTrackingTrainResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "DeployedModelSizeBytes") 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. "DeployedModelSizeBytes") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTrainingObjectivePoint struct { - // CreateTime: The time at which this point was recorded. - CreateTime string `json:"createTime,omitempty"` - - // Value: The objective value when this point was recorded. - Value float64 `json:"value,omitempty"` - - // 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 *XPSTrainingObjectivePoint) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainingObjectivePoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrainingObjectivePoint) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrainingObjectivePoint - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// XPSTranslationEvaluationMetrics: Evaluation metrics for the dataset. -type XPSTranslationEvaluationMetrics struct { - // BaseBleuScore: BLEU score for base model. - BaseBleuScore float64 `json:"baseBleuScore,omitempty"` - - // BleuScore: BLEU score. - BleuScore float64 `json:"bleuScore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BaseBleuScore") 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. "BaseBleuScore") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTranslationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTranslationEvaluationMetrics - var s1 struct { - BaseBleuScore gensupport.JSONFloat64 `json:"baseBleuScore"` - BleuScore gensupport.JSONFloat64 `json:"bleuScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BaseBleuScore = float64(s1.BaseBleuScore) - s.BleuScore = float64(s1.BleuScore) - return nil -} - -// XPSTranslationPreprocessResponse: Translation preprocess response. -type XPSTranslationPreprocessResponse struct { - // ParsedExampleCount: Total example count parsed. - ParsedExampleCount int64 `json:"parsedExampleCount,omitempty,string"` - - // ValidExampleCount: Total valid example count. - ValidExampleCount int64 `json:"validExampleCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ParsedExampleCount") - // 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. "ParsedExampleCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTranslationTrainResponse: Train response for translation. -type XPSTranslationTrainResponse struct { - // ModelType: Type of the model. - // - // Possible values: - // "MODEL_TYPE_UNSPECIFIED" - Default - // "LEGACY" - Legacy model. Will be deprecated. - // "CURRENT" - Current model. - ModelType string `json:"modelType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelType") 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. "ModelType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTuningTrial: Metrics for a tuning job generated, will get -// forwarded to Stackdriver as model tuning logs. Setting this as a -// standalone message out of CreateModelMetadata to avoid confusion as -// we expose this message only to users. -type XPSTuningTrial struct { - // ModelStructure: Model parameters for the trial. - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // TrainingObjectivePoint: The optimization objective evaluation of the - // eval split data. - TrainingObjectivePoint *XPSTrainingObjectivePoint `json:"trainingObjectivePoint,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") 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. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTuningTrial) MarshalJSON() ([]byte, error) { - type NoMethod XPSTuningTrial - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoActionMetricsEntry: The Evaluation metrics entry given a -// specific precision_window_length. -type XPSVideoActionMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSVideoActionMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` - - // PrecisionWindowLength: This VideoActionMetricsEntry is calculated - // based on this prediction window length. If the predicted action's - // timestamp is inside the time window whose center is the ground truth - // action's timestamp with this specific length, the prediction result - // is treated as a true positive. - PrecisionWindowLength string `json:"precisionWindowLength,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") 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. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntry - var s1 struct { - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSVideoActionMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSVideoActionMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Output only. Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Output only. Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSVideoActionRecognitionEvaluationMetrics: Model evaluation metrics -// for video action recognition. -type XPSVideoActionRecognitionEvaluationMetrics struct { - // EvaluatedActionCount: Output only. The number of ground truth actions - // used to create this evaluation. - EvaluatedActionCount int64 `json:"evaluatedActionCount,omitempty"` - - // VideoActionMetricsEntries: Output only. The metric entries for - // precision window lengths: 1s,2s,3s,4s, 5s. - VideoActionMetricsEntries []*XPSVideoActionMetricsEntry `json:"videoActionMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EvaluatedActionCount") 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. "EvaluatedActionCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoActionRecognitionTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // 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. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoBatchPredictOperationMetadata struct { - // OutputExamples: All the partial batch prediction results that are - // completed at the moment. Output examples are sorted by completion - // time. The order will not be changed. Each output example should be - // the path of a single RecordIO file of AnnotatedExamples. - OutputExamples []string `json:"outputExamples,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExamples") 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. "OutputExamples") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoBatchPredictOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoBatchPredictOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoClassificationTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // 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. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSVideoExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") 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. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoModelArtifactSpec struct { - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExportArtifact") 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. "ExportArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoObjectTrackingEvaluationMetrics: Model evaluation metrics for -// ObjectTracking problems. Next tag: 10. -type XPSVideoObjectTrackingEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: Output only. The single metric for - // bounding boxes evaluation: the mean_average_precision averaged over - // all bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: Output only. The bounding boxes match - // metrics for each Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingboxCount: The number of bounding boxes used for - // model evaluation. - EvaluatedBoundingboxCount int64 `json:"evaluatedBoundingboxCount,omitempty"` - - // EvaluatedFrameCount: The number of video frames used for model - // evaluation. - EvaluatedFrameCount int64 `json:"evaluatedFrameCount,omitempty"` - - // EvaluatedTrackCount: The number of tracks used for model evaluation. - EvaluatedTrackCount int64 `json:"evaluatedTrackCount,omitempty"` - - // TrackMeanAveragePrecision: Output only. The single metric for tracks - // accuracy evaluation: the mean_average_precision averaged over all - // track_metrics_entries. - TrackMeanAveragePrecision float64 `json:"trackMeanAveragePrecision,omitempty"` - - // TrackMeanBoundingBoxIou: Output only. The single metric for tracks - // bounding box iou evaluation: the mean_bounding_box_iou averaged over - // all track_metrics_entries. - TrackMeanBoundingBoxIou float64 `json:"trackMeanBoundingBoxIou,omitempty"` - - // TrackMeanMismatchRate: Output only. The single metric for tracking - // consistency evaluation: the mean_mismatch_rate averaged over all - // track_metrics_entries. - TrackMeanMismatchRate float64 `json:"trackMeanMismatchRate,omitempty"` - - // TrackMetricsEntries: Output only. The tracks match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - TrackMetricsEntries []*XPSTrackMetricsEntry `json:"trackMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") 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. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - TrackMeanAveragePrecision gensupport.JSONFloat64 `json:"trackMeanAveragePrecision"` - TrackMeanBoundingBoxIou gensupport.JSONFloat64 `json:"trackMeanBoundingBoxIou"` - TrackMeanMismatchRate gensupport.JSONFloat64 `json:"trackMeanMismatchRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - s.TrackMeanAveragePrecision = float64(s1.TrackMeanAveragePrecision) - s.TrackMeanBoundingBoxIou = float64(s1.TrackMeanBoundingBoxIou) - s.TrackMeanMismatchRate = float64(s1.TrackMeanMismatchRate) - return nil -} - -type XPSVideoObjectTrackingTrainResponse struct { - // ExportModelSpec: Populated for AutoML request only. - ExportModelSpec *XPSVideoExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ExportModelSpec") 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. "ExportModelSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoTrainingOperationMetadata struct { - // TrainCostMilliNodeHour: This is an estimation of the node hours - // necessary for training a model, expressed in milli node hours (i.e. - // 1,000 value in this field means 1 node hour). A node hour represents - // the time a virtual machine spends running your training job. The cost - // of one node running for one hour is a node hour. - TrainCostMilliNodeHour int64 `json:"trainCostMilliNodeHour,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "TrainCostMilliNodeHour") 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. "TrainCostMilliNodeHour") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisionErrorAnalysisConfig: The vision model error analysis -// configuration. Next tag: 3 -type XPSVisionErrorAnalysisConfig struct { - // ExampleCount: The number of query examples in error analysis. - ExampleCount int64 `json:"exampleCount,omitempty"` - - // QueryType: The query type used in retrieval. The enum values are - // frozen in the foreseeable future. - // - // Possible values: - // "QUERY_TYPE_UNSPECIFIED" - Unspecified query type for model error - // analysis. - // "QUERY_TYPE_ALL_SIMILAR" - Query similar samples across all classes - // in the dataset. - // "QUERY_TYPE_SAME_CLASS_SIMILAR" - Query similar samples from the - // same class of the input sample. - // "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - Query dissimilar samples from - // the same class of the input sample. - QueryType string `json:"queryType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") 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. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionErrorAnalysisConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionErrorAnalysisConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVisionTrainingOperationMetadata struct { - // ExplanationUsage: Aggregated infra usage within certain time period, - // for billing report purpose if XAI is enable in training request. - ExplanationUsage *InfraUsage `json:"explanationUsage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationUsage") 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. "ExplanationUsage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisualization: Visualization configurations for image explanation. -type XPSVisualization struct { - // ClipPercentLowerbound: Excludes attributions below the specified - // percentile, from the highlighted areas. Defaults to 62. - ClipPercentLowerbound float64 `json:"clipPercentLowerbound,omitempty"` - - // ClipPercentUpperbound: Excludes attributions above the specified - // percentile from the highlighted areas. Using the - // clip_percent_upperbound and clip_percent_lowerbound together can be - // useful for filtering out noise and making it easier to see areas of - // strong attribution. Defaults to 99.9. - ClipPercentUpperbound float64 `json:"clipPercentUpperbound,omitempty"` - - // ColorMap: The color scheme used for the highlighted areas. Defaults - // to PINK_GREEN for Integrated Gradients attribution, which shows - // positive attributions in green and negative in pink. Defaults to - // VIRIDIS for XRAI attribution, which highlights the most influential - // regions in yellow and the least influential in blue. - // - // Possible values: - // "COLOR_MAP_UNSPECIFIED" - Should not be used. - // "PINK_GREEN" - Positive: green. Negative: pink. - // "VIRIDIS" - Viridis color map: A perceptually uniform color mapping - // which is easier to see by those with colorblindness and progresses - // from yellow to green to blue. Positive: yellow. Negative: blue. - // "RED" - Positive: red. Negative: red. - // "GREEN" - Positive: green. Negative: green. - // "RED_GREEN" - Positive: green. Negative: red. - // "PINK_WHITE_GREEN" - PiYG palette. - ColorMap string `json:"colorMap,omitempty"` - - // OverlayType: How the original image is displayed in the - // visualization. Adjusting the overlay can help increase visual clarity - // if the original image makes it difficult to view the visualization. - // Defaults to NONE. - // - // Possible values: - // "OVERLAY_TYPE_UNSPECIFIED" - Default value. This is the same as - // NONE. - // "NONE" - No overlay. - // "ORIGINAL" - The attributions are shown on top of the original - // image. - // "GRAYSCALE" - The attributions are shown on top of grayscaled - // version of the original image. - // "MASK_BLACK" - The attributions are used as a mask to reveal - // predictive parts of the image and hide the un-predictive parts. - OverlayType string `json:"overlayType,omitempty"` - - // Polarity: Whether to only highlight pixels with positive - // contributions, negative or both. Defaults to POSITIVE. - // - // Possible values: - // "POLARITY_UNSPECIFIED" - Default value. This is the same as - // POSITIVE. - // "POSITIVE" - Highlights the pixels/outlines that were most - // influential to the model's prediction. - // "NEGATIVE" - Setting polarity to negative highlights areas that - // does not lead to the models's current prediction. - // "BOTH" - Shows both positive and negative attributions. - Polarity string `json:"polarity,omitempty"` - - // Type: Type of the image visualization. Only applicable to Integrated - // Gradients attribution. OUTLINES shows regions of attribution, while - // PIXELS shows per-pixel attribution. Defaults to OUTLINES. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Should not be used. - // "PIXELS" - Shows which pixel contributed to the image prediction. - // "OUTLINES" - Shows which region contributed to the image prediction - // by outlining the region. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClipPercentLowerbound") 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. "ClipPercentLowerbound") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisualization) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisualization - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVisualization) UnmarshalJSON(data []byte) error { - type NoMethod XPSVisualization - var s1 struct { - ClipPercentLowerbound gensupport.JSONFloat64 `json:"clipPercentLowerbound"` - ClipPercentUpperbound gensupport.JSONFloat64 `json:"clipPercentUpperbound"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ClipPercentLowerbound = float64(s1.ClipPercentLowerbound) - s.ClipPercentUpperbound = float64(s1.ClipPercentUpperbound) - return nil -} - -type XPSXpsOperationMetadata struct { - // ExampleCount: Optional. XPS server can opt to provide example count - // of the long running operation (e.g. training, data importing, batch - // prediction). - ExampleCount int64 `json:"exampleCount,omitempty,string"` - - // ReportingMetrics: Metrics for the operation. By the time the - // operation is terminated (whether succeeded or failed) as returned - // from XPS, AutoML BE assumes the metrics are finalized. AutoML BE - // transparently posts the metrics to Chemist if it's not empty, - // regardless of the response content or error type. If user is supposed - // to be charged in case of cancellation/error, this field should be - // set. In the case where the type of LRO doesn't require any billing, - // this field should be left unset. - ReportingMetrics *XPSReportingMetrics `json:"reportingMetrics,omitempty"` - - TablesTrainingOperationMetadata *XPSTablesTrainingOperationMetadata `json:"tablesTrainingOperationMetadata,omitempty"` - - VideoBatchPredictOperationMetadata *XPSVideoBatchPredictOperationMetadata `json:"videoBatchPredictOperationMetadata,omitempty"` - - VideoTrainingOperationMetadata *XPSVideoTrainingOperationMetadata `json:"videoTrainingOperationMetadata,omitempty"` - - VisionTrainingOperationMetadata *XPSVisionTrainingOperationMetadata `json:"visionTrainingOperationMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") 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. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXpsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSXpsOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSXraiAttribution: An explanation method that redistributes -// Integrated Gradients attributions to segmented regions, taking -// advantage of the model's fully differentiable structure. Refer to -// this paper for more details: https://arxiv.org/abs/1906.02825 Only -// supports image Models (modality is IMAGE). -type XPSXraiAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is met within the desired error range. Valid range of - // its value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") 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. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXraiAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSXraiAttribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // method id "language.documents.analyzeEntities": type DocumentsAnalyzeEntitiesCall struct { diff --git a/places/v1/places-api.json b/places/v1/places-api.json index f4315014a05..c1a7f1e490d 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -8,6 +8,9 @@ "https://www.googleapis.com/auth/maps-platform.places": { "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places" }, + "https://www.googleapis.com/auth/maps-platform.places.autocomplete": { + "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.autocomplete" + }, "https://www.googleapis.com/auth/maps-platform.places.details": { "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.details" }, @@ -119,6 +122,26 @@ "resources": { "places": { "methods": { + "autocomplete": { + "description": "Returns predictions for the given input.", + "flatPath": "v1/places:autocomplete", + "httpMethod": "POST", + "id": "places.places.autocomplete", + "parameterOrder": [], + "parameters": {}, + "path": "v1/places:autocomplete", + "request": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequest" + }, + "response": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/maps-platform.places", + "https://www.googleapis.com/auth/maps-platform.places.autocomplete" + ] + }, "get": { "description": "Get the details of a place based on its resource name, which is a string in the `places/{place_id}` format.", "flatPath": "v1/places/{placesId}", @@ -144,6 +167,11 @@ "description": "Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.", "location": "query", "type": "string" + }, + "sessionToken": { + "description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -248,7 +276,7 @@ } } }, - "revision": "20240114", + "revision": "20240219", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -285,6 +313,223 @@ }, "type": "object" }, + "GoogleMapsPlacesV1AutocompletePlacesRequest": { + "description": "Request proto for AutocompletePlaces.", + "id": "GoogleMapsPlacesV1AutocompletePlacesRequest", + "properties": { + "includeQueryPredictions": { + "description": "Optional. If true, the response will include both Place and query predictions. Otherwise the response will only return Place predictions.", + "type": "boolean" + }, + "includedPrimaryTypes": { + "description": "Optional. Included primary Place type (for example, \"restaurant\" or \"gas_station\") from https://developers.google.com/maps/documentation/places/web-service/place-types. A Place is only returned if its primary type is included in this list. Up to 5 values can be specified. If no types are specified, all Place types are returned.", + "items": { + "type": "string" + }, + "type": "array" + }, + "includedRegionCodes": { + "description": "Optional. Only include results in the specified regions, specified as up to 15 CLDR two-character region codes. An empty set will not restrict the results. If both `location_restriction` and `included_region_codes` are set, the results will be located in the area of intersection.", + "items": { + "type": "string" + }, + "type": "array" + }, + "input": { + "description": "Required. The text string on which to search.", + "type": "string" + }, + "inputOffset": { + "description": "Optional. A zero-based Unicode character offset of `input` indicating the cursor position in `input`. The cursor position may influence what predictions are returned. If empty, defaults to the length of `input`.", + "format": "int32", + "type": "integer" + }, + "languageCode": { + "description": "Optional. The language in which to return results. Defaults to en-US. The results may be in mixed languages if the language used in `input` is different from `language_code` or if the returned Place does not have a translation from the local language to `language_code`.", + "type": "string" + }, + "locationBias": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias", + "description": "Optional. Bias results to a specified location. At most one of `location_bias` or `location_restriction` should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal." + }, + "locationRestriction": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction", + "description": "Optional. Restrict results to a specified location. At most one of `location_bias` or `location_restriction` should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal." + }, + "origin": { + "$ref": "GoogleTypeLatLng", + "description": "Optional. The origin point from which to calculate geodesic distance to the destination (returned as `distance_meters`). If this value is omitted, geodesic distance will not be returned." + }, + "regionCode": { + "description": "Optional. The region code, specified as a CLDR two-character region code. This affects address formatting, result ranking, and may influence what results are returned. This does not restrict results to the specified region. To restrict results to a region, use `region_code_restriction`.", + "type": "string" + }, + "sessionToken": { + "description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias": { + "description": "The region to search. The results may be biased around the specified region.", + "id": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias", + "properties": { + "circle": { + "$ref": "GoogleMapsPlacesV1Circle", + "description": "A circle defined by a center point and radius." + }, + "rectangle": { + "$ref": "GoogleGeoTypeViewport", + "description": "A viewport defined by a northeast and a southwest corner." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction": { + "description": "The region to search. The results will be restricted to the specified region.", + "id": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction", + "properties": { + "circle": { + "$ref": "GoogleMapsPlacesV1Circle", + "description": "A circle defined by a center point and radius." + }, + "rectangle": { + "$ref": "GoogleGeoTypeViewport", + "description": "A viewport defined by a northeast and a southwest corner." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponse": { + "description": "Response proto for AutocompletePlaces.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponse", + "properties": { + "suggestions": { + "description": "Contains a list of suggestions, ordered in descending order of relevance.", + "items": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion": { + "description": "An Autocomplete suggestion result.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion", + "properties": { + "placePrediction": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction", + "description": "A prediction for a Place." + }, + "queryPrediction": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction", + "description": "A prediction for a query." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText": { + "description": "Text representing a Place or query prediction. The text may be used as is or formatted.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "properties": { + "matches": { + "description": "A list of string ranges identifying where the input request matched in `text`. The ranges can be used to format specific parts of `text`. The substrings may not be exact matches of `input` if the matching was determined by criteria other than string matching (for example, spell corrections or transliterations). These values are Unicode character offsets of `text`. The ranges are guaranteed to be ordered in increasing offset values.", + "items": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange" + }, + "type": "array" + }, + "text": { + "description": "Text that may be used as is or formatted with `matches`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction": { + "description": "Prediction results for a Place Autocomplete prediction.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction", + "properties": { + "distanceMeters": { + "description": "The length of the geodesic in meters from `origin` if `origin` is specified. Certain predictions such as routes may not populate this field.", + "format": "int32", + "type": "integer" + }, + "place": { + "description": "The resource name of the suggested Place. This name can be used in other APIs that accept Place names.", + "type": "string" + }, + "placeId": { + "description": "The unique identifier of the suggested Place. This identifier can be used in other APIs that accept Place IDs.", + "type": "string" + }, + "structuredFormat": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", + "description": "A breakdown of the Place prediction into main text containing the name of the Place and secondary text containing additional disambiguating features (such as a city or region). `structured_format` is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to use `text` instead. They are two different ways to represent a Place prediction. Users should not try to parse `structured_format` into `text` or vice versa." + }, + "text": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "Contains the human-readable name for the returned result. For establishment results, this is usually the business name and address. `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a Place prediction. Users should not try to parse `structured_format` into `text` or vice versa. This text may be different from the `display_name` returned by GetPlace. May be in mixed languages if the request `input` and `language_code` are in different languages or if the Place does not have a translation from the local language to `language_code`." + }, + "types": { + "description": "List of types that apply to this Place from Table A or Table B in https://developers.google.com/maps/documentation/places/web-service/place-types. A type is a categorization of a Place. Places with shared types will share similar characteristics.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction": { + "description": "Prediction results for a Query Autocomplete prediction.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction", + "properties": { + "structuredFormat": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", + "description": "A breakdown of the query prediction into main text containing the query and secondary text containing additional disambiguating features (such as a city or region). `structured_format` is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to use `text` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa." + }, + "text": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "The predicted text. This text does not represent a Place, but rather a text query that could be used in a search endpoint (for example, TextSearch). `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa. May be in mixed languages if the request `input` and `language_code` are in different languages or if part of the query does not have a translation from the local language to `language_code`." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange": { + "description": "Identifies a substring within a given text.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange", + "properties": { + "endOffset": { + "description": "Zero-based offset of the last Unicode character (exclusive).", + "format": "int32", + "type": "integer" + }, + "startOffset": { + "description": "Zero-based offset of the first Unicode character of the string (inclusive).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat": { + "description": "Contains a breakdown of a Place or query prediction into main text and secondary text. For Place predictions, the main text contains the specific name of the Place. For query predictions, the main text contains the query. The secondary text contains additional disambiguating features (such as a city or region) to further identify the Place or refine the query.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", + "properties": { + "mainText": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "Represents the name of the Place or query." + }, + "secondaryText": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "Represents additional disambiguating features (such as a city or region) to further identify the Place or refine the query." + } + }, + "type": "object" + }, "GoogleMapsPlacesV1Circle": { "description": "Circle with a LatLng as center and radius.", "id": "GoogleMapsPlacesV1Circle", @@ -653,7 +898,7 @@ "description": "Payment options the place accepts. If a payment option data is not available, the payment option field will be unset." }, "photos": { - "description": "Information (including references) about photos of this place.", + "description": "Information (including references) about photos of this place. A maximum of 10 photos can be returned.", "items": { "$ref": "GoogleMapsPlacesV1Photo" }, @@ -716,7 +961,7 @@ "type": "boolean" }, "reviews": { - "description": "List of reviews about this place, sorted by relevance.", + "description": "List of reviews about this place, sorted by relevance. A maximum of 5 reviews can be returned.", "items": { "$ref": "GoogleMapsPlacesV1Review" }, diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index d81c1f7807f..2b0f224a554 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -108,6 +108,10 @@ const ( // Private Service: https://www.googleapis.com/auth/maps-platform.places MapsPlatformPlacesScope = "https://www.googleapis.com/auth/maps-platform.places" + // Private Service: + // https://www.googleapis.com/auth/maps-platform.places.autocomplete + MapsPlatformPlacesAutocompleteScope = "https://www.googleapis.com/auth/maps-platform.places.autocomplete" + // Private Service: // https://www.googleapis.com/auth/maps-platform.places.details MapsPlatformPlacesDetailsScope = "https://www.googleapis.com/auth/maps-platform.places.details" @@ -126,6 +130,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/maps-platform.places", + "https://www.googleapis.com/auth/maps-platform.places.autocomplete", "https://www.googleapis.com/auth/maps-platform.places.details", "https://www.googleapis.com/auth/maps-platform.places.nearbysearch", "https://www.googleapis.com/auth/maps-platform.places.textsearch", @@ -283,6 +288,486 @@ func (s *GoogleMapsPlacesV1AuthorAttribution) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleMapsPlacesV1AutocompletePlacesRequest: Request proto for +// AutocompletePlaces. +type GoogleMapsPlacesV1AutocompletePlacesRequest struct { + // IncludeQueryPredictions: Optional. If true, the response will include + // both Place and query predictions. Otherwise the response will only + // return Place predictions. + IncludeQueryPredictions bool `json:"includeQueryPredictions,omitempty"` + + // IncludedPrimaryTypes: Optional. Included primary Place type (for + // example, "restaurant" or "gas_station") from + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // A Place is only returned if its primary type is included in this + // list. Up to 5 values can be specified. If no types are specified, all + // Place types are returned. + IncludedPrimaryTypes []string `json:"includedPrimaryTypes,omitempty"` + + // IncludedRegionCodes: Optional. Only include results in the specified + // regions, specified as up to 15 CLDR two-character region codes. An + // empty set will not restrict the results. If both + // `location_restriction` and `included_region_codes` are set, the + // results will be located in the area of intersection. + IncludedRegionCodes []string `json:"includedRegionCodes,omitempty"` + + // Input: Required. The text string on which to search. + Input string `json:"input,omitempty"` + + // InputOffset: Optional. A zero-based Unicode character offset of + // `input` indicating the cursor position in `input`. The cursor + // position may influence what predictions are returned. If empty, + // defaults to the length of `input`. + InputOffset int64 `json:"inputOffset,omitempty"` + + // LanguageCode: Optional. The language in which to return results. + // Defaults to en-US. The results may be in mixed languages if the + // language used in `input` is different from `language_code` or if the + // returned Place does not have a translation from the local language to + // `language_code`. + LanguageCode string `json:"languageCode,omitempty"` + + // LocationBias: Optional. Bias results to a specified location. At most + // one of `location_bias` or `location_restriction` should be set. If + // neither are set, the results will be biased by IP address, meaning + // the IP address will be mapped to an imprecise location and used as a + // biasing signal. + LocationBias *GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias `json:"locationBias,omitempty"` + + // LocationRestriction: Optional. Restrict results to a specified + // location. At most one of `location_bias` or `location_restriction` + // should be set. If neither are set, the results will be biased by IP + // address, meaning the IP address will be mapped to an imprecise + // location and used as a biasing signal. + LocationRestriction *GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction `json:"locationRestriction,omitempty"` + + // Origin: Optional. The origin point from which to calculate geodesic + // distance to the destination (returned as `distance_meters`). If this + // value is omitted, geodesic distance will not be returned. + Origin *GoogleTypeLatLng `json:"origin,omitempty"` + + // RegionCode: Optional. The region code, specified as a CLDR + // two-character region code. This affects address formatting, result + // ranking, and may influence what results are returned. This does not + // restrict results to the specified region. To restrict results to a + // region, use `region_code_restriction`. + RegionCode string `json:"regionCode,omitempty"` + + // SessionToken: Optional. A string which identifies an Autocomplete + // session for billing purposes. Must be a URL and filename safe base64 + // string with at most 36 ASCII characters in length. Otherwise an + // INVALID_ARGUMENT error is returned. The session begins when the user + // starts typing a query, and concludes when they select a place and a + // call to Place Details or Address Validation is made. Each session can + // have multiple queries, followed by one Place Details or Address + // Validation request. The credentials used for each request within a + // session must belong to the same Google Cloud Console project. Once a + // session has concluded, the token is no longer valid; your app must + // generate a fresh token for each session. If the `session_token` + // parameter is omitted, or if you reuse a session token, the session is + // charged as if no session token was provided (each request is billed + // separately). We recommend the following guidelines: * Use session + // tokens for all Place Autocomplete calls. * Generate a fresh token for + // each session. Using a version 4 UUID is recommended. * Ensure that + // the credentials used for all Place Autocomplete, Place Details, and + // Address Validation requests within a session belong to the same Cloud + // Console project. * Be sure to pass a unique session token for each + // new session. Using the same token for more than one session will + // result in each request being billed individually. + SessionToken string `json:"sessionToken,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "IncludeQueryPredictions") 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. "IncludeQueryPredictions") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias: The region +// to search. The results may be biased around the specified region. +type GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias struct { + // Circle: A circle defined by a center point and radius. + Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` + + // Rectangle: A viewport defined by a northeast and a southwest corner. + Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Circle") 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. "Circle") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction: The +// region to search. The results will be restricted to the specified +// region. +type GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction struct { + // Circle: A circle defined by a center point and radius. + Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` + + // Rectangle: A viewport defined by a northeast and a southwest corner. + Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Circle") 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. "Circle") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponse: Response proto for +// AutocompletePlaces. +type GoogleMapsPlacesV1AutocompletePlacesResponse struct { + // Suggestions: Contains a list of suggestions, ordered in descending + // order of relevance. + Suggestions []*GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion `json:"suggestions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Suggestions") 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. "Suggestions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion: An +// Autocomplete suggestion result. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion struct { + // PlacePrediction: A prediction for a Place. + PlacePrediction *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction `json:"placePrediction,omitempty"` + + // QueryPrediction: A prediction for a query. + QueryPrediction *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction `json:"queryPrediction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PlacePrediction") 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. "PlacePrediction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText: +// +// Text representing a Place or query prediction. The text may be used +// +// as is or formatted. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText struct { + // Matches: A list of string ranges identifying where the input request + // matched in `text`. The ranges can be used to format specific parts of + // `text`. The substrings may not be exact matches of `input` if the + // matching was determined by criteria other than string matching (for + // example, spell corrections or transliterations). These values are + // Unicode character offsets of `text`. The ranges are guaranteed to be + // ordered in increasing offset values. + Matches []*GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange `json:"matches,omitempty"` + + // Text: Text that may be used as is or formatted with `matches`. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Matches") 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. "Matches") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction: +// +// Prediction results for a Place Autocomplete prediction. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction struct { + // DistanceMeters: The length of the geodesic in meters from `origin` if + // `origin` is specified. Certain predictions such as routes may not + // populate this field. + DistanceMeters int64 `json:"distanceMeters,omitempty"` + + // Place: The resource name of the suggested Place. This name can be + // used in other APIs that accept Place names. + Place string `json:"place,omitempty"` + + // PlaceId: The unique identifier of the suggested Place. This + // identifier can be used in other APIs that accept Place IDs. + PlaceId string `json:"placeId,omitempty"` + + // StructuredFormat: A breakdown of the Place prediction into main text + // containing the name of the Place and secondary text containing + // additional disambiguating features (such as a city or region). + // `structured_format` is recommended for developers who wish to show + // two separate, but related, UI elements. Developers who wish to show a + // single UI element may want to use `text` instead. They are two + // different ways to represent a Place prediction. Users should not try + // to parse `structured_format` into `text` or vice versa. + StructuredFormat *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat `json:"structuredFormat,omitempty"` + + // Text: Contains the human-readable name for the returned result. For + // establishment results, this is usually the business name and address. + // `text` is recommended for developers who wish to show a single UI + // element. Developers who wish to show two separate, but related, UI + // elements may want to use `structured_format` instead. They are two + // different ways to represent a Place prediction. Users should not try + // to parse `structured_format` into `text` or vice versa. This text may + // be different from the `display_name` returned by GetPlace. May be in + // mixed languages if the request `input` and `language_code` are in + // different languages or if the Place does not have a translation from + // the local language to `language_code`. + Text *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"text,omitempty"` + + // Types: List of types that apply to this Place from Table A or Table B + // in + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // A type is a categorization of a Place. Places with shared types will + // share similar characteristics. + Types []string `json:"types,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DistanceMeters") 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. "DistanceMeters") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction: +// +// Prediction results for a Query Autocomplete prediction. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction struct { + // StructuredFormat: A breakdown of the query prediction into main text + // containing the query and secondary text containing additional + // disambiguating features (such as a city or region). + // `structured_format` is recommended for developers who wish to show + // two separate, but related, UI elements. Developers who wish to show a + // single UI element may want to use `text` instead. They are two + // different ways to represent a query prediction. Users should not try + // to parse `structured_format` into `text` or vice versa. + StructuredFormat *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat `json:"structuredFormat,omitempty"` + + // Text: The predicted text. This text does not represent a Place, but + // rather a text query that could be used in a search endpoint (for + // example, TextSearch). `text` is recommended for developers who wish + // to show a single UI element. Developers who wish to show two + // separate, but related, UI elements may want to use + // `structured_format` instead. They are two different ways to represent + // a query prediction. Users should not try to parse `structured_format` + // into `text` or vice versa. May be in mixed languages if the request + // `input` and `language_code` are in different languages or if part of + // the query does not have a translation from the local language to + // `language_code`. + Text *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StructuredFormat") 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. "StructuredFormat") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange: +// Identifies a substring within a given text. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange struct { + // EndOffset: Zero-based offset of the last Unicode character + // (exclusive). + EndOffset int64 `json:"endOffset,omitempty"` + + // StartOffset: Zero-based offset of the first Unicode character of the + // string (inclusive). + StartOffset int64 `json:"startOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") 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. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat +// : Contains a breakdown of a Place or query prediction into main text +// and secondary text. For Place predictions, the main text contains the +// specific name of the Place. For query predictions, the main text +// contains the query. The secondary text contains additional +// disambiguating features (such as a city or region) to further +// identify the Place or refine the query. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat struct { + // MainText: Represents the name of the Place or query. + MainText *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"mainText,omitempty"` + + // SecondaryText: Represents additional disambiguating features (such as + // a city or region) to further identify the Place or refine the query. + SecondaryText *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"secondaryText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MainText") 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. "MainText") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleMapsPlacesV1Circle: Circle with a LatLng as center and radius. type GoogleMapsPlacesV1Circle struct { // Center: Required. Center latitude and longitude. The range of @@ -773,7 +1258,7 @@ type GoogleMapsPlacesV1Place struct { PaymentOptions *GoogleMapsPlacesV1PlacePaymentOptions `json:"paymentOptions,omitempty"` // Photos: Information (including references) about photos of this - // place. + // place. A maximum of 10 photos can be returned. Photos []*GoogleMapsPlacesV1Photo `json:"photos,omitempty"` // PlusCode: Plus code of the place location lat/long. @@ -827,7 +1312,8 @@ type GoogleMapsPlacesV1Place struct { // Restroom: Place has restroom. Restroom bool `json:"restroom,omitempty"` - // Reviews: List of reviews about this place, sorted by relevance. + // Reviews: List of reviews about this place, sorted by relevance. A + // maximum of 5 reviews can be returned. Reviews []*GoogleMapsPlacesV1Review `json:"reviews,omitempty"` // ServesBeer: Specifies if the place serves beer. @@ -2060,6 +2546,135 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "places.places.autocomplete": + +type PlacesAutocompleteCall struct { + s *Service + googlemapsplacesv1autocompleteplacesrequest *GoogleMapsPlacesV1AutocompletePlacesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Autocomplete: Returns predictions for the given input. +func (r *PlacesService) Autocomplete(googlemapsplacesv1autocompleteplacesrequest *GoogleMapsPlacesV1AutocompletePlacesRequest) *PlacesAutocompleteCall { + c := &PlacesAutocompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlemapsplacesv1autocompleteplacesrequest = googlemapsplacesv1autocompleteplacesrequest + 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 *PlacesAutocompleteCall) Fields(s ...googleapi.Field) *PlacesAutocompleteCall { + 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 *PlacesAutocompleteCall) Context(ctx context.Context) *PlacesAutocompleteCall { + 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 *PlacesAutocompleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlacesAutocompleteCall) 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.googlemapsplacesv1autocompleteplacesrequest) + 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/places:autocomplete") + 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 "places.places.autocomplete" call. +// Exactly one of *GoogleMapsPlacesV1AutocompletePlacesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleMapsPlacesV1AutocompletePlacesResponse.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 *PlacesAutocompleteCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1AutocompletePlacesResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleMapsPlacesV1AutocompletePlacesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns predictions for the given input.", + // "flatPath": "v1/places:autocomplete", + // "httpMethod": "POST", + // "id": "places.places.autocomplete", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/places:autocomplete", + // "request": { + // "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequest" + // }, + // "response": { + // "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/maps-platform.places", + // "https://www.googleapis.com/auth/maps-platform.places.autocomplete" + // ] + // } + +} + // method id "places.places.get": type PlacesGetCall struct { @@ -2103,6 +2718,33 @@ func (c *PlacesGetCall) RegionCode(regionCode string) *PlacesGetCall { return c } +// SessionToken sets the optional parameter "sessionToken": A string +// which identifies an Autocomplete session for billing purposes. Must +// be a URL and filename safe base64 string with at most 36 ASCII +// characters in length. Otherwise an INVALID_ARGUMENT error is +// returned. The session begins when the user starts typing a query, and +// concludes when they select a place and a call to Place Details or +// Address Validation is made. Each session can have multiple queries, +// followed by one Place Details or Address Validation request. The +// credentials used for each request within a session must belong to the +// same Google Cloud Console project. Once a session has concluded, the +// token is no longer valid; your app must generate a fresh token for +// each session. If the `session_token` parameter is omitted, or if you +// reuse a session token, the session is charged as if no session token +// was provided (each request is billed separately). We recommend the +// following guidelines: * Use session tokens for all Place Autocomplete +// calls. * Generate a fresh token for each session. Using a version 4 +// UUID is recommended. * Ensure that the credentials used for all Place +// Autocomplete, Place Details, and Address Validation requests within a +// session belong to the same Cloud Console project. * Be sure to pass a +// unique session token for each new session. Using the same token for +// more than one session will result in each request being billed +// individually. +func (c *PlacesGetCall) SessionToken(sessionToken string) *PlacesGetCall { + c.urlParams_.Set("sessionToken", sessionToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -2226,6 +2868,11 @@ func (c *PlacesGetCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1Pla // "description": "Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.", // "location": "query", // "type": "string" + // }, + // "sessionToken": { + // "description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", diff --git a/policysimulator/v1/policysimulator-api.json b/policysimulator/v1/policysimulator-api.json index babf3ebccc0..4acf3d3dcd8 100644 --- a/policysimulator/v1/policysimulator-api.json +++ b/policysimulator/v1/policysimulator-api.json @@ -356,6 +356,146 @@ "resources": { "locations": { "resources": { + "orgPolicyViolationsPreviews": { + "methods": { + "create": { + "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orgPolicyViolationsPreviewId": { + "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/orgPolicyViolationsPreviews", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "orgPolicyViolations": { + "methods": { + "list": { + "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/orgPolicyViolations", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "replays": { "methods": { "create": { @@ -707,7 +847,7 @@ } } }, - "revision": "20240121", + "revision": "20240218", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1174,6 +1314,42 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse": { + "description": "ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.", + "id": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolationsPreviews": { + "description": "The list of OrgPolicyViolationsPreview", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse": { + "description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", + "id": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolations": { + "description": "The list of OrgPolicyViolations", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolation" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1ListReplayResultsResponse": { "description": "Response message for Simulator.ListReplayResults.", "id": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse", @@ -1192,6 +1368,177 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1OrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "Optional. The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "Optional. The new or updated OrgPolicy." + }, + "policyParent": { + "description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyViolation": { + "description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyViolation", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The custom constraint being violated." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Any error encountered during the evaluation." + }, + "name": { + "description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`", + "type": "string" + }, + "resource": { + "$ref": "GoogleCloudPolicysimulatorV1ResourceContext", + "description": "The resource violating the constraint." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview", + "properties": { + "createTime": { + "description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "customConstraints": { + "description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Output only. Number of scanned resources with zero violations.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "errors": { + "description": "Output only. Number of resources that returned an error when scanned.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "noncompliant": { + "description": "Output only. Number of scanned resources with at least one violation.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "scanned": { + "description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "unenforced": { + "description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1Replay": { "description": "A resource describing a `Replay`, or simulation.", "id": "GoogleCloudPolicysimulatorV1Replay", @@ -1347,6 +1694,79 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1ResourceContext": { + "description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", + "id": "GoogleCloudPolicysimulatorV1ResourceContext", + "properties": { + "ancestors": { + "description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`", + "items": { + "type": "string" + }, + "type": "array" + }, + "assetType": { + "description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", + "type": "string" + }, + "resource": { + "description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", @@ -1545,6 +1965,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", diff --git a/policysimulator/v1/policysimulator-gen.go b/policysimulator/v1/policysimulator-gen.go index 5b86483b471..f4523941a72 100644 --- a/policysimulator/v1/policysimulator-gen.go +++ b/policysimulator/v1/policysimulator-gen.go @@ -244,6 +244,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} + rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -251,9 +252,32 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service + OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService + Replays *OrganizationsLocationsReplaysService } +func NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsService { + rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsService{s: s} + rs.OrgPolicyViolations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s) + return rs +} + +type OrganizationsLocationsOrgPolicyViolationsPreviewsService struct { + s *Service + + OrgPolicyViolations *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService +} + +func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService { + rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService{s: s} + return rs +} + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService struct { + s *Service +} + func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) @@ -1103,16 +1127,16 @@ func (s *GoogleCloudPolicysimulatorV1ExplainedPolicy) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ListReplayResultsResponse: Response -// message for Simulator.ListReplayResults. -type GoogleCloudPolicysimulatorV1ListReplayResultsResponse struct { +// GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse: +// ListOrgPolicyViolationsPreviewsResponse is the response message for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews. +type GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse struct { // NextPageToken: A token that you can use to retrieve the next page of - // ReplayResult objects. If this field is omitted, there are no - // subsequent pages. + // results. If this field is omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` - // ReplayResults: The results of running a Replay. - ReplayResults []*GoogleCloudPolicysimulatorV1ReplayResult `json:"replayResults,omitempty"` + // OrgPolicyViolationsPreviews: The list of OrgPolicyViolationsPreview + OrgPolicyViolationsPreviews []*GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview `json:"orgPolicyViolationsPreviews,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -1135,46 +1159,28 @@ type GoogleCloudPolicysimulatorV1ListReplayResultsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ListReplayResultsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ListReplayResultsResponse +func (s *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, -// or simulation. -type GoogleCloudPolicysimulatorV1Replay struct { - // Config: Required. The configuration used for the `Replay`. - Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"` - - // Name: Output only. The resource name of the `Replay`, which has the - // following format: - // `{projects|folders|organizations}/{resource-id}/locations/global/repla - // ys/{replay-id}`, where `{resource-id}` is the ID of the project, - // folder, or organization that owns the Replay. Example: - // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d - // 7d-8e03-479ce1833c36` - Name string `json:"name,omitempty"` - - // ResultsSummary: Output only. Summary statistics about the replayed - // log entries. - ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"` +// GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse: +// ListOrgPolicyViolationsResponse is the response message for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolations +type GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // State: Output only. The current state of the `Replay`. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "PENDING" - The `Replay` has not started yet. - // "RUNNING" - The `Replay` is currently running. - // "SUCCEEDED" - The `Replay` has successfully completed. - // "FAILED" - The `Replay` has finished with an error. - State string `json:"state,omitempty"` + // OrgPolicyViolations: The list of OrgPolicyViolations + OrgPolicyViolations []*GoogleCloudPolicysimulatorV1OrgPolicyViolation `json:"orgPolicyViolations,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Config") to + // 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 @@ -1182,48 +1188,37 @@ type GoogleCloudPolicysimulatorV1Replay struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with 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. "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 *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1Replay +func (s *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for -// a Replay. -type GoogleCloudPolicysimulatorV1ReplayConfig struct { - // LogSource: The logs to use as input for the Replay. - // - // Possible values: - // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log - // source is unspecified, the Replay defaults to using - // `RECENT_ACCESSES`. - // "RECENT_ACCESSES" - All access logs from the last 90 days. These - // logs may not include logs from the most recent 7 days. - LogSource string `json:"logSource,omitempty"` +// GoogleCloudPolicysimulatorV1ListReplayResultsResponse: Response +// message for Simulator.ListReplayResults. +type GoogleCloudPolicysimulatorV1ListReplayResultsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // ReplayResult objects. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // PolicyOverlay: A mapping of the resources that you want to simulate - // policies for and the policies that you want to simulate. Keys are the - // full resource names for the resources. For example, - // `//cloudresourcemanager.googleapis.com/projects/my-project`. For - // examples of full resource names for Google Cloud services, see - // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. - // Values are Policy objects representing the policies that you want to - // simulate. Replays automatically take into account any IAM policies - // inherited through the resource hierarchy, and any policies set on - // descendant resources. You do not need to include these policies in - // the policy overlay. - PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` + // ReplayResults: The results of running a Replay. + ReplayResults []*GoogleCloudPolicysimulatorV1ReplayResult `json:"replayResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogSource") to + // 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 @@ -1231,34 +1226,75 @@ type GoogleCloudPolicysimulatorV1ReplayConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LogSource") to include in - // API requests with the JSON null value. By default, fields with 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. "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 *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig +func (s *GoogleCloudPolicysimulatorV1ListReplayResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ListReplayResultsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayDiff: The difference between the -// results of evaluating an access tuple under the current (baseline) -// policies and under the proposed (simulated) policies. This difference -// explains how a principal's access could change if the proposed -// policies were applied. -type GoogleCloudPolicysimulatorV1ReplayDiff struct { - // AccessDiff: A summary and comparison of the principal's access under - // the current (baseline) policies and the proposed (simulated) policies - // for a single access tuple. The evaluation of the principal's access - // is reported in the AccessState field. - AccessDiff *GoogleCloudPolicysimulatorV1AccessStateDiff `json:"accessDiff,omitempty"` +// GoogleCloudPolicysimulatorV1OrgPolicyOverlay: The proposed changes to +// OrgPolicy. +type GoogleCloudPolicysimulatorV1OrgPolicyOverlay struct { + // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes + // to preview violations for. Any existing CustomConstraints with the + // same name will be overridden in the simulation. That is, violations + // will be determined as if all custom constraints in the overlay were + // instantiated. Only a single custom_constraint is supported in the + // overlay at a time. For evaluating multiple constraints, multiple + // `GenerateOrgPolicyViolationsPreview` requests are made, where each + // request evaluates a single constraint. + CustomConstraints []*GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessDiff") to + // Policies: Optional. The OrgPolicy changes to preview violations for. + // Any existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // 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. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay: +// A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: Optional. The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Optional. Resource the constraint is attached + // to. Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") 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 @@ -1266,28 +1302,33 @@ type GoogleCloudPolicysimulatorV1ReplayDiff struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessDiff") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ReplayDiff) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayDiff +func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a -// Replay operation. -type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { - // StartTime: Time when the request was received. - StartTime string `json:"startTime,omitempty"` +// GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay: A change +// to an OrgPolicy. +type GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay struct { + // Policy: Optional. The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "StartTime") to + // PolicyParent: Optional. The parent of the policy we are attaching to. + // Example: "projects/123456" + PolicyParent string `json:"policyParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") 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 @@ -1295,8 +1336,8 @@ type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StartTime") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1304,49 +1345,31 @@ type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata +func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayResult: The result of replaying a -// single access tuple against a simulated state. -type GoogleCloudPolicysimulatorV1ReplayResult struct { - // AccessTuple: The access tuple that was replayed. This field includes - // information about the principal, resource, and permission that were - // involved in the access attempt. - AccessTuple *GoogleCloudPolicysimulatorV1AccessTuple `json:"accessTuple,omitempty"` - - // Diff: The difference between the principal's access under the current - // (baseline) policies and the principal's access under the proposed - // (simulated) policies. This field is only included for access tuples - // that were successfully replayed and had different results under the - // current policies and the proposed policies. - Diff *GoogleCloudPolicysimulatorV1ReplayDiff `json:"diff,omitempty"` +// GoogleCloudPolicysimulatorV1OrgPolicyViolation: OrgPolicyViolation is +// a resource representing a single resource violating a single +// OrgPolicy constraint. +type GoogleCloudPolicysimulatorV1OrgPolicyViolation struct { + // CustomConstraint: The custom constraint being violated. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - // Error: The error that caused the access tuple replay to fail. This - // field is only included for access tuples that were not replayed - // successfully. + // Error: Any error encountered during the evaluation. Error *GoogleRpcStatus `json:"error,omitempty"` - // LastSeenDate: The latest date this access tuple was seen in the logs. - LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"` - - // Name: The resource name of the `ReplayResult`, in the following - // format: - // `{projects|folders|organizations}/{resource-id}/locations/global/repla - // ys/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is - // the ID of the project, folder, or organization that owns the Replay. - // Example: - // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d - // 7d-8e03-479ce1833c36/results/1234` + // Name: The name of the `OrgPolicyViolation`. Example: + // organizations/my-example-org/locations/global/orgPolicyViolationsPrevi + // ews/506a5f7f/orgPolicyViolations/38ce` Name string `json:"name,omitempty"` - // Parent: The Replay that the access tuple was included in. - Parent string `json:"parent,omitempty"` + // Resource: The resource violating the constraint. + Resource *GoogleCloudPolicysimulatorV1ResourceContext `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessTuple") to + // ForceSendFields is a list of field names (e.g. "CustomConstraint") 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 @@ -1354,245 +1377,30 @@ type GoogleCloudPolicysimulatorV1ReplayResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessTuple") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ReplayResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayResult +func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics -// about the replayed log entries. -type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct { - // DifferenceCount: The number of replayed log entries with a difference - // between baseline and simulated policies. - DifferenceCount int64 `json:"differenceCount,omitempty"` - - // ErrorCount: The number of log entries that could not be replayed. - ErrorCount int64 `json:"errorCount,omitempty"` - - // LogCount: The total number of log entries replayed. - LogCount int64 `json:"logCount,omitempty"` - - // NewestDate: The date of the newest log entry replayed. - NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` - - // OldestDate: The date of the oldest log entry replayed. - OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` - - // UnchangedCount: The number of replayed log entries with no difference - // between baseline and simulated policies. - UnchangedCount int64 `json:"unchangedCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DifferenceCount") 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. "DifferenceCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe -// rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata -// is metadata about an OrgPolicyViolationsPreview generations -// operation. -type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { - // RequestTime: Time when the request was received. - RequestTime string `json:"requestTime,omitempty"` - - // ResourcesFound: Total number of resources that need scanning. Should - // equal resource_scanned + resources_pending - ResourcesFound int64 `json:"resourcesFound,omitempty"` - - // ResourcesPending: Number of resources still to scan. - ResourcesPending int64 `json:"resourcesPending,omitempty"` - - // ResourcesScanned: Number of resources already scanned. - ResourcesScanned int64 `json:"resourcesScanned,omitempty"` - - // StartTime: Time when the request started processing, i.e. when the - // state was set to RUNNING. - StartTime string `json:"startTime,omitempty"` - - // State: The current state of the operation. - // - // Possible values: - // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. - // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been - // created yet. - // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently - // being created. - // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation - // finished successfully. - // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed - // with an error. - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RequestTime") 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. "RequestTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed -// changes to OrgPolicy. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { - // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes - // to preview violations for. Any existing CustomConstraints with the - // same name will be overridden in the simulation. That is, violations - // will be determined as if all custom constraints in the overlay were - // instantiated. Only a single custom_constraint is supported in the - // overlay at a time. For evaluating multiple constraints, multiple - // `GenerateOrgPolicyViolationsPreview` requests are made, where each - // request evaluates a single constraint. - CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` - - // Policies: Optional. The OrgPolicy changes to preview violations for. - // Any existing OrgPolicies with the same name will be overridden in the - // simulation. That is, violations will be determined as if all policies - // in the overlay were created or updated. - Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomConstraints") - // 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. "CustomConstraints") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverl -// ay: A change to an OrgPolicy custom constraint. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct { - // CustomConstraint: Optional. The new or updated custom constraint. - CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - - // CustomConstraintParent: Optional. Resource the constraint is attached - // to. Example: "organization/987654" - CustomConstraintParent string `json:"customConstraintParent,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomConstraint") 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. "CustomConstraint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A -// change to an OrgPolicy. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct { - // Policy: Optional. The new or updated OrgPolicy. - Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - - // PolicyParent: Optional. The parent of the policy we are attaching to. - // Example: "projects/123456" - PolicyParent string `json:"policyParent,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Policy") 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. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview: +// GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview: // OrgPolicyViolationsPreview is a resource providing a preview of the // violations that will exist if an OrgPolicy change is made. The list // of violations are modeled as child resources and retrieved via a // ListOrgPolicyViolations API call. There are potentially more // OrgPolicyViolations than could fit in an embedded field. Thus, the // use of a child resource instead of a field. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { +type GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview struct { // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` // was created. CreateTime string `json:"createTime,omitempty"` @@ -1618,11 +1426,11 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { // Overlay: Required. The proposed changes we are previewing violations // for. - Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"` + Overlay *GoogleCloudPolicysimulatorV1OrgPolicyOverlay `json:"overlay,omitempty"` // ResourceCounts: Output only. A summary of the state of all resources // scanned for compliance with the changed OrgPolicy. - ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + ResourceCounts *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` // State: Output only. The state of the `OrgPolicyViolationsPreview`. // @@ -1646,6 +1454,10 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { // a single resource may violate multiple constraints. ViolationsCount int64 `json:"violationsCount,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 @@ -1663,16 +1475,16 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview +func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCou -// nts: A summary of the state of all resources scanned for compliance -// with the changed OrgPolicy. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct { +// GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts: +// A summary of the state of all resources scanned for compliance with +// the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts struct { // Compliant: Output only. Number of scanned resources with zero // violations. Compliant int64 `json:"compliant,omitempty"` @@ -1711,48 +1523,46 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts s NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts +func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper -// ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is -// metadata about an OrgPolicyViolationsPreview generations operation. -type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { - // RequestTime: Time when the request was received. - RequestTime string `json:"requestTime,omitempty"` +// GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, +// or simulation. +type GoogleCloudPolicysimulatorV1Replay struct { + // Config: Required. The configuration used for the `Replay`. + Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"` - // ResourcesFound: Total number of resources that need scanning. Should - // equal resource_scanned + resources_pending - ResourcesFound int64 `json:"resourcesFound,omitempty"` + // Name: Output only. The resource name of the `Replay`, which has the + // following format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}`, where `{resource-id}` is the ID of the project, + // folder, or organization that owns the Replay. Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36` + Name string `json:"name,omitempty"` - // ResourcesPending: Number of resources still to scan. - ResourcesPending int64 `json:"resourcesPending,omitempty"` + // ResultsSummary: Output only. Summary statistics about the replayed + // log entries. + ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"` - // ResourcesScanned: Number of resources already scanned. - ResourcesScanned int64 `json:"resourcesScanned,omitempty"` - - // StartTime: Time when the request started processing, i.e. when the - // state was set to RUNNING. - StartTime string `json:"startTime,omitempty"` - - // State: The current state of the operation. + // State: Output only. The current state of the `Replay`. // // Possible values: - // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. - // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been - // created yet. - // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently - // being created. - // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation - // finished successfully. - // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed - // with an error. + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "PENDING" - The `Replay` has not started yet. + // "RUNNING" - The `Replay` is currently running. + // "SUCCEEDED" - The `Replay` has successfully completed. + // "FAILED" - The `Replay` has finished with an error. State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestTime") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Config") 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 @@ -1760,75 +1570,83 @@ type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperation // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestTime") to include - // in API requests with the JSON null value. By default, fields with - // 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. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata +func (s *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1Replay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed -// changes to OrgPolicy. -type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { - // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes - // to preview violations for. Any existing CustomConstraints with the - // same name will be overridden in the simulation. That is, violations - // will be determined as if all custom constraints in the overlay were - // instantiated. Only a single custom_constraint is supported in the - // overlay at a time. For evaluating multiple constraints, multiple - // `GenerateOrgPolicyViolationsPreview` requests are made, where each - // request evaluates a single constraint. - CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for +// a Replay. +type GoogleCloudPolicysimulatorV1ReplayConfig struct { + // LogSource: The logs to use as input for the Replay. + // + // Possible values: + // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log + // source is unspecified, the Replay defaults to using + // `RECENT_ACCESSES`. + // "RECENT_ACCESSES" - All access logs from the last 90 days. These + // logs may not include logs from the most recent 7 days. + LogSource string `json:"logSource,omitempty"` - // Policies: Optional. The OrgPolicy changes to preview violations for. - // Any existing OrgPolicies with the same name will be overridden in the - // simulation. That is, violations will be determined as if all policies - // in the overlay were created or updated. - Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + // PolicyOverlay: A mapping of the resources that you want to simulate + // policies for and the policies that you want to simulate. Keys are the + // full resource names for the resources. For example, + // `//cloudresourcemanager.googleapis.com/projects/my-project`. For + // examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + // Values are Policy objects representing the policies that you want to + // simulate. Replays automatically take into account any IAM policies + // inherited through the resource hierarchy, and any policies set on + // descendant resources. You do not need to include these policies in + // the policy overlay. + PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomConstraints") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "LogSource") 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. "CustomConstraints") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "LogSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay +func (s *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverla -// y: A change to an OrgPolicy custom constraint. -type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct { - // CustomConstraint: Optional. The new or updated custom constraint. - CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - - // CustomConstraintParent: Optional. Resource the constraint is attached - // to. Example: "organization/987654" - CustomConstraintParent string `json:"customConstraintParent,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayDiff: The difference between the +// results of evaluating an access tuple under the current (baseline) +// policies and under the proposed (simulated) policies. This difference +// explains how a principal's access could change if the proposed +// policies were applied. +type GoogleCloudPolicysimulatorV1ReplayDiff struct { + // AccessDiff: A summary and comparison of the principal's access under + // the current (baseline) policies and the proposed (simulated) policies + // for a single access tuple. The evaluation of the principal's access + // is reported in the AccessState field. + AccessDiff *GoogleCloudPolicysimulatorV1AccessStateDiff `json:"accessDiff,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // ForceSendFields is a list of field names (e.g. "AccessDiff") 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 @@ -1836,33 +1654,28 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomConstraint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "AccessDiff") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay +func (s *GoogleCloudPolicysimulatorV1ReplayDiff) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayDiff raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A -// change to an OrgPolicy. -type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { - // Policy: Optional. The new or updated OrgPolicy. - Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - - // PolicyParent: Optional. The parent of the policy we are attaching to. - // Example: "projects/123456" - PolicyParent string `json:"policyParent,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a +// Replay operation. +type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { + // StartTime: Time when the request was received. + StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // ForceSendFields is a list of field names (e.g. "StartTime") 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 @@ -1870,8 +1683,8 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "StartTime") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1879,74 +1692,49 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay +func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview: -// OrgPolicyViolationsPreview is a resource providing a preview of the -// violations that will exist if an OrgPolicy change is made. The list -// of violations are modeled as child resources and retrieved via a -// ListOrgPolicyViolations API call. There are potentially more -// OrgPolicyViolations than could fit in an embedded field. Thus, the -// use of a child resource instead of a field. -type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { - // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` - // was created. - CreateTime string `json:"createTime,omitempty"` - - // CustomConstraints: Output only. The names of the constraints against - // which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` - // only contains `PolicyOverlay` then it contains the name of the - // configured custom constraint, applicable to the specified policies. - // Otherwise it contains the name of the constraint specified in - // `CustomConstraintOverlay`. Format: - // `organizations/{organization_id}/customConstraints/{custom_constraint_ - // id}` Example: - // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` - CustomConstraints []string `json:"customConstraints,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayResult: The result of replaying a +// single access tuple against a simulated state. +type GoogleCloudPolicysimulatorV1ReplayResult struct { + // AccessTuple: The access tuple that was replayed. This field includes + // information about the principal, resource, and permission that were + // involved in the access attempt. + AccessTuple *GoogleCloudPolicysimulatorV1AccessTuple `json:"accessTuple,omitempty"` - // Name: Output only. The resource name of the - // `OrgPolicyViolationsPreview`. It has the following format: - // `organizations/{organization}/locations/{location}/orgPolicyViolations - // Previews/{orgPolicyViolationsPreview}` Example: - // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev - // iews/506a5f7f` - Name string `json:"name,omitempty"` + // Diff: The difference between the principal's access under the current + // (baseline) policies and the principal's access under the proposed + // (simulated) policies. This field is only included for access tuples + // that were successfully replayed and had different results under the + // current policies and the proposed policies. + Diff *GoogleCloudPolicysimulatorV1ReplayDiff `json:"diff,omitempty"` - // Overlay: Required. The proposed changes we are previewing violations - // for. - Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"` + // Error: The error that caused the access tuple replay to fail. This + // field is only included for access tuples that were not replayed + // successfully. + Error *GoogleRpcStatus `json:"error,omitempty"` - // ResourceCounts: Output only. A summary of the state of all resources - // scanned for compliance with the changed OrgPolicy. - ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + // LastSeenDate: The latest date this access tuple was seen in the logs. + LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"` - // State: Output only. The state of the `OrgPolicyViolationsPreview`. - // - // Possible values: - // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. - // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been - // created yet. - // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently - // being created. - // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation - // finished successfully. - // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed - // with an error. - State string `json:"state,omitempty"` + // Name: The resource name of the `ReplayResult`, in the following + // format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is + // the ID of the project, folder, or organization that owns the Replay. + // Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36/results/1234` + Name string `json:"name,omitempty"` - // ViolationsCount: Output only. The number of OrgPolicyViolations in - // this `OrgPolicyViolationsPreview`. This count may differ from - // `resource_summary.noncompliant_count` because each OrgPolicyViolation - // is specific to a resource **and** constraint. If there are multiple - // constraints being evaluated (i.e. multiple policies in the overlay), - // a single resource may violate multiple constraints. - ViolationsCount int64 `json:"violationsCount,omitempty"` + // Parent: The Replay that the access tuple was included in. + Parent string `json:"parent,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "AccessTuple") 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 @@ -1954,47 +1742,45 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { // 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 + // NullFields is a list of field names (e.g. "AccessTuple") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview +func (s *GoogleCloudPolicysimulatorV1ReplayResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCoun -// ts: A summary of the state of all resources scanned for compliance -// with the changed OrgPolicy. -type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct { - // Compliant: Output only. Number of scanned resources with zero - // violations. - Compliant int64 `json:"compliant,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics +// about the replayed log entries. +type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct { + // DifferenceCount: The number of replayed log entries with a difference + // between baseline and simulated policies. + DifferenceCount int64 `json:"differenceCount,omitempty"` - // Errors: Output only. Number of resources that returned an error when - // scanned. - Errors int64 `json:"errors,omitempty"` + // ErrorCount: The number of log entries that could not be replayed. + ErrorCount int64 `json:"errorCount,omitempty"` - // Noncompliant: Output only. Number of scanned resources with at least - // one violation. - Noncompliant int64 `json:"noncompliant,omitempty"` + // LogCount: The total number of log entries replayed. + LogCount int64 `json:"logCount,omitempty"` - // Scanned: Output only. Number of resources checked for compliance. - // Must equal: unenforced + noncompliant + compliant + error - Scanned int64 `json:"scanned,omitempty"` + // NewestDate: The date of the newest log entry replayed. + NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` - // Unenforced: Output only. Number of resources where the constraint was - // not enforced, i.e. the Policy set `enforced: false` for that - // resource. - Unenforced int64 `json:"unenforced,omitempty"` + // OldestDate: The date of the oldest log entry replayed. + OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Compliant") to + // UnchangedCount: The number of replayed log entries with no difference + // between baseline and simulated policies. + UnchangedCount int64 `json:"unchangedCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DifferenceCount") 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 @@ -2002,7 +1788,59 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts st // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Compliant") to include in + // NullFields is a list of field names (e.g. "DifferenceCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1ResourceContext: ResourceContext provides +// the context we know about a resource. It is similar in concept to +// google.cloud.asset.v1.Resource, but focuses on the information +// specifically used by Simulator. +type GoogleCloudPolicysimulatorV1ResourceContext struct { + // Ancestors: The ancestry path of the resource in Google Cloud resource + // hierarchy + // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path + // starts with the closest ancestor in the hierarchy and ends at root. + // If the resource is a project, folder, or organization, the ancestry + // path starts from the resource itself. Example: + // `["projects/123456789", "folders/5432", "organizations/1234"]` + Ancestors []string `json:"ancestors,omitempty"` + + // AssetType: The asset type of the resource as defined by CAIS. + // Example: `compute.googleapis.com/Firewall` See Supported asset types + // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + AssetType string `json:"assetType,omitempty"` + + // Resource: The full name of the resource. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instance + // s/instance1` See Resource names + // (https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + Resource string `json:"resource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ancestors") 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. "Ancestors") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2011,41 +1849,48 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts st NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts +func (s *GoogleCloudPolicysimulatorV1ResourceContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ResourceContext raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditConfig: Specifies the audit configuration for a -// service. The configuration determines which permission types are -// logged, and what identities, if any, are exempted from logging. An -// AuditConfig must have one or more AuditLogConfigs. If there are -// AuditConfigs for both `allServices` and a specific service, the union -// of the two AuditConfigs is used for that service: the log_types -// specified in each AuditConfig are enabled, and the exempted_members -// in each AuditLogConfig are exempted. Example Policy with multiple -// AuditConfigs: { "audit_configs": [ { "service": "allServices", -// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": -// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { -// "log_type": "ADMIN_READ" } ] }, { "service": -// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": -// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ -// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy -// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts -// `jose@example.com` from DATA_READ logging, and `aliya@example.com` -// from DATA_WRITE logging. -type GoogleIamV1AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` +// GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOpera +// tionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` - // Service: Specifies a service that will be enabled for audit logging. - // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") 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 @@ -2053,44 +1898,58 @@ type GoogleIamV1AuditConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditLogConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditConfig +func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditLogConfig: Provides the configuration for logging a -// type of permissions. Example: { "audit_log_configs": [ { "log_type": -// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { -// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and -// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ -// logging. -type GoogleIamV1AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging - // for this type of permission. Follows the same format of - // Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` +// GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe +// rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata +// is metadata about an OrgPolicyViolationsPreview generations +// operation. +type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` - // LogType: The log type that this config enables. + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. // // Possible values: - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "DATA_READ" - Data reads. Example: CloudSQL Users list - LogType string `json:"logType,omitempty"` + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // ForceSendFields is a list of field names (e.g. "RequestTime") 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 @@ -2098,7 +1957,49 @@ type GoogleIamV1AuditLogConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExemptedMembers") to + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { + // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes + // to preview violations for. Any existing CustomConstraints with the + // same name will be overridden in the simulation. That is, violations + // will be determined as if all custom constraints in the overlay were + // instantiated. Only a single custom_constraint is supported in the + // overlay at a time. For evaluating multiple constraints, multiple + // `GenerateOrgPolicyViolationsPreview` requests are made, where each + // request evaluates a single constraint. + CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: Optional. The OrgPolicy changes to preview violations for. + // Any existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // 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. "CustomConstraints") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2108,101 +2009,23 @@ type GoogleIamV1AuditLogConfig struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditLogConfig +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Binding: Associates `members`, or principals, with a -// `role`. -type GoogleIamV1Binding struct { - // Condition: The condition that is associated with this binding. If the - // condition evaluates to `true`, then this binding applies to the - // current request. If the condition evaluates to `false`, then this - // binding does not apply to the current request. However, a different - // role binding might grant the same role to one or more of the - // principals in this binding. To learn which resources support - // conditions in their IAM policies, see the IAM documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Condition *GoogleTypeExpr `json:"condition,omitempty"` - - // Members: Specifies the principals requesting access for a Google - // Cloud resource. `members` can have the following values: * - // `allUsers`: A special identifier that represents anyone who is on the - // internet; with or without a Google account. * - // `allAuthenticatedUsers`: A special identifier that represents anyone - // who is authenticated with a Google account or a service account. Does - // not include identities that come from external identity providers - // (IdPs) through identity federation. * `user:{emailid}`: An email - // address that represents a specific Google account. For example, - // `alice@example.com` . * `serviceAccount:{emailid}`: An email address - // that represents a Google service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * - // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: - // An identifier for a Kubernetes service account - // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). - // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. - // * `group:{emailid}`: An email address that represents a Google group. - // For example, `admins@example.com`. * `domain:{domain}`: The G Suite - // domain (primary) that represents all the users of that domain. For - // example, `google.com` or `example.com`. * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_ - // id}/subject/{subject_attribute_value}`: A single identity in a - // workforce identity pool. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po - // ol_id}/group/{group_id}`: All workforce identities in a group. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po - // ol_id}/attribute.{attribute_name}/{attribute_value}`: All workforce - // identities with a specific attribute value. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po - // ol_id}/*`: All identities in a workforce identity pool. * - // `principal://iam.googleapis.com/projects/{project_number}/locations/gl - // obal/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value} - // `: A single identity in a workload identity pool. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations - // /global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload - // identity pool group. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations - // /global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{at - // tribute_value}`: All identities in a workload identity pool with a - // certain attribute. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations - // /global/workloadIdentityPools/{pool_id}/*`: All identities in a - // workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An - // email address (plus unique identifier) representing a user that has - // been recently deleted. For example, - // `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered - // user retains the role in the binding. * - // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address - // (plus unique identifier) representing a service account that has been - // recently deleted. For example, - // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - // If the service account is undeleted, this value reverts to - // `serviceAccount:{emailid}` and the undeleted service account retains - // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: - // An email address (plus unique identifier) representing a Google group - // that has been recently deleted. For example, - // `admins@example.com?uid=123456789012345678901`. If the group is - // recovered, this value reverts to `group:{emailid}` and the recovered - // group retains the role in the binding. * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePool - // s/{pool_id}/subject/{subject_attribute_value}`: Deleted single - // identity in a workforce identity pool. For example, - // `deleted:principal://iam.googleapis.com/locations/global/workforcePool - // s/my-pool-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverl +// ay: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: Optional. The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an - // overview of the IAM roles and permissions, see the IAM documentation - // (https://cloud.google.com/iam/docs/roles-overview). For a list of the - // available pre-defined roles, see here - // (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` + // CustomConstraintParent: Optional. Resource the constraint is attached + // to. Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // ForceSendFields is a list of field names (e.g. "CustomConstraint") 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 @@ -2210,105 +2033,33 @@ type GoogleIamV1Binding struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, -// which specifies access controls for Google Cloud resources. A -// `Policy` is a collection of `bindings`. A `binding` binds one or more -// `members`, or principals, to a single `role`. Principals can be user -// accounts, service accounts, Google groups, and domains (such as G -// Suite). A `role` is a named list of permissions; each `role` can be -// an IAM predefined role or a user-created custom role. For some types -// of Google Cloud resources, a `binding` can also specify a -// `condition`, which is a logical expression that allows access to a -// resource only if the expression evaluates to `true`. A condition can -// add constraints based on attributes of the request, the resource, or -// both. To learn which resources support conditions in their IAM -// policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** ``` { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { -// "role": "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` -// bindings: - members: - user:mike@example.com - -// group:admins@example.com - domain:google.com - -// serviceAccount:my-project-id@appspot.gserviceaccount.com role: -// roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access -// after Sep 2020 expression: request.time < -// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// ``` For a description of IAM and its features, see the IAM -// documentation (https://cloud.google.com/iam/docs/). -type GoogleIamV1Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members`, or principals, with a - // `role`. Optionally, may specify a `condition` that determines how and - // when the `bindings` are applied. Each of the `bindings` must contain - // at least one principal. The `bindings` in a `Policy` can refer to up - // to 1,500 principals; up to 250 of these principals can be Google - // groups. Each occurrence of a principal counts towards these limits. - // For example, if the `bindings` grant 50 different roles to - // `user:alice@example.com`, and not to any other principal, then you - // can add another 1,450 principals to the `bindings` in the `Policy`. - Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. **Important:** If you use IAM - // Conditions, you must include the `etag` field whenever you call - // `setIamPolicy`. If you omit this field, then IAM allows you to - // overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct { + // Policy: Optional. The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, - // `1`, and `3`. Requests that specify an invalid value are rejected. - // Any operation that affects conditional role bindings must specify - // version `3`. This requirement applies to the following operations: * - // Getting a policy that includes a conditional role binding * Adding a - // conditional role binding to a policy * Changing a conditional role - // binding in a policy * Removing any role binding, with or without a - // condition, from a policy that includes conditions **Important:** If - // you use IAM Conditions, you must include the `etag` field whenever - // you call `setIamPolicy`. If you omit this field, then IAM allows you - // to overwrite a version `3` policy with a version `1` policy, and all - // of the conditions in the version `3` policy are lost. If a policy - // does not include any conditions, operations on that policy may - // specify any valid version or leave the field unset. To learn which - // resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` + // PolicyParent: Optional. The parent of the policy we are attaching to. + // Example: "projects/123456" + PolicyParent string `json:"policyParent,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // ForceSendFields is a list of field names (e.g. "Policy") 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 @@ -2316,98 +2067,131 @@ type GoogleIamV1Policy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { + // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` + // was created. + CreateTime string `json:"createTime,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + // CustomConstraints: Output only. The names of the constraints against + // which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` + // only contains `PolicyOverlay` then it contains the name of the + // configured custom constraint, applicable to the specified policies. + // Otherwise it contains the name of the constraint specified in + // `CustomConstraintOverlay`. Format: + // `organizations/{organization_id}/customConstraints/{custom_constraint_ + // id}` Example: + // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + CustomConstraints []string `json:"customConstraints,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` - // 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:"-"` + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"` - // 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 + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,omitempty"` + + // 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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCou +// nts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Output only. Number of scanned resources with zero + // violations. + Compliant int64 `json:"compliant,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Errors: Output only. Number of resources that returned an error when + // scanned. + Errors int64 `json:"errors,omitempty"` - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` + // Noncompliant: Output only. Number of scanned resources with at least + // one violation. + Noncompliant int64 `json:"noncompliant,omitempty"` - // Response: The normal, successful response of the operation. If the - // original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` + // Scanned: Output only. Number of resources checked for compliance. + // Must equal: unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Unenforced: Output only. Number of resources where the constraint was + // not enforced, i.e. the Policy set `enforced: false` for that + // resource. + Unenforced int64 `json:"unenforced,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // ForceSendFields is a list of field names (e.g. "Compliant") 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 @@ -2415,8 +2199,8 @@ type GoogleLongrunningOperation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2424,34 +2208,48 @@ type GoogleLongrunningOperation struct { NullFields []string `json:"-"` } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different programming environments, including REST -// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` +// GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperat +// ionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") 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 @@ -2459,46 +2257,57 @@ type GoogleRpcStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: 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 -type GoogleTypeDate 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 - // day isn't significant. - Day int64 `json:"day,omitempty"` +// GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper +// ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") 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 @@ -2506,165 +2315,1385 @@ type GoogleTypeDate struct { // 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 + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: 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() < 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' && 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. -type GoogleTypeExpr struct { - // Description: Optional. Description of the expression. This is a - // longer text which describes the expression, e.g. when hovered over it - // in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in Common +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { + // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes + // to preview violations for. Any existing CustomConstraints with the + // same name will be overridden in the simulation. That is, violations + // will be determined as if all custom constraints in the overlay were + // instantiated. Only a single custom_constraint is supported in the + // overlay at a time. For evaluating multiple constraints, multiple + // `GenerateOrgPolicyViolationsPreview` requests are made, where each + // request evaluates a single constraint. + CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: Optional. The OrgPolicy changes to preview violations for. + // Any existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // 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. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverla +// y: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: Optional. The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Optional. Resource the constraint is attached + // to. Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") 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. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { + // Policy: Optional. The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` + + // PolicyParent: Optional. The parent of the policy we are attaching to. + // Example: "projects/123456" + PolicyParent string `json:"policyParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") 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. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { + // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` + // was created. + CreateTime string `json:"createTime,omitempty"` + + // CustomConstraints: Output only. The names of the constraints against + // which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` + // only contains `PolicyOverlay` then it contains the name of the + // configured custom constraint, applicable to the specified policies. + // Otherwise it contains the name of the constraint specified in + // `CustomConstraintOverlay`. Format: + // `organizations/{organization_id}/customConstraints/{custom_constraint_ + // id}` Example: + // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + CustomConstraints []string `json:"customConstraints,omitempty"` + + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` + + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"` + + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,omitempty"` + + // 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 *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCoun +// ts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Output only. Number of scanned resources with zero + // violations. + Compliant int64 `json:"compliant,omitempty"` + + // Errors: Output only. Number of resources that returned an error when + // scanned. + Errors int64 `json:"errors,omitempty"` + + // Noncompliant: Output only. Number of scanned resources with at least + // one violation. + Noncompliant int64 `json:"noncompliant,omitempty"` + + // Scanned: Output only. Number of resources checked for compliance. + // Must equal: unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` + + // Unenforced: Output only. Number of resources where the constraint was + // not enforced, i.e. the Policy set `enforced: false` for that + // resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") 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. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditConfig: Specifies the audit configuration for a +// service. The configuration determines which permission types are +// logged, and what identities, if any, are exempted from logging. An +// AuditConfig must have one or more AuditLogConfigs. If there are +// AuditConfigs for both `allServices` and a specific service, the union +// of the two AuditConfigs is used for that service: the log_types +// specified in each AuditConfig are enabled, and the exempted_members +// in each AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty 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. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: Provides the configuration for logging a +// type of permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type GoogleIamV1AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty 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. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a +// `role`. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `example.com`. * + // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_ + // id}/subject/{subject_attribute_value}`: A single identity in a + // workforce identity pool. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/group/{group_id}`: All workforce identities in a group. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/attribute.{attribute_name}/{attribute_value}`: All workforce + // identities with a specific attribute value. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/*`: All identities in a workforce identity pool. * + // `principal://iam.googleapis.com/projects/{project_number}/locations/gl + // obal/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value} + // `: A single identity in a workload identity pool. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations + // /global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload + // identity pool group. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations + // /global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{at + // tribute_value}`: All identities in a workload identity pool with a + // certain attribute. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations + // /global/workloadIdentityPools/{pool_id}/*`: All identities in a + // workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An + // email address (plus unique identifier) representing a user that has + // been recently deleted. For example, + // `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered + // user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * + // `deleted:principal://iam.googleapis.com/locations/global/workforcePool + // s/{pool_id}/subject/{subject_attribute_value}`: Deleted single + // identity in a workforce identity pool. For example, + // `deleted:principal://iam.googleapis.com/locations/global/workforcePool + // s/my-pool-id/subject/my-subject-attribute-value`. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, +// which specifies access controls for Google Cloud resources. A +// `Policy` is a collection of `bindings`. A `binding` binds one or more +// `members`, or principals, to a single `role`. Principals can be user +// accounts, service accounts, Google groups, and domains (such as G +// Suite). A `role` is a named list of permissions; each `role` can be +// an IAM predefined role or a user-created custom role. For some types +// of Google Cloud resources, a `binding` can also specify a +// `condition`, which is a logical expression that allows access to a +// resource only if the expression evaluates to `true`. A condition can +// add constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** ``` { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). +type GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") 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. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that +// is suitable for different programming environments, including REST +// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: 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 +type GoogleTypeDate 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 + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: 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() < 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' && 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. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common // Expression Language syntax. Expression string `json:"expression,omitempty"` - // Location: Optional. String indicating the location of the expression - // for error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty 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 *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "policysimulator.folders.locations.replays.create": + +type FoldersLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates and starts a Replay using the given ReplayConfig. +// +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *FoldersLocationsReplaysCreateCall { + c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay + 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 *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall { + 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 *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall { + 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 *FoldersLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysCreateCall) 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.googlecloudpolicysimulatorv1replay) + 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}/replays") + 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 "policysimulator.folders.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.folders.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.get": + +type FoldersLocationsReplaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. +// +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall { + c := &FoldersLocationsReplaysGetCall{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 *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall { + 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 *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall { + 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 *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall { + 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 *FoldersLocationsReplaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysGetCall) 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/{+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 "policysimulator.folders.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudPolicysimulatorV1Replay.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 *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1Replay{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.operations.get": + +type FoldersLocationsReplaysOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{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 *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { + 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 *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { + 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 *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { + 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 *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysOperationsGetCall) 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/{+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 "policysimulator.folders.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // Title: Optional. Title for the expression, i.e. a short string - // describing its purpose. This can be used e.g. in UIs which allow to - // enter the expression. - Title string `json:"title,omitempty"` +} - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty 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:"-"` +// method id "policysimulator.folders.locations.replays.operations.list": - // 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:"-"` +type FoldersLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// method id "policysimulator.folders.locations.replays.create": +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} -type FoldersLocationsReplaysCreateCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Create: Creates and starts a Replay using the given ReplayConfig. -// -// - parent: The parent resource where this Replay will be created. This -// resource must be a project, folder, or organization with a -// location. Example: `projects/my-example-project/locations/global`. -func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *FoldersLocationsReplaysCreateCall { - c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { + 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 *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { 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 *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { + 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 *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { 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 *FoldersLocationsReplaysCreateCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) 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.googlecloudpolicysimulatorv1replay) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2683,7 +3712,7 @@ func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2695,28 +3724,41 @@ func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates and starts a Replay using the given ReplayConfig.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays", - // "httpMethod": "POST", - // "id": "policysimulator.folders.locations.replays.create", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/replays", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2725,36 +3767,74 @@ func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "policysimulator.folders.locations.replays.get": +// 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 *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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) + } +} -type FoldersLocationsReplaysGetCall struct { +// method id "policysimulator.folders.locations.replays.results.list": + +type FoldersLocationsReplaysResultsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the specified Replay. Each `Replay` is available for at -// least 7 days. +// List: Lists the results of running a Replay. // -// - name: The name of the Replay to retrieve, in the following format: +// - parent: The Replay whose results are listed, in the following +// format: // `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}`, where `{resource-id}` is the ID of the project, -// folder, or organization that owns the `Replay`. Example: -// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- -// 4d7d-8e03-479ce1833c36`. -func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall { - c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { + c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { + 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 *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall { +func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2764,7 +3844,7 @@ func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLo // 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 *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall { +func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2772,21 +3852,21 @@ func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersL // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall { +func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { 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 *FoldersLocationsReplaysGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysResultsListCall) 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_ { @@ -2799,7 +3879,7 @@ func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2807,20 +3887,21 @@ func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.get" call. -// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "policysimulator.folders.locations.replays.results.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.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 *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) { +func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2839,7 +3920,7 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1Replay{ + ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2851,25 +3932,36 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.get", + // "id": "policysimulator.folders.locations.replays.results.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "pageSize": { + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/results", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2878,9 +3970,30 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "policysimulator.folders.locations.replays.operations.get": +// 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 *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) 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) + } +} -type FoldersLocationsReplaysOperationsGetCall struct { +// method id "policysimulator.operations.get": + +type OperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2894,8 +4007,8 @@ type FoldersLocationsReplaysOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { - c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2903,7 +4016,7 @@ func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2913,7 +4026,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) // 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 *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2921,21 +4034,21 @@ func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 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 *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *OperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsGetCall) 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_ { @@ -2961,14 +4074,14 @@ func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Do executes the "policysimulator.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.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 *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3000,9 +4113,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "flatPath": "v1/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.get", + // "id": "policysimulator.operations.get", // "parameterOrder": [ // "name" // ], @@ -3010,7 +4123,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^operations/.*$", // "required": true, // "type": "string" // } @@ -3026,9 +4139,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } -// method id "policysimulator.folders.locations.replays.operations.list": +// method id "policysimulator.operations.list": -type FoldersLocationsReplaysOperationsListCall struct { +type OperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3042,29 +4155,29 @@ type FoldersLocationsReplaysOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { - c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -3072,7 +4185,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3082,7 +4195,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) // 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 *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3090,21 +4203,21 @@ func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { +func (c *OperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsListCall) 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_ { @@ -3130,7 +4243,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Do executes the "policysimulator.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -3138,7 +4251,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http // 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 *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3170,9 +4283,9 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "flatPath": "v1/operations", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.list", + // "id": "policysimulator.operations.list", // "parameterOrder": [ // "name" // ], @@ -3185,7 +4298,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "pattern": "^operations$", // "required": true, // "type": "string" // }, @@ -3215,7 +4328,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // 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 *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -3233,53 +4346,194 @@ func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f } } -// method id "policysimulator.folders.locations.replays.results.list": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1orgpolicyviolationspreview *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: CreateOrgPolicyViolationsPreview creates an +// OrgPolicyViolationsPreview for the proposed changes in the provided +// OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy +// are specified by this `OrgPolicyOverlay`. The resources to scan are +// inferred from these specified changes. +// +// - parent: The organization under which this +// OrgPolicyViolationsPreview will be created. Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1orgpolicyviolationspreview *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1orgpolicyviolationspreview = googlecloudpolicysimulatorv1orgpolicyviolationspreview + return c +} + +// OrgPolicyViolationsPreviewId sets the optional parameter +// "orgPolicyViolationsPreviewId": An optional user-specified ID for the +// OrgPolicyViolationsPreview. If not provided, a random ID will be +// generated. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId) + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) 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.googlecloudpolicysimulatorv1orgpolicyviolationspreview) + 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}/orgPolicyViolationsPreviews") + 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 "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + 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": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "orgPolicyViolationsPreviewId": { + // "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/orgPolicyViolationsPreviews", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": -type FoldersLocationsReplaysResultsListCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the results of running a Replay. +// Get: GetOrgPolicyViolationsPreview gets the specified +// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is +// available for at least 7 days. // -// - parent: The Replay whose results are listed, in the following -// format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}` Example: -// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 -// 3-479ce1833c36`. -func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { - c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of ReplayResult objects to return. Defaults to 5000. The maximum -// value is 5000; values above 5000 are rounded down to 5000. -func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous Simulator.ListReplayResults call. Provide -// this token to retrieve the next page of results. When paginating, all -// other parameters provided to [Simulator.ListReplayResults[] must -// match the call that provided the page token. -func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the OrgPolicyViolationsPreview to get. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{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 *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3289,7 +4543,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *F // 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 *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -3297,21 +4551,21 @@ func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { 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 *FoldersLocationsReplaysResultsListCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) 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_ { @@ -3324,7 +4578,7 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3332,21 +4586,22 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.results.list" call. -// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview.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 *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3365,7 +4620,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ + ret := &GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3377,36 +4632,25 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists the results of running a Replay.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.results.list", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "name": { + // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/results", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3415,53 +4659,52 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } -// 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 *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) 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 "policysimulator.operations.get": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": -type OperationsGetCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// List: ListOrgPolicyViolationsPreviews lists each +// OrgPolicyViolationsPreview in an organization. Each +// OrgPolicyViolationsPreview is available for at least 7 days. // -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent the violations are scoped to. Format: +// `organizations/{organization}/locations/{location}` Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 5 items will be returned. The maximum value is +// 10; values above 10 will be coerced to 10. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + 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 must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + 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 *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3471,7 +4714,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // 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 *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3479,21 +4722,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { 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 *OperationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) 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_ { @@ -3506,7 +4749,7 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolationsPreviews") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3514,19 +4757,22 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse.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 *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3545,7 +4791,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3557,25 +4803,36 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/operations/{operationsId}", + // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "pageSize": { + // "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global`", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/orgPolicyViolationsPreviews", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3584,45 +4841,65 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse) 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) + } +} -type OperationsListCall struct { +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are +// present in an OrgPolicyViolationsPreview. // -// - name: The name of the operation's parent resource. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations +// from. Format: +// organizations/{organization}/locations/{location}/orgPolicyViolation +// sPreviews/{orgPolicyViolationsPreview}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 50 items will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +// 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 must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -3630,7 +4907,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3640,7 +4917,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // 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 *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3648,21 +4925,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { 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 *OperationsListCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) 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_ { @@ -3675,7 +4952,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3683,20 +4960,22 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.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 *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse.ServerRes +// ponse.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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3715,7 +4994,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3727,41 +5006,36 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/operations", + // "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/orgPolicyViolations", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3773,7 +5047,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // 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 *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json index d1031e463b5..905c66d5b46 100644 --- a/policysimulator/v1alpha/policysimulator-api.json +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -424,39 +424,42 @@ "organizations": { "resources": { "locations": { - "methods": { - "orgPolicyViolationsPreviews": { - "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", - "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", - "httpMethod": "POST", - "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", - "request": { - "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "orgPolicyViolationsPreviews": { "methods": { + "create": { + "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orgPolicyViolationsPreviewId": { + "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "generate": { "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews:generate", @@ -1075,7 +1078,7 @@ } } }, - "revision": "20240121", + "revision": "20240218", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1562,6 +1565,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaExplainedAccess": { "description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", "id": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", @@ -2113,6 +2167,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go index aa0fdce51de..84c783fe266 100644 --- a/policysimulator/v1alpha/policysimulator-gen.go +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -268,7 +268,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} - rs.OrgPolicyViolationsPreviews_ = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) + rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -276,7 +276,7 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service - OrgPolicyViolationsPreviews_ *OrganizationsLocationsOrgPolicyViolationsPreviewsService + OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService Replays *OrganizationsLocationsReplaysService } @@ -1235,6 +1235,64 @@ func (s *GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOpera +// tionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") 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. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1alphaExplainedAccess: Details about how a // set of policies, listed in ExplainedPolicy, resulted in a certain // AccessState when replaying an access tuple. @@ -2161,6 +2219,64 @@ func (s *GoogleCloudPolicysimulatorV1alphaResourceContext) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperat +// ionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") 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. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper // ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is // metadata about an OrgPolicyViolationsPreview generations operation. @@ -4590,9 +4706,9 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create": -type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct { s *Service parent string googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview @@ -4601,26 +4717,35 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { header_ http.Header } -// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview -// generates an OrgPolicyViolationsPreview for the proposed changes in -// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes -// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources -// to scan are inferred from these specified changes. +// Create: CreateOrgPolicyViolationsPreview creates an +// OrgPolicyViolationsPreview for the proposed changes in the provided +// OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy +// are specified by this `OrgPolicyOverlay`. The resources to scan are +// inferred from these specified changes. // // - parent: The organization under which this // OrgPolicyViolationsPreview will be created. Example: // `organizations/my-example-org/locations/global`. -func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview = googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview return c } +// OrgPolicyViolationsPreviewId sets the optional parameter +// "orgPolicyViolationsPreviewId": An optional user-specified ID for the +// OrgPolicyViolationsPreview. If not provided, a random ID will be +// generated. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId) + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4628,21 +4753,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) 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_ { @@ -4670,14 +4795,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4708,14 +4833,19 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } return ret, nil // { - // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "orgPolicyViolationsPreviewId": { + // "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", // "location": "path", diff --git a/policysimulator/v1beta/policysimulator-api.json b/policysimulator/v1beta/policysimulator-api.json index 3ce5ffbaecb..ced87c46128 100644 --- a/policysimulator/v1beta/policysimulator-api.json +++ b/policysimulator/v1beta/policysimulator-api.json @@ -424,39 +424,42 @@ "organizations": { "resources": { "locations": { - "methods": { - "orgPolicyViolationsPreviews": { - "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", - "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", - "httpMethod": "POST", - "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", - "request": { - "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "orgPolicyViolationsPreviews": { "methods": { + "create": { + "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orgPolicyViolationsPreviewId": { + "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "generate": { "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews:generate", @@ -1075,7 +1078,7 @@ } } }, - "revision": "20240121", + "revision": "20240218", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1383,6 +1386,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", @@ -1760,6 +1814,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaExplainedAccess": { "description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", "id": "GoogleCloudPolicysimulatorV1betaExplainedAccess", diff --git a/policysimulator/v1beta/policysimulator-gen.go b/policysimulator/v1beta/policysimulator-gen.go index f2dd878daee..aaf8a98da5e 100644 --- a/policysimulator/v1beta/policysimulator-gen.go +++ b/policysimulator/v1beta/policysimulator-gen.go @@ -268,7 +268,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} - rs.OrgPolicyViolationsPreviews_ = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) + rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -276,7 +276,7 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service - OrgPolicyViolationsPreviews_ *OrganizationsLocationsOrgPolicyViolationsPreviewsService + OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService Replays *OrganizationsLocationsReplaysService } @@ -942,6 +942,64 @@ func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOpera +// tionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") 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. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe // rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata // is metadata about an OrgPolicyViolationsPreview generations @@ -1537,6 +1595,64 @@ func (s *GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperat +// ionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") 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. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1betaExplainedAccess: Details about how a // set of policies, listed in ExplainedPolicy, resulted in a certain // AccessState when replaying an access tuple. @@ -4591,9 +4707,9 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create": -type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct { s *Service parent string googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview @@ -4602,26 +4718,35 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { header_ http.Header } -// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview -// generates an OrgPolicyViolationsPreview for the proposed changes in -// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes -// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources -// to scan are inferred from these specified changes. +// Create: CreateOrgPolicyViolationsPreview creates an +// OrgPolicyViolationsPreview for the proposed changes in the provided +// OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy +// are specified by this `OrgPolicyOverlay`. The resources to scan are +// inferred from these specified changes. // // - parent: The organization under which this // OrgPolicyViolationsPreview will be created. Example: // `organizations/my-example-org/locations/global`. -func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview = googlecloudpolicysimulatorv1betaorgpolicyviolationspreview return c } +// OrgPolicyViolationsPreviewId sets the optional parameter +// "orgPolicyViolationsPreviewId": An optional user-specified ID for the +// OrgPolicyViolationsPreview. If not provided, a random ID will be +// generated. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId) + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4629,21 +4754,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) 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_ { @@ -4671,14 +4796,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4709,14 +4834,19 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } return ret, nil // { - // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "orgPolicyViolationsPreviewId": { + // "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", // "location": "path", diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index 983efc144a2..78f9e81737b 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -632,7 +632,7 @@ } } }, - "revision": "20240209", + "revision": "20240217", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -794,6 +794,21 @@ }, "type": "object" }, + "BatchTaskSpec": { + "id": "BatchTaskSpec", + "properties": { + "deleteObjectTaskSpec": { + "$ref": "DeleteObjectTaskSpec" + }, + "listTaskSpec": { + "$ref": "ListTaskSpec" + }, + "metadataTaskSpec": { + "$ref": "MetadataTaskSpec" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -822,6 +837,26 @@ }, "type": "object" }, + "DeleteObjectTaskSpec": { + "id": "DeleteObjectTaskSpec", + "properties": { + "generation": { + "format": "int64", + "type": "string" + }, + "hardDeleteVersionedObject": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "size": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1020,6 +1055,18 @@ }, "type": "object" }, + "ListTaskSpec": { + "id": "ListTaskSpec", + "properties": { + "manifest": { + "$ref": "Manifest" + }, + "objectPrefixes": { + "$ref": "ObjectPrefixes" + } + }, + "type": "object" + }, "ListTransferJobsResponse": { "description": "Response from ListTransferJobs.", "id": "ListTransferJobsResponse", @@ -1085,6 +1132,18 @@ }, "type": "object" }, + "Manifest": { + "id": "Manifest", + "properties": { + "manifestLocation": { + "type": "string" + }, + "root": { + "type": "string" + } + }, + "type": "object" + }, "MetadataOptions": { "description": "Specifies the metadata options for running a transfer.", "id": "MetadataOptions", @@ -1196,7 +1255,7 @@ "type": "string" }, "timeCreated": { - "description": "Specifies how each object's `timeCreated` metadata is preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as TIME_CREATED_SKIP.", + "description": "Specifies how each object's `timeCreated` metadata is preserved for transfers. If unspecified, the default behavior is the same as TIME_CREATED_SKIP.", "enum": [ "TIME_CREATED_UNSPECIFIED", "TIME_CREATED_SKIP", @@ -1205,7 +1264,7 @@ "enumDescriptions": [ "TimeCreated behavior is unspecified.", "Do not preserve the `timeCreated` metadata from the source object.", - "Preserves the source object's `timeCreated` metadata in the `customTime` field in the destination object. Note that any value stored in the source object's `customTime` field will not be propagated to the destination object." + "Preserves the source object's `timeCreated` or `lastModified` metadata in the `customTime` field in the destination object. Note that any value stored in the source object's `customTime` field will not be propagated to the destination object." ], "type": "string" }, @@ -1226,6 +1285,26 @@ }, "type": "object" }, + "MetadataTaskSpec": { + "id": "MetadataTaskSpec", + "properties": { + "bucketName": { + "type": "string" + }, + "generation": { + "format": "int64", + "type": "string" + }, + "key": { + "type": "string" + }, + "size": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "NotificationConfig": { "description": "Specification to configure notifications published to Pub/Sub. Notifications are published to the customer-provided topic using the following `PubsubMessage.attributes`: * `\"eventType\"`: one of the EventType values * `\"payloadFormat\"`: one of the PayloadFormat values * `\"projectId\"`: the project_id of the `TransferOperation` * `\"transferJobName\"`: the transfer_job_name of the `TransferOperation` * `\"transferOperationName\"`: the name of the `TransferOperation` The `PubsubMessage.data` contains a TransferOperation resource formatted according to the specified `PayloadFormat`.", "id": "NotificationConfig", @@ -1311,6 +1390,30 @@ }, "type": "object" }, + "ObjectPrefix": { + "id": "ObjectPrefix", + "properties": { + "bucketName": { + "type": "string" + }, + "objectPrefix": { + "type": "string" + } + }, + "type": "object" + }, + "ObjectPrefixes": { + "id": "ObjectPrefixes", + "properties": { + "objectPrefixes": { + "items": { + "$ref": "ObjectPrefix" + }, + "type": "array" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index cef13f25f44..be9e06f7dc4 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -544,6 +544,38 @@ func (s *BandwidthLimit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BatchTaskSpec struct { + DeleteObjectTaskSpec *DeleteObjectTaskSpec `json:"deleteObjectTaskSpec,omitempty"` + + ListTaskSpec *ListTaskSpec `json:"listTaskSpec,omitempty"` + + MetadataTaskSpec *MetadataTaskSpec `json:"metadataTaskSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DeleteObjectTaskSpec") 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. "DeleteObjectTaskSpec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BatchTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod BatchTaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -596,6 +628,38 @@ func (s *Date) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DeleteObjectTaskSpec struct { + Generation int64 `json:"generation,omitempty,string"` + + HardDeleteVersionedObject bool `json:"hardDeleteVersionedObject,omitempty"` + + Name string `json:"name,omitempty"` + + Size int64 `json:"size,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Generation") 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. "Generation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeleteObjectTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod DeleteObjectTaskSpec + 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 @@ -1050,6 +1114,34 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ListTaskSpec struct { + Manifest *Manifest `json:"manifest,omitempty"` + + ObjectPrefixes *ObjectPrefixes `json:"objectPrefixes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Manifest") 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. "Manifest") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod ListTaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListTransferJobsResponse: Response from ListTransferJobs. type ListTransferJobsResponse struct { // NextPageToken: The list next page token. @@ -1151,6 +1243,35 @@ func (s *LoggingConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type Manifest struct { + ManifestLocation string `json:"manifestLocation,omitempty"` + + Root string `json:"root,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ManifestLocation") 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. "ManifestLocation") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Manifest) MarshalJSON() ([]byte, error) { + type NoMethod Manifest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetadataOptions: Specifies the metadata options for running a // transfer. type MetadataOptions struct { @@ -1251,17 +1372,18 @@ type MetadataOptions struct { TemporaryHold string `json:"temporaryHold,omitempty"` // TimeCreated: Specifies how each object's `timeCreated` metadata is - // preserved for transfers between Google Cloud Storage buckets. If - // unspecified, the default behavior is the same as TIME_CREATED_SKIP. + // preserved for transfers. If unspecified, the default behavior is the + // same as TIME_CREATED_SKIP. // // Possible values: // "TIME_CREATED_UNSPECIFIED" - TimeCreated behavior is unspecified. // "TIME_CREATED_SKIP" - Do not preserve the `timeCreated` metadata // from the source object. // "TIME_CREATED_PRESERVE_AS_CUSTOM_TIME" - Preserves the source - // object's `timeCreated` metadata in the `customTime` field in the - // destination object. Note that any value stored in the source object's - // `customTime` field will not be propagated to the destination object. + // object's `timeCreated` or `lastModified` metadata in the `customTime` + // field in the destination object. Note that any value stored in the + // source object's `customTime` field will not be propagated to the + // destination object. TimeCreated string `json:"timeCreated,omitempty"` // Uid: Specifies how each file's POSIX user ID (UID) attribute should @@ -1298,6 +1420,38 @@ func (s *MetadataOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type MetadataTaskSpec struct { + BucketName string `json:"bucketName,omitempty"` + + Generation int64 `json:"generation,omitempty,string"` + + Key string `json:"key,omitempty"` + + Size int64 `json:"size,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BucketName") 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. "BucketName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MetadataTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod MetadataTaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NotificationConfig: Specification to configure notifications // published to Pub/Sub. Notifications are published to the // customer-provided topic using the following @@ -1476,6 +1630,61 @@ func (s *ObjectConditions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ObjectPrefix struct { + BucketName string `json:"bucketName,omitempty"` + + ObjectPrefix string `json:"objectPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BucketName") 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. "BucketName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ObjectPrefix) MarshalJSON() ([]byte, error) { + type NoMethod ObjectPrefix + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ObjectPrefixes struct { + ObjectPrefixes []*ObjectPrefix `json:"objectPrefixes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ObjectPrefixes") 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. "ObjectPrefixes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ObjectPrefixes) MarshalJSON() ([]byte, error) { + type NoMethod ObjectPrefixes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 5a42c578970..3b93de33dd8 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2681,7 +2681,7 @@ } } }, - "revision": "20240216", + "revision": "20240220", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -7017,7 +7017,7 @@ "description": "Translated strings for the message header." }, "messageType": { - "description": "The type of the message. Currently, this can only be set for offers.", + "description": "The message type.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "TEXT", diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index 8d7372acefd..c0bc3a65c70 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -6355,8 +6355,7 @@ type Message struct { // LocalizedHeader: Translated strings for the message header. LocalizedHeader *LocalizedString `json:"localizedHeader,omitempty"` - // MessageType: The type of the message. Currently, this can only be set - // for offers. + // MessageType: The message type. // // Possible values: // "MESSAGE_TYPE_UNSPECIFIED" diff --git a/workspaceevents/v1/workspaceevents-api.json b/workspaceevents/v1/workspaceevents-api.json index 8f6438d78b5..152110ebd5c 100644 --- a/workspaceevents/v1/workspaceevents-api.json +++ b/workspaceevents/v1/workspaceevents-api.json @@ -404,7 +404,7 @@ } } }, - "revision": "20240215", + "revision": "20240218", "rootUrl": "https://workspaceevents.googleapis.com/", "schemas": { "ListSubscriptionsResponse": { @@ -521,7 +521,7 @@ "type": "object" }, "Subscription": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the [Google Workspace Events API overview](https://developers.google.com/workspace/events/guides).", + "description": "[Developer Preview](https://developers.google.com/workspace/preview). A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the [Google Workspace Events API overview](https://developers.google.com/workspace/events).", "id": "Subscription", "properties": { "authority": { @@ -540,7 +540,7 @@ "type": "string" }, "eventTypes": { - "description": "Required. Immutable. Unordered list. Input for creating a subscription. Otherwise, output only. One or more types of events to receive about the target resource. Formatted according to the CloudEvents specification. For a list of supported event types, see the following documentation: * [Google Chat events](https://developers.google.com/workspace/events/guides/events-chat) * [Google Meet events](https://developers.google.com/workspace/events/guides/events-meet) By default, you also receive events about the [lifecycle of your subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). You don't need to specify lifecycle events for this field. If you specify an event type that doesn't exist for the target resource, the request returns an HTTP `400 Bad Request` status code.", + "description": "Required. Immutable. Unordered list. Input for creating a subscription. Otherwise, output only. One or more types of events to receive about the target resource. Formatted according to the CloudEvents specification. The supported event types depend on the target resource of your subscription. For details, see [Supported Google Workspace events](https://developers.google.com/workspace/events/guides#supported-events). By default, you also receive events about the [lifecycle of your subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). You don't need to specify lifecycle events for this field. If you specify an event type that doesn't exist for the target resource, the request returns an HTTP `400 Bad Request` status code.", "items": { "type": "string" }, @@ -611,7 +611,7 @@ "type": "string" }, "targetResource": { - "description": "Required. Immutable. The Google Workspace resource that's monitored for events, formatted as the [full resource name](https://google.aip.dev/122#full-resource-names). To learn about target resources, see [Supported Google Workspace resources](https://developers.google.com/workspace/events/guides#supported-resources). A user can only authorize your app to create one subscription for a given target resource. If your app tries to create another subscription with the same user credentials, the request returns an `ALREADY_EXISTS` error.", + "description": "Required. Immutable. The Google Workspace resource that's monitored for events, formatted as the [full resource name](https://google.aip.dev/122#full-resource-names). To learn about target resources and the events that they support, see [Supported Google Workspace events](https://developers.google.com/workspace/events#supported-events). A user can only authorize your app to create one subscription for a given target resource. If your app tries to create another subscription with the same user credentials, the request returns an `ALREADY_EXISTS` error.", "type": "string" }, "ttl": { diff --git a/workspaceevents/v1/workspaceevents-gen.go b/workspaceevents/v1/workspaceevents-gen.go index 742d36cc3e3..2235a9d1999 100644 --- a/workspaceevents/v1/workspaceevents-gen.go +++ b/workspaceevents/v1/workspaceevents-gen.go @@ -446,7 +446,7 @@ func (s *Status) MarshalJSON() ([]byte, error) { // (https://developers.google.com/workspace/preview). A subscription to // receive events about a Google Workspace resource. To learn more about // subscriptions, see the Google Workspace Events API overview -// (https://developers.google.com/workspace/events/guides). +// (https://developers.google.com/workspace/events). type Subscription struct { // Authority: Output only. The user who authorized the creation of the // subscription. Format: `users/{user}` For Google Workspace users, the @@ -466,11 +466,10 @@ type Subscription struct { // EventTypes: Required. Immutable. Unordered list. Input for creating a // subscription. Otherwise, output only. One or more types of events to // receive about the target resource. Formatted according to the - // CloudEvents specification. For a list of supported event types, see - // the following documentation: * Google Chat events - // (https://developers.google.com/workspace/events/guides/events-chat) * - // Google Meet events - // (https://developers.google.com/workspace/events/guides/events-meet) + // CloudEvents specification. The supported event types depend on the + // target resource of your subscription. For details, see Supported + // Google Workspace events + // (https://developers.google.com/workspace/events/guides#supported-events). // By default, you also receive events about the lifecycle of your // subscription // (https://developers.google.com/workspace/events/guides/events-lifecycle). @@ -544,9 +543,10 @@ type Subscription struct { // TargetResource: Required. Immutable. The Google Workspace resource // that's monitored for events, formatted as the full resource name // (https://google.aip.dev/122#full-resource-names). To learn about - // target resources, see Supported Google Workspace resources - // (https://developers.google.com/workspace/events/guides#supported-resources). - // A user can only authorize your app to create one subscription for a + // target resources and the events that they support, see Supported + // Google Workspace events + // (https://developers.google.com/workspace/events#supported-events). A + // user can only authorize your app to create one subscription for a // given target resource. If your app tries to create another // subscription with the same user credentials, the request returns an // `ALREADY_EXISTS` error.