diff --git a/api-list.json b/api-list.json index 2a470353619..354b799e990 100644 --- a/api-list.json +++ b/api-list.json @@ -2494,21 +2494,6 @@ "documentationLink": "https://cloud.google.com/discovery-engine/docs", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "displayvideo:v1", - "name": "displayvideo", - "version": "v1", - "title": "Display & Video 360 API", - "description": "Display & Video 360 API allows users to automate complex Display & Video 360 workflows, such as creating insertion orders and setting targeting options for individual line items.", - "discoveryRestUrl": "https://displayvideo.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/display-video/", - "preferred": false - }, { "kind": "discovery#directoryItem", "id": "displayvideo:v2", @@ -2537,21 +2522,6 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://developers.google.com/display-video/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "displayvideo:v4", - "name": "displayvideo", - "version": "v4", - "title": "Display & Video 360 API", - "description": "Display & Video 360 API allows users to automate complex Display & Video 360 workflows, such as creating insertion orders and setting targeting options for individual line items.", - "discoveryRestUrl": "https://displayvideo.googleapis.com/$discovery/rest?version=v4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/display-video/", "preferred": true }, { diff --git a/apphub/v1alpha/apphub-api.json b/apphub/v1alpha/apphub-api.json index 898ebc36ac7..54d8ab7d81c 100644 --- a/apphub/v1alpha/apphub-api.json +++ b/apphub/v1alpha/apphub-api.json @@ -867,52 +867,6 @@ }, "discoveredServices": { "methods": { - "find": { - "description": "Finds discovered services that could be added to an application in a host project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices:find", - "httpMethod": "GET", - "id": "apphub.projects.locations.discoveredServices.find", - "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": "v1alpha/{+parent}/discoveredServices:find", - "response": { - "$ref": "FindDiscoveredServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "findUnregistered": { "description": "Finds unregistered services in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices:findUnregistered", @@ -1034,52 +988,6 @@ }, "discoveredWorkloads": { "methods": { - "find": { - "description": "Finds discovered workloads that could be added to an application in a host project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads:find", - "httpMethod": "GET", - "id": "apphub.projects.locations.discoveredWorkloads.find", - "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": "v1alpha/{+parent}/discoveredWorkloads:find", - "response": { - "$ref": "FindDiscoveredWorkloadsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "findUnregistered": { "description": "Finds unregistered workloads in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads:findUnregistered", @@ -1470,7 +1378,7 @@ } } }, - "revision": "20240125", + "revision": "20240211", "rootUrl": "https://apphub.googleapis.com/", "schemas": { "Application": { @@ -1785,56 +1693,6 @@ }, "type": "object" }, - "FindDiscoveredServicesResponse": { - "description": "Response for FindDiscoveredServices.", - "id": "FindDiscoveredServicesResponse", - "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" - }, - "FindDiscoveredWorkloadsResponse": { - "description": "Response for FindDiscoveredWorkloads.", - "id": "FindDiscoveredWorkloadsResponse", - "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" - }, "FindUnregisteredServicesResponse": { "description": "Response for FindUnregisteredServices.", "id": "FindUnregisteredServicesResponse", diff --git a/apphub/v1alpha/apphub-gen.go b/apphub/v1alpha/apphub-gen.go index 4ec99d812fe..427fc717a70 100644 --- a/apphub/v1alpha/apphub-gen.go +++ b/apphub/v1alpha/apphub-gen.go @@ -885,87 +885,6 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FindDiscoveredServicesResponse: Response for FindDiscoveredServices. -type FindDiscoveredServicesResponse 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"` - - // 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. "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. "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 *FindDiscoveredServicesResponse) MarshalJSON() ([]byte, error) { - type NoMethod FindDiscoveredServicesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FindDiscoveredWorkloadsResponse: Response for -// FindDiscoveredWorkloads. -type FindDiscoveredWorkloadsResponse 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 *FindDiscoveredWorkloadsResponse) MarshalJSON() ([]byte, error) { - type NoMethod FindDiscoveredWorkloadsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // FindUnregisteredServicesResponse: Response for // FindUnregisteredServices. type FindUnregisteredServicesResponse struct { @@ -5972,223 +5891,6 @@ func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Do(opts ...googleapi.C } -// method id "apphub.projects.locations.discoveredServices.find": - -type ProjectsLocationsDiscoveredServicesFindCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Find: Finds discovered services that could be added to an application -// in a host project and location. -// -// - parent: Value for parent. -func (r *ProjectsLocationsDiscoveredServicesService) Find(parent string) *ProjectsLocationsDiscoveredServicesFindCall { - c := &ProjectsLocationsDiscoveredServicesFindCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsDiscoveredServicesFindCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesFindCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results -func (c *ProjectsLocationsDiscoveredServicesFindCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesFindCall { - 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 *ProjectsLocationsDiscoveredServicesFindCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesFindCall { - 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 *ProjectsLocationsDiscoveredServicesFindCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesFindCall { - 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 *ProjectsLocationsDiscoveredServicesFindCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesFindCall { - 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 *ProjectsLocationsDiscoveredServicesFindCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesFindCall { - 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 *ProjectsLocationsDiscoveredServicesFindCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesFindCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsDiscoveredServicesFindCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDiscoveredServicesFindCall) 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, "v1alpha/{+parent}/discoveredServices:find") - 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.discoveredServices.find" call. -// Exactly one of *FindDiscoveredServicesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *FindDiscoveredServicesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDiscoveredServicesFindCall) Do(opts ...googleapi.CallOption) (*FindDiscoveredServicesResponse, error) { - gensupport.SetOptions(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 := &FindDiscoveredServicesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Finds discovered services that could be added to an application in a host project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices:find", - // "httpMethod": "GET", - // "id": "apphub.projects.locations.discoveredServices.find", - // "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": "v1alpha/{+parent}/discoveredServices:find", - // "response": { - // "$ref": "FindDiscoveredServicesResponse" - // }, - // "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 *ProjectsLocationsDiscoveredServicesFindCall) Pages(ctx context.Context, f func(*FindDiscoveredServicesResponse) 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.discoveredServices.findUnregistered": type ProjectsLocationsDiscoveredServicesFindUnregisteredCall struct { @@ -6768,223 +6470,6 @@ func (c *ProjectsLocationsDiscoveredServicesListCall) Pages(ctx context.Context, } } -// method id "apphub.projects.locations.discoveredWorkloads.find": - -type ProjectsLocationsDiscoveredWorkloadsFindCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Find: Finds discovered workloads that could be added to an -// application in a host project and location. -// -// - parent: Value for parent. -func (r *ProjectsLocationsDiscoveredWorkloadsService) Find(parent string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c := &ProjectsLocationsDiscoveredWorkloadsFindCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - 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 *ProjectsLocationsDiscoveredWorkloadsFindCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsFindCall { - 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 *ProjectsLocationsDiscoveredWorkloadsFindCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - 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 *ProjectsLocationsDiscoveredWorkloadsFindCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsFindCall { - 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 *ProjectsLocationsDiscoveredWorkloadsFindCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - 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 *ProjectsLocationsDiscoveredWorkloadsFindCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) 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, "v1alpha/{+parent}/discoveredWorkloads:find") - 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.discoveredWorkloads.find" call. -// Exactly one of *FindDiscoveredWorkloadsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *FindDiscoveredWorkloadsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Do(opts ...googleapi.CallOption) (*FindDiscoveredWorkloadsResponse, error) { - gensupport.SetOptions(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 := &FindDiscoveredWorkloadsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Finds discovered workloads that could be added to an application in a host project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads:find", - // "httpMethod": "GET", - // "id": "apphub.projects.locations.discoveredWorkloads.find", - // "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": "v1alpha/{+parent}/discoveredWorkloads:find", - // "response": { - // "$ref": "FindDiscoveredWorkloadsResponse" - // }, - // "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 *ProjectsLocationsDiscoveredWorkloadsFindCall) Pages(ctx context.Context, f func(*FindDiscoveredWorkloadsResponse) 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.discoveredWorkloads.findUnregistered": type ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall struct { diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index b1c61069651..b9691a80123 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1844,7 +1844,7 @@ } } }, - "revision": "20240124", + "revision": "20240203", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3153,6 +3153,11 @@ "format": "int64", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "satisfiesPzs": { "description": "Output only. Reserved for future use.", "readOnly": true, @@ -4359,8 +4364,8 @@ "ESTIMATED_PERFORMANCE_GAIN_TOO_LOW", "NOT_SUPPORTED_IN_STANDARD_EDITION", "INDEX_SUPPRESSED_BY_FUNCTION_OPTION", - "INTERNAL_ERROR", "QUERY_CACHE_HIT", + "INTERNAL_ERROR", "OTHER_REASON" ], "enumDescriptions": [ @@ -4378,11 +4383,11 @@ "Indicates that the search index and the search function call do not have the same text analyzer.", "Indicates the base table is too small (below a certain threshold). The index does not provide noticeable search performance gains when the base table is too small.", "Indicates that the total size of indexed base tables in your organization exceeds your region's limit and the index is not used in the query. To index larger base tables, you can use your own reservation for index-management jobs.", - "Indicates that the esitmated performance gain from using the search index is too low for the given search query.", + "Indicates that the estimated performance gain from using the search index is too low for the given search query.", "Indicates that search indexes can not be used for search query with STANDARD edition.", "Indicates that an option in the search function that cannot make use of the index has been selected.", - "Indicates an internal error that causes the search index to be unused.", "Indicates that the query was cached, and thus the search index was not used.", + "Indicates an internal error that causes the search index to be unused.", "Indicates that the reason search indexes cannot be used in the query is not covered by any of the other IndexUnusedReason options." ], "type": "string" @@ -4733,6 +4738,10 @@ }, "type": "array" }, + "copyFilesOnly": { + "description": "Optional. [Experimental] Configures the load job to only copy files to the destination BigLake managed table with an external storage_uri, without reading file content and writing them to new files. Copying files only is supported when: * source_uris are in the same external storage system as the destination table but they do not overlap with storage_uri of the destination table. * source_format is the same file format as the destination table. * destination_table is an existing BigLake managed table. Its schema does not have default value expression. It schema does not have type parameters other than precision and scale. * No options other than the above are specified.", + "type": "boolean" + }, "createDisposition": { "description": "Optional. Specifies whether the job is allowed to create new tables. The following values are supported: * CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. * CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.", "type": "string" @@ -5620,7 +5629,7 @@ }, "vectorSearchStatistics": { "$ref": "VectorSearchStatistics", - "description": "Output only. Search query specific statistics.", + "description": "Output only. Vector Search query specific statistics.", "readOnly": true } }, diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 25233098be6..df5a6d58de8 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -2467,6 +2467,9 @@ type Dataset struct { // default value is 168 hours if this is not set. MaxTimeTravelHours int64 `json:"maxTimeTravelHours,omitempty,string"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` @@ -4525,7 +4528,7 @@ type IndexUnusedReason struct { // base tables in your organization exceeds your region's limit and the // index is not used in the query. To index larger base tables, you can // use your own reservation for index-management jobs. - // "ESTIMATED_PERFORMANCE_GAIN_TOO_LOW" - Indicates that the esitmated + // "ESTIMATED_PERFORMANCE_GAIN_TOO_LOW" - Indicates that the estimated // performance gain from using the search index is too low for the given // search query. // "NOT_SUPPORTED_IN_STANDARD_EDITION" - Indicates that search indexes @@ -4533,10 +4536,10 @@ type IndexUnusedReason struct { // "INDEX_SUPPRESSED_BY_FUNCTION_OPTION" - Indicates that an option in // the search function that cannot make use of the index has been // selected. - // "INTERNAL_ERROR" - Indicates an internal error that causes the - // search index to be unused. // "QUERY_CACHE_HIT" - Indicates that the query was cached, and thus // the search index was not used. + // "INTERNAL_ERROR" - Indicates an internal error that causes the + // search index to be unused. // "OTHER_REASON" - Indicates that the reason search indexes cannot be // used in the query is not covered by any of the other // IndexUnusedReason options. @@ -5101,6 +5104,19 @@ type JobConfigurationLoad struct { // appearing as the dataset id. ConnectionProperties []*ConnectionProperty `json:"connectionProperties,omitempty"` + // CopyFilesOnly: Optional. [Experimental] Configures the load job to + // only copy files to the destination BigLake managed table with an + // external storage_uri, without reading file content and writing them + // to new files. Copying files only is supported when: * source_uris are + // in the same external storage system as the destination table but they + // do not overlap with storage_uri of the destination table. * + // source_format is the same file format as the destination table. * + // destination_table is an existing BigLake managed table. Its schema + // does not have default value expression. It schema does not have type + // parameters other than precision and scale. * No options other than + // the above are specified. + CopyFilesOnly bool `json:"copyFilesOnly,omitempty"` + // CreateDisposition: Optional. Specifies whether the job is allowed to // create new tables. The following values are supported: * // CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the @@ -6315,7 +6331,7 @@ type JobStatistics2 struct { // undeclared query parameters detected during a dry run validation. UndeclaredQueryParameters []*QueryParameter `json:"undeclaredQueryParameters,omitempty"` - // VectorSearchStatistics: Output only. Search query specific + // VectorSearchStatistics: Output only. Vector Search query specific // statistics. VectorSearchStatistics *VectorSearchStatistics `json:"vectorSearchStatistics,omitempty"` diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index b20ce636894..f7be4a42ea6 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -706,7 +706,7 @@ } } }, - "revision": "20240119", + "revision": "20240209", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -810,7 +810,7 @@ "id": "AttestationSource", "properties": { "containerAnalysisAttestationProjects": { - "description": "The IDs of the GCP projects storing the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.", + "description": "The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.", "items": { "type": "string" }, @@ -913,6 +913,10 @@ "$ref": "ImageFreshnessCheck", "description": "Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time." }, + "sigstoreSignatureCheck": { + "$ref": "SigstoreSignatureCheck", + "description": "Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry." + }, "simpleSigningAttestationCheck": { "$ref": "SimpleSigningAttestationCheck", "description": "Optional. Require a SimpleSigning-type attestation for every image in the deployment." @@ -1323,6 +1327,60 @@ }, "type": "object" }, + "SigstoreAuthority": { + "description": "A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.", + "id": "SigstoreAuthority", + "properties": { + "displayName": { + "description": "Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", + "type": "string" + }, + "publicKeySet": { + "$ref": "SigstorePublicKeySet", + "description": "Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature." + } + }, + "type": "object" + }, + "SigstorePublicKey": { + "description": "A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.", + "id": "SigstorePublicKey", + "properties": { + "publicKeyPem": { + "description": "The public key material in PEM format.", + "type": "string" + } + }, + "type": "object" + }, + "SigstorePublicKeySet": { + "description": "A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it.", + "id": "SigstorePublicKeySet", + "properties": { + "publicKeys": { + "description": "Required. `public_keys` must have at least one entry.", + "items": { + "$ref": "SigstorePublicKey" + }, + "type": "array" + } + }, + "type": "object" + }, + "SigstoreSignatureCheck": { + "description": "A Sigstore signature check, which verifies the Sigstore signature associated with an image.", + "id": "SigstoreSignatureCheck", + "properties": { + "sigstoreAuthorities": { + "description": "Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.", + "items": { + "$ref": "SigstoreAuthority" + }, + "type": "array" + } + }, + "type": "object" + }, "SimpleSigningAttestationCheck": { "description": "Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning.", "id": "SimpleSigningAttestationCheck", diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index e3d64f26a3b..1b2dbfe899e 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -422,9 +422,9 @@ func (s *AttestationOccurrence) MarshalJSON() ([]byte, error) { // AttestationSource: Specifies the locations for fetching the // provenance attestations. type AttestationSource struct { - // ContainerAnalysisAttestationProjects: The IDs of the GCP projects - // storing the SLSA attestations as Container Analysis Occurrences, in - // the format `projects/[PROJECT_ID]`. Maximum number of + // ContainerAnalysisAttestationProjects: The IDs of the Google Cloud + // projects that store the SLSA attestations as Container Analysis + // Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of // `container_analysis_attestation_projects` allowed in each // `AttestationSource` is 10. ContainerAnalysisAttestationProjects []string `json:"containerAnalysisAttestationProjects,omitempty"` @@ -694,6 +694,11 @@ type Check struct { // time. ImageFreshnessCheck *ImageFreshnessCheck `json:"imageFreshnessCheck,omitempty"` + // SigstoreSignatureCheck: Optional. Require that an image was signed by + // Cosign with a trusted key. This check requires that both the image + // and signature are stored in Artifact Registry. + SigstoreSignatureCheck *SigstoreSignatureCheck `json:"sigstoreSignatureCheck,omitempty"` + // SimpleSigningAttestationCheck: Optional. Require a SimpleSigning-type // attestation for every image in the deployment. SimpleSigningAttestationCheck *SimpleSigningAttestationCheck `json:"simpleSigningAttestationCheck,omitempty"` @@ -1583,6 +1588,135 @@ func (s *Signature) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SigstoreAuthority: A Sigstore authority, used to verify signatures +// that are created by Sigstore. An authority is analogous to an +// attestation authenticator, verifying that a signature is valid or +// invalid. +type SigstoreAuthority struct { + // DisplayName: Optional. A user-provided name for this + // `SigstoreAuthority`. This field has no effect on the policy + // evaluation behavior except to improve readability of messages in + // evaluation results. + DisplayName string `json:"displayName,omitempty"` + + // PublicKeySet: Required. A simple set of public keys. A signature is + // considered valid if any keys in the set validate the signature. + PublicKeySet *SigstorePublicKeySet `json:"publicKeySet,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 *SigstoreAuthority) MarshalJSON() ([]byte, error) { + type NoMethod SigstoreAuthority + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SigstorePublicKey: A Sigstore public key. `SigstorePublicKey` is the +// public key material used to authenticate Sigstore signatures. +type SigstorePublicKey struct { + // PublicKeyPem: The public key material in PEM format. + PublicKeyPem string `json:"publicKeyPem,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PublicKeyPem") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicKeyPem") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SigstorePublicKey) MarshalJSON() ([]byte, error) { + type NoMethod SigstorePublicKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SigstorePublicKeySet: A bundle of Sigstore public keys, used to +// verify Sigstore signatures. A signature is authenticated by a +// `SigstorePublicKeySet` if any of the keys verify it. +type SigstorePublicKeySet struct { + // PublicKeys: Required. `public_keys` must have at least one entry. + PublicKeys []*SigstorePublicKey `json:"publicKeys,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PublicKeys") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicKeys") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SigstorePublicKeySet) MarshalJSON() ([]byte, error) { + type NoMethod SigstorePublicKeySet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SigstoreSignatureCheck: A Sigstore signature check, which verifies +// the Sigstore signature associated with an image. +type SigstoreSignatureCheck struct { + // SigstoreAuthorities: Required. The authorities required by this check + // to verify the signature. A signature only needs to be verified by one + // authority to pass the check. + SigstoreAuthorities []*SigstoreAuthority `json:"sigstoreAuthorities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SigstoreAuthorities") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SigstoreAuthorities") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SigstoreSignatureCheck) MarshalJSON() ([]byte, error) { + type NoMethod SigstoreSignatureCheck + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SimpleSigningAttestationCheck: Require a signed DSSE // (https://github.com/secure-systems-lab/dsse) attestation with type // SimpleSigning. diff --git a/books/v1/books-api.json b/books/v1/books-api.json index 8cdf703d446..56896ff6d2c 100644 --- a/books/v1/books-api.json +++ b/books/v1/books-api.json @@ -1241,6 +1241,11 @@ "required": true, "type": "string" }, + "source": { + "description": "Optional. String to identify the originator of this request.", + "location": "query", + "type": "string" + }, "volumeId": { "description": "Volume id to get the summary for.", "location": "query", @@ -2672,7 +2677,7 @@ } } }, - "revision": "20230207", + "revision": "20240214", "rootUrl": "https://books.googleapis.com/", "schemas": { "Annotation": { diff --git a/books/v1/books-gen.go b/books/v1/books-gen.go index ff5ff826076..fbc9feaab05 100644 --- a/books/v1/books-gen.go +++ b/books/v1/books-gen.go @@ -9413,6 +9413,13 @@ func (r *MylibraryAnnotationsService) Summary(layerIds []string, volumeId string return c } +// Source sets the optional parameter "source": String to identify the +// originator of this request. +func (c *MylibraryAnnotationsSummaryCall) Source(source string) *MylibraryAnnotationsSummaryCall { + c.urlParams_.Set("source", source) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9512,6 +9519,11 @@ func (c *MylibraryAnnotationsSummaryCall) Do(opts ...googleapi.CallOption) (*Ann // "required": true, // "type": "string" // }, + // "source": { + // "description": "Optional. String to identify the originator of this request.", + // "location": "query", + // "type": "string" + // }, // "volumeId": { // "description": "Volume id to get the summary for.", // "location": "query", diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json index e561151891d..24162c3b34d 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -1588,7 +1588,7 @@ } } }, - "revision": "20240104", + "revision": "20240214", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -1709,7 +1709,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "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).", "type": "string" } }, diff --git a/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/deploymentmanager/v0.alpha/deploymentmanager-gen.go index 10fd905417c..f0c8f15eb37 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-gen.go +++ b/deploymentmanager/v0.alpha/deploymentmanager-gen.go @@ -536,7 +536,11 @@ type Binding struct { 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 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 diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index ef87d2eba07..040f1827aaf 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -149,7 +149,7 @@ ] }, "create": { - "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v2/advertisers", "httpMethod": "POST", "id": "displayvideo.advertisers.create", @@ -452,7 +452,7 @@ ] }, "delete": { - "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v2/advertisers/{advertisersId}/campaigns/{campaignsId}", "httpMethod": "DELETE", "id": "displayvideo.advertisers.campaigns.delete", @@ -1378,7 +1378,7 @@ ] }, "replace": { - "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", "httpMethod": "POST", "id": "displayvideo.advertisers.channels.sites.replace", @@ -2765,7 +2765,7 @@ ] }, "duplicate": { - "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.duplicate", @@ -2914,7 +2914,7 @@ ] }, "patch": { - "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}", "httpMethod": "PATCH", "id": "displayvideo.advertisers.lineItems.patch", @@ -7970,7 +7970,7 @@ ] }, "replace": { - "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v2/partners/{partnerId}/channels/{channelsId}/sites:replace", "httpMethod": "POST", "id": "displayvideo.partners.channels.sites.replace", @@ -9267,7 +9267,7 @@ } } }, - "revision": "20240201", + "revision": "20240215", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -9582,7 +9582,7 @@ "type": "string" }, "obaComplianceDisabled": { - "description": "Whether or not to use DV360's Online Behavioral Advertising (OBA) compliance. Starting on February 9, 2024, this field will be affected by an update to the Display \u0026 Video 360 API Terms of Service. See our [announcement](//ads-developers.googleblog.com/2024/01/update-to-display-video-360-api-terms.html) for more detail. Warning: Changing OBA settings may cause the audit status of your creatives to be reset by some ad exchanges, making them ineligible to serve until they are re-approved.", + "description": "Whether or not to disable Google's About this Ad feature that adds badging (to identify the content as an ad) and transparency information (on interaction with About this Ad) to your ads for Online Behavioral Advertising (OBA) and regulatory requirements. About this Ad gives users greater control over the ads they see and helps you explain why they're seeing your ad. [Learn more](//support.google.com/displayvideo/answer/14315795). If you choose to set this field to `true`, note that ads served through Display \u0026 Video 360 must comply to the following: * Be Online Behavioral Advertising (OBA) compliant, as per your contract with Google Marketing Platform. * In the European Economic Area (EEA), include transparency information and a mechanism for users to report illegal content in ads. If using an alternative ad badging, transparency, and reporting solution, you must ensure it includes the required transparency information and illegal content flagging mechanism and that you notify Google of any illegal content reports using the appropriate [form](//support.google.com/legal/troubleshooter/1114905?sjid=6787484030557261960-EU#ts=2981967%2C2982031%2C12980091).", "type": "boolean" }, "videoCreativeDataSharingAuthorized": { @@ -14083,7 +14083,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14160,7 +14166,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" } @@ -14262,7 +14274,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14339,7 +14357,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -14442,7 +14466,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14519,7 +14549,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -14623,7 +14659,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14700,7 +14742,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "readOnly": true, "type": "string" @@ -15655,7 +15703,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15732,7 +15786,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -16552,7 +16612,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -16629,7 +16695,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index 0ba073c5eb7..91e2a565916 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -1135,15 +1135,25 @@ type AdvertiserCreativeConfig struct { // "Campaign Monitor" tag containing this ID to the creative tag. IasClientId int64 `json:"iasClientId,omitempty,string"` - // ObaComplianceDisabled: Whether or not to use DV360's Online - // Behavioral Advertising (OBA) compliance. Starting on February 9, - // 2024, this field will be affected by an update to the Display & Video - // 360 API Terms of Service. See our announcement - // (//ads-developers.googleblog.com/2024/01/update-to-display-video-360-a - // pi-terms.html) for more detail. Warning: Changing OBA settings may - // cause the audit status of your creatives to be reset by some ad - // exchanges, making them ineligible to serve until they are - // re-approved. + // ObaComplianceDisabled: Whether or not to disable Google's About this + // Ad feature that adds badging (to identify the content as an ad) and + // transparency information (on interaction with About this Ad) to your + // ads for Online Behavioral Advertising (OBA) and regulatory + // requirements. About this Ad gives users greater control over the ads + // they see and helps you explain why they're seeing your ad. Learn more + // (//support.google.com/displayvideo/answer/14315795). If you choose to + // set this field to `true`, note that ads served through Display & + // Video 360 must comply to the following: * Be Online Behavioral + // Advertising (OBA) compliant, as per your contract with Google + // Marketing Platform. * In the European Economic Area (EEA), include + // transparency information and a mechanism for users to report illegal + // content in ads. If using an alternative ad badging, transparency, and + // reporting solution, you must ensure it includes the required + // transparency information and illegal content flagging mechanism and + // that you notify Google of any illegal content reports using the + // appropriate form + // (//support.google.com/legal/troubleshooter/1114905?sjid=67874840305572 + // 61960-EU#ts=2981967%2C2982031%2C12980091). ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"` // VideoCreativeDataSharingAuthorized: By setting this field to `true`, @@ -8282,6 +8292,12 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -8420,6 +8436,12 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. @@ -8540,6 +8562,12 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -8659,6 +8687,12 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -9898,6 +9932,12 @@ type GuaranteedOrder struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the @@ -10843,6 +10883,12 @@ type InventorySource struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that @@ -18881,8 +18927,10 @@ type AdvertisersCreateCall struct { } // Create: Creates a new advertiser. Returns the newly created -// advertiser if successful. This method can take up to 180 seconds to -// complete. +// advertiser if successful. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall { c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiser = advertiser @@ -18977,7 +19025,7 @@ func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, e } return ret, nil // { - // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v2/advertisers", // "httpMethod": "POST", // "id": "displayvideo.advertisers.create", @@ -20453,6 +20501,10 @@ type AdvertisersCampaignsDeleteCall struct { // Delete: Permanently deletes a campaign. A deleted campaign cannot be // recovered. The campaign should be archived first, i.e. set // entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. +// **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this campaign belongs to. // - campaignId: The ID of the campaign we need to delete. @@ -20550,7 +20602,7 @@ func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empt } return ret, nil // { - // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v2/advertisers/{advertisersId}/campaigns/{campaignsId}", // "httpMethod": "DELETE", // "id": "displayvideo.advertisers.campaigns.delete", @@ -23649,7 +23701,11 @@ type AdvertisersChannelsSitesReplaceCall struct { // Replace: Replaces all of the sites under a single channel. The // operation will replace the sites under a channel with the sites -// provided in ReplaceSitesRequest.new_sites. +// provided in ReplaceSitesRequest.new_sites. **This method regularly +// experiences high latency.** We recommend increasing your default +// timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser that owns the parent // channel. @@ -23755,7 +23811,7 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v2/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", // "httpMethod": "POST", // "id": "displayvideo.advertisers.channels.sites.replace", @@ -28427,7 +28483,10 @@ type AdvertisersLineItemsDuplicateCall struct { // Duplicate: Duplicates a line item. Returns the ID of the created line // item if successful. YouTube & Partners line items cannot be created -// or updated using the API. +// or updated using the API. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this line item belongs to. // - lineItemId: The ID of the line item to duplicate. @@ -28531,7 +28590,7 @@ func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*D } return ret, nil // { - // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.duplicate", @@ -29147,7 +29206,10 @@ type AdvertisersLineItemsPatchCall struct { // BulkEditAssignedTargetingOptions * BulkUpdateLineItems * // assignedTargetingOptions.create * assignedTargetingOptions.delete // YouTube & Partners line items cannot be created or updated using the -// API. +// API. **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: Output only. The unique ID of the advertiser the line // item belongs to. @@ -29260,7 +29322,7 @@ func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineI } return ret, nil // { - // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}", // "httpMethod": "PATCH", // "id": "displayvideo.advertisers.lineItems.patch", @@ -48015,7 +48077,11 @@ type PartnersChannelsSitesReplaceCall struct { // Replace: Replaces all of the sites under a single channel. The // operation will replace the sites under a channel with the sites -// provided in ReplaceSitesRequest.new_sites. +// provided in ReplaceSitesRequest.new_sites. **This method regularly +// experiences high latency.** We recommend increasing your default +// timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - channelId: The ID of the parent channel whose sites will be // replaced. @@ -48120,7 +48186,7 @@ func (c *PartnersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*Re } return ret, nil // { - // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v2/partners/{partnerId}/channels/{channelsId}/sites:replace", // "httpMethod": "POST", // "id": "displayvideo.partners.channels.sites.replace", diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index 04cf32e66f7..3aef0ec0c44 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -149,7 +149,7 @@ ] }, "create": { - "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v3/advertisers", "httpMethod": "POST", "id": "displayvideo.advertisers.create", @@ -1007,7 +1007,7 @@ ] }, "delete": { - "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v3/advertisers/{advertisersId}/campaigns/{campaignsId}", "httpMethod": "DELETE", "id": "displayvideo.advertisers.campaigns.delete", @@ -1933,7 +1933,7 @@ ] }, "replace": { - "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v3/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", "httpMethod": "POST", "id": "displayvideo.advertisers.channels.sites.replace", @@ -3320,7 +3320,7 @@ ] }, "duplicate": { - "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.duplicate", @@ -3469,7 +3469,7 @@ ] }, "patch": { - "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}", "httpMethod": "PATCH", "id": "displayvideo.advertisers.lineItems.patch", @@ -7925,7 +7925,7 @@ ] }, "replace": { - "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", "flatPath": "v3/partners/{partnerId}/channels/{channelsId}/sites:replace", "httpMethod": "POST", "id": "displayvideo.partners.channels.sites.replace", @@ -9222,7 +9222,7 @@ } } }, - "revision": "20240201", + "revision": "20240215", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -9724,7 +9724,7 @@ "type": "string" }, "obaComplianceDisabled": { - "description": "Whether or not to use DV360's Online Behavioral Advertising (OBA) compliance. Starting on February 9, 2024, this field will be affected by an update to the Display \u0026 Video 360 API Terms of Service. See our [announcement](//ads-developers.googleblog.com/2024/01/update-to-display-video-360-api-terms.html) for more detail. Warning: Changing OBA settings may cause the audit status of your creatives to be reset by some ad exchanges, making them ineligible to serve until they are re-approved.", + "description": "Whether or not to disable Google's About this Ad feature that adds badging (to identify the content as an ad) and transparency information (on interaction with About this Ad) to your ads for Online Behavioral Advertising (OBA) and regulatory requirements. About this Ad gives users greater control over the ads they see and helps you explain why they're seeing your ad. [Learn more](//support.google.com/displayvideo/answer/14315795). If you choose to set this field to `true`, note that ads served through Display \u0026 Video 360 must comply to the following: * Be Online Behavioral Advertising (OBA) compliant, as per your contract with Google Marketing Platform. * In the European Economic Area (EEA), include transparency information and a mechanism for users to report illegal content in ads. If using an alternative ad badging, transparency, and reporting solution, you must ensure it includes the required transparency information and illegal content flagging mechanism and that you notify Google of any illegal content reports using the appropriate [form](//support.google.com/legal/troubleshooter/1114905?sjid=6787484030557261960-EU#ts=2981967%2C2982031%2C12980091).", "type": "boolean" }, "videoCreativeDataSharingAuthorized": { @@ -10041,7 +10041,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -10118,7 +10124,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -14783,7 +14795,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14860,7 +14878,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" } @@ -14962,7 +14986,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15039,7 +15069,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -15142,7 +15178,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15219,7 +15261,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -15323,7 +15371,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15400,7 +15454,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "readOnly": true, "type": "string" @@ -16355,7 +16415,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -16432,7 +16498,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -17230,7 +17302,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -17307,7 +17385,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, diff --git a/displayvideo/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index 6b44accb2b2..dc118299ca9 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -1366,15 +1366,25 @@ type AdvertiserCreativeConfig struct { // "Campaign Monitor" tag containing this ID to the creative tag. IasClientId int64 `json:"iasClientId,omitempty,string"` - // ObaComplianceDisabled: Whether or not to use DV360's Online - // Behavioral Advertising (OBA) compliance. Starting on February 9, - // 2024, this field will be affected by an update to the Display & Video - // 360 API Terms of Service. See our announcement - // (//ads-developers.googleblog.com/2024/01/update-to-display-video-360-a - // pi-terms.html) for more detail. Warning: Changing OBA settings may - // cause the audit status of your creatives to be reset by some ad - // exchanges, making them ineligible to serve until they are - // re-approved. + // ObaComplianceDisabled: Whether or not to disable Google's About this + // Ad feature that adds badging (to identify the content as an ad) and + // transparency information (on interaction with About this Ad) to your + // ads for Online Behavioral Advertising (OBA) and regulatory + // requirements. About this Ad gives users greater control over the ads + // they see and helps you explain why they're seeing your ad. Learn more + // (//support.google.com/displayvideo/answer/14315795). If you choose to + // set this field to `true`, note that ads served through Display & + // Video 360 must comply to the following: * Be Online Behavioral + // Advertising (OBA) compliant, as per your contract with Google + // Marketing Platform. * In the European Economic Area (EEA), include + // transparency information and a mechanism for users to report illegal + // content in ads. If using an alternative ad badging, transparency, and + // reporting solution, you must ensure it includes the required + // transparency information and illegal content flagging mechanism and + // that you notify Google of any illegal content reports using the + // appropriate form + // (//support.google.com/legal/troubleshooter/1114905?sjid=67874840305572 + // 61960-EU#ts=2981967%2C2982031%2C12980091). ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"` // VideoCreativeDataSharingAuthorized: By setting this field to `true`, @@ -1878,6 +1888,12 @@ type AlgorithmRulesComparisonValue struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. ExchangeValue string `json:"exchangeValue,omitempty"` // Int64Value: Integer value. @@ -9212,6 +9228,12 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -9350,6 +9372,12 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. @@ -9470,6 +9498,12 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -9589,6 +9623,12 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -10828,6 +10868,12 @@ type GuaranteedOrder struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the @@ -11763,6 +11809,12 @@ type InventorySource struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that @@ -19564,8 +19616,10 @@ type AdvertisersCreateCall struct { } // Create: Creates a new advertiser. Returns the newly created -// advertiser if successful. This method can take up to 180 seconds to -// complete. +// advertiser if successful. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall { c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiser = advertiser @@ -19660,7 +19714,7 @@ func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, e } return ret, nil // { - // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v3/advertisers", // "httpMethod": "POST", // "id": "displayvideo.advertisers.create", @@ -22866,6 +22920,10 @@ type AdvertisersCampaignsDeleteCall struct { // Delete: Permanently deletes a campaign. A deleted campaign cannot be // recovered. The campaign should be archived first, i.e. set // entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. +// **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this campaign belongs to. // - campaignId: The ID of the campaign we need to delete. @@ -22963,7 +23021,7 @@ func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empt } return ret, nil // { - // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v3/advertisers/{advertisersId}/campaigns/{campaignsId}", // "httpMethod": "DELETE", // "id": "displayvideo.advertisers.campaigns.delete", @@ -26062,7 +26120,11 @@ type AdvertisersChannelsSitesReplaceCall struct { // Replace: Replaces all of the sites under a single channel. The // operation will replace the sites under a channel with the sites -// provided in ReplaceSitesRequest.new_sites. +// provided in ReplaceSitesRequest.new_sites. **This method regularly +// experiences high latency.** We recommend increasing your default +// timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser that owns the parent // channel. @@ -26168,7 +26230,7 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v3/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", // "httpMethod": "POST", // "id": "displayvideo.advertisers.channels.sites.replace", @@ -30840,7 +30902,10 @@ type AdvertisersLineItemsDuplicateCall struct { // Duplicate: Duplicates a line item. Returns the ID of the created line // item if successful. YouTube & Partners line items cannot be created -// or updated using the API. +// or updated using the API. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this line item belongs to. // - lineItemId: The ID of the line item to duplicate. @@ -30944,7 +31009,7 @@ func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*D } return ret, nil // { - // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.duplicate", @@ -31560,7 +31625,10 @@ type AdvertisersLineItemsPatchCall struct { // BulkEditAssignedTargetingOptions * BulkUpdateLineItems * // assignedTargetingOptions.create * assignedTargetingOptions.delete // YouTube & Partners line items cannot be created or updated using the -// API. +// API. **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: Output only. The unique ID of the advertiser the line // item belongs to. @@ -31673,7 +31741,7 @@ func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineI } return ret, nil // { - // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}", // "httpMethod": "PATCH", // "id": "displayvideo.advertisers.lineItems.patch", @@ -48436,7 +48504,11 @@ type PartnersChannelsSitesReplaceCall struct { // Replace: Replaces all of the sites under a single channel. The // operation will replace the sites under a channel with the sites -// provided in ReplaceSitesRequest.new_sites. +// provided in ReplaceSitesRequest.new_sites. **This method regularly +// experiences high latency.** We recommend increasing your default +// timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - channelId: The ID of the parent channel whose sites will be // replaced. @@ -48541,7 +48613,7 @@ func (c *PartnersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*Re } return ret, nil // { - // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.", // "flatPath": "v3/partners/{partnerId}/channels/{channelsId}/sites:replace", // "httpMethod": "POST", // "id": "displayvideo.partners.channels.sites.replace", diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 421e977d70a..f9ee2a492f6 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4487,7 +4487,7 @@ ] }, "executeBundle": { - "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch` and `transaction`, processing them according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a transaction bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", + "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction and history operations. ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch`, `transaction` and `history`, processing `batch` and `transaction` bundles according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a `transaction` or `history` bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. `history` bundles also check the `import` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir", "httpMethod": "POST", "id": "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", @@ -5520,7 +5520,7 @@ } } }, - "revision": "20240130", + "revision": "20240206", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -9338,7 +9338,7 @@ "type": "object" }, "RollbackFhirResourcesResponse": { - "description": "Final response of rollback FIHR resources request.", + "description": "Final response of rollback FHIR resources request.", "id": "RollbackFhirResourcesResponse", "properties": { "fhirStore": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index e14f8c410fc..9eb3b1d7212 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -7977,7 +7977,7 @@ func (s *RollbackFhirResourcesRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RollbackFhirResourcesResponse: Final response of rollback FIHR +// RollbackFhirResourcesResponse: Final response of rollback FHIR // resources request. type RollbackFhirResourcesResponse struct { // FhirStore: The name of the FHIR store to rollback, in the format of @@ -30449,15 +30449,17 @@ type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct { } // ExecuteBundle: Executes all the requests in the given Bundle. -// Implements the FHIR standard batch/transaction interaction (DSTU2 +// Implements the FHIR standard batch/transaction interaction and +// history operations. (DSTU2 // (https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), // STU3 // (https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), // R4 // (https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). // Supports all interactions within a bundle, except search. This method -// accepts Bundles of type `batch` and `transaction`, processing them -// according to the batch processing rules (DSTU2 +// accepts Bundles of type `batch`, `transaction` and `history`, +// processing `batch` and `transaction` bundles according to the batch +// processing rules (DSTU2 // (https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), // STU3 // (https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), @@ -30474,18 +30476,20 @@ type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct { // of a `Bundle` resource of type `batch-response` or // `transaction-response` containing one entry for each entry in the // request, with the outcome of processing the entry. In the case of an -// error for a transaction bundle, the response body contains a -// JSON-encoded `OperationOutcome` resource describing the reason for -// the error. If the request cannot be mapped to a valid API method on a -// FHIR store, a generic GCP error might be returned instead. This -// method checks permissions for each request in the bundle. The -// `executeBundle` permission is required to call this method, but you -// must also grant sufficient permissions to execute the individual -// requests in the bundle. For example, if the bundle contains a request -// to create a FHIR resource, the caller must also have been granted the -// `healthcare.fhirResources.create` permission. You can use audit logs -// to view the permissions for `executeBundle` and each request in the -// bundle. For more information, see Viewing Cloud Audit logs +// error for a `transaction` or `history` bundle, the response body +// contains a JSON-encoded `OperationOutcome` resource describing the +// reason for the error. If the request cannot be mapped to a valid API +// method on a FHIR store, a generic GCP error might be returned +// instead. This method checks permissions for each request in the +// bundle. The `executeBundle` permission is required to call this +// method, but you must also grant sufficient permissions to execute the +// individual requests in the bundle. For example, if the bundle +// contains a request to create a FHIR resource, the caller must also +// have been granted the `healthcare.fhirResources.create` permission. +// `history` bundles also check the `import` permission. You can use +// audit logs to view the permissions for `executeBundle` and each +// request in the bundle. For more information, see Viewing Cloud Audit +// logs // (https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). // For samples that show how to call `executeBundle`, see Managing FHIR // resources using FHIR bundles @@ -30552,7 +30556,7 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Do(opts ...go gensupport.SetOptions(c.urlParams_, opts...) return c.doRequest("") // { - // "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch` and `transaction`, processing them according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a transaction bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", + // "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction and history operations. ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch`, `transaction` and `history`, processing `batch` and `transaction` bundles according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a `transaction` or `history` bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. `history` bundles also check the `import` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir", // "httpMethod": "POST", // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", diff --git a/language/v1beta2/language-api.json b/language/v1beta2/language-api.json index 85b539d0c94..c15c621e6b6 100644 --- a/language/v1beta2/language-api.json +++ b/language/v1beta2/language-api.json @@ -246,7 +246,7 @@ } } }, - "revision": "20231209", + "revision": "20240211", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -465,12 +465,47 @@ "type": "string" }, "features": { - "$ref": "Features", + "$ref": "AnnotateTextRequestFeatures", "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", @@ -542,16 +577,43 @@ "id": "ClassificationModelOptions", "properties": { "v1Model": { - "$ref": "V1Model", + "$ref": "ClassificationModelOptionsV1Model", "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": "V2Model", + "$ref": "ClassificationModelOptionsV2Model", "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", @@ -581,6 +643,419 @@ }, "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", @@ -767,6 +1242,37 @@ }, "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", @@ -915,37 +1421,414 @@ }, "type": "object" }, - "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", + "GpuMetric": { + "id": "GpuMetric", "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." + "gpuSec": { + "description": "Required. Seconds of GPU usage, e.g. 3600.", + "format": "int64", + "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" + "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" }, - "extractDocumentSentiment": { - "description": "Extract document-level sentiment.", - "type": "boolean" + "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" }, - "extractEntities": { - "description": "Extract entities.", - "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" }, - "extractEntitySentiment": { - "description": "Extract entities and their associated sentiment.", - "type": "boolean" + "diskMetrics": { + "description": "Aggregated persistent disk metrics since requested start_time.", + "items": { + "$ref": "DiskMetric" + }, + "type": "array" }, - "extractSyntax": { - "description": "Extract syntax information.", - "type": "boolean" + "gpuMetrics": { + "description": "Aggregated gpu metrics since requested start_time.", + "items": { + "$ref": "GpuMetric" + }, + "type": "array" }, - "moderateText": { - "description": "Moderate the document for harmful and sensitive categories.", - "type": "boolean" + "ramMetrics": { + "description": "Aggregated ram metrics since requested start_time.", + "items": { + "$ref": "RamMetric" + }, + "type": "array" + }, + "tpuMetrics": { + "description": "Aggregated tpu metrics since requested start_time.", + "items": { + "$ref": "TpuMetric" + }, + "type": "array" } }, "type": "object" @@ -1242,6 +2125,391 @@ }, "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", @@ -1340,32 +2608,3079 @@ }, "type": "object" }, - "V1Model": { - "description": "Options for the V1 model.", - "id": "V1Model", - "properties": {}, - "type": "object" - }, - "V2Model": { - "description": "Options for the V2 model.", - "id": "V2Model", + "TpuMetric": { + "id": "TpuMetric", "properties": { - "contentCategoriesVersion": { - "description": "The content categories used for classification.", + "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": [ - "CONTENT_CATEGORIES_VERSION_UNSPECIFIED", - "V1", - "V2" + "UNKNOWN_TPU_TYPE", + "TPU_V2_POD", + "TPU_V2", + "TPU_V3_POD", + "TPU_V3", + "TPU_V5_LITEPOD" ], "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 afd4d4ba799..79e7382d43a 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 *Features `json:"features,omitempty"` + Features *AnnotateTextRequestFeatures `json:"features,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with @@ -565,6 +565,63 @@ 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. @@ -680,12 +737,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 *V1Model `json:"v1Model,omitempty"` + V1Model *ClassificationModelOptionsV1Model `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 *V2Model `json:"v2Model,omitempty"` + V2Model *ClassificationModelOptionsV2Model `json:"v2Model,omitempty"` // ForceSendFields is a list of field names (e.g. "V1Model") to // unconditionally include in API requests. By default, fields with @@ -710,6 +767,48 @@ 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 @@ -776,6 +875,347 @@ 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 { @@ -900,6 +1340,44 @@ 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. @@ -1118,59 +1596,254 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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"` +type GpuMetric struct { + // GpuSec: Required. Seconds of GPU usage, e.g. 3600. + GpuSec int64 `json:"gpuSec,omitempty,string"` - // 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"` + // 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:"-"` - // ExtractDocumentSentiment: Extract document-level sentiment. - ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` + // 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:"-"` +} - // ExtractEntities: Extract entities. - ExtractEntities bool `json:"extractEntities,omitempty"` +func (s *GpuMetric) MarshalJSON() ([]byte, error) { + type NoMethod GpuMetric + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ExtractEntitySentiment: Extract entities and their associated - // sentiment. - ExtractEntitySentiment bool `json:"extractEntitySentiment,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"` - // ExtractSyntax: Extract syntax information. - ExtractSyntax bool `json:"extractSyntax,omitempty"` + // DiskMetrics: Aggregated persistent disk metrics since requested + // start_time. + DiskMetrics []*DiskMetric `json:"diskMetrics,omitempty"` - // ModerateText: Moderate the document for harmful and sensitive - // categories. - ModerateText bool `json:"moderateText,omitempty"` + // GpuMetrics: Aggregated gpu metrics since requested start_time. + GpuMetrics []*GpuMetric `json:"gpuMetrics,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. + // RamMetrics: Aggregated ram metrics since requested start_time. + RamMetrics []*RamMetric `json:"ramMetrics,omitempty"` + + // TpuMetrics: Aggregated tpu metrics since requested start_time. + TpuMetrics []*TpuMetric `json:"tpuMetrics,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 []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 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 []string `json:"-"` } -func (s *Features) MarshalJSON() ([]byte, error) { - type NoMethod Features +func (s *InfraUsage) MarshalJSON() ([]byte, error) { + type NoMethod InfraUsage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1416,17 +2089,204 @@ func (s *PartOfSpeech) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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"` +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"` - // ForceSendFields is a list of field names (e.g. "Sentiment") to + // 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 @@ -1434,8 +2294,8 @@ type Sentence struct { // 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 + // 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. @@ -1443,20 +2303,67 @@ type Sentence struct { NullFields []string `json:"-"` } -func (s *Sentence) MarshalJSON() ([]byte, error) { - type NoMethod Sentence +func (s *RamMetric) MarshalJSON() ([]byte, error) { + type NoMethod RamMetric raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Sentiment: Represents the feeling associated with the entire text or -// entities in the text. Next ID: 6 -type Sentiment struct { - // Magnitude: A non-negative number in the [0, +inf) range, which - // represents the absolute magnitude of sentiment regardless of score - // (positive or negative). - Magnitude float64 `json:"magnitude,omitempty"` - +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 + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Sentiment: Represents the feeling associated with the entire text or +// entities in the text. Next ID: 6 +type Sentiment struct { + // Magnitude: A non-negative number in the [0, +inf) range, which + // represents the absolute magnitude of sentiment regardless of score + // (positive or negative). + Magnitude float64 `json:"magnitude,omitempty"` + // Score: Sentiment score between -1.0 (negative sentiment) and 1.0 // (positive sentiment). Score float64 `json:"score,omitempty"` @@ -1617,25 +2524,123 @@ func (s *Token) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// V1Model: Options for the V1 model. -type V1Model struct { -} +type TpuMetric struct { + // TpuSec: Required. Seconds of TPU usage, e.g. 3600. + TpuSec int64 `json:"tpuSec,omitempty,string"` -// V2Model: Options for the V2 model. -type V2Model struct { - // ContentCategoriesVersion: The content categories used for - // classification. + // TpuType: Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD. // // 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"` + // "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. - // "ContentCategoriesVersion") to unconditionally include in API + // "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 @@ -1643,7 +2648,7 @@ type V2Model struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentCategoriesVersion") + // 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 @@ -1653,8 +2658,5017 @@ type V2Model struct { NullFields []string `json:"-"` } -func (s *V2Model) MarshalJSON() ([]byte, error) { - type NoMethod V2Model +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) } diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index 470922f64ef..778a224db96 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -448,7 +448,7 @@ } } }, - "revision": "20240206", + "revision": "20240213", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -1900,6 +1900,12 @@ "description": "Output only. Identifies supported clients for DirectAccess for this Android version.", "readOnly": true }, + "interactiveDeviceAvailabilityEstimate": { + "description": "Output only. The estimated wait time for a single interactive device session using Direct Access.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, "versionId": { "description": "An Android version.", "type": "string" diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index 93bbce81ad1..65c59fb3912 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -2516,6 +2516,11 @@ type PerAndroidVersionInfo struct { // for DirectAccess for this Android version. DirectAccessVersionInfo *DirectAccessVersionInfo `json:"directAccessVersionInfo,omitempty"` + // InteractiveDeviceAvailabilityEstimate: Output only. The estimated + // wait time for a single interactive device session using Direct + // Access. + InteractiveDeviceAvailabilityEstimate string `json:"interactiveDeviceAvailabilityEstimate,omitempty"` + // VersionId: An Android version. VersionId string `json:"versionId,omitempty"` diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 881fee5bab0..53186277883 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -772,6 +772,33 @@ }, "genericclass": { "methods": { + "addmessage": { + "description": "Adds a message to the generic class referenced by the given class ID.", + "flatPath": "walletobjects/v1/genericClass/{resourceId}/addMessage", + "httpMethod": "POST", + "id": "walletobjects.genericclass.addmessage", + "parameterOrder": [ + "resourceId" + ], + "parameters": { + "resourceId": { + "description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "walletobjects/v1/genericClass/{resourceId}/addMessage", + "request": { + "$ref": "AddMessageRequest" + }, + "response": { + "$ref": "GenericClassAddMessageResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/wallet_object.issuer" + ] + }, "get": { "description": "Returns the generic class with the given class ID.", "flatPath": "walletobjects/v1/genericClass/{resourceId}", @@ -2627,7 +2654,7 @@ } } }, - "revision": "20240214", + "revision": "20240215", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -2756,9 +2783,13 @@ "AppLinkDataAppLinkInfoAppTarget": { "id": "AppLinkDataAppLinkInfoAppTarget", "properties": { + "packageName": { + "description": "Package name for AppTarget. For example: com.google.android.gm", + "type": "string" + }, "targetUri": { "$ref": "Uri", - "description": "URI for AppTarget. The description on the URI must be set." + "description": "URI for AppTarget. The description on the URI must be set. Prefer setting package field instead, if this target is defined for your application." } }, "type": "object" @@ -5131,6 +5162,17 @@ }, "type": "object" }, + "GenericClassAddMessageResponse": { + "description": "Response to adding a new issuer message to the class. This contains the entire updated GenericClass.", + "id": "GenericClassAddMessageResponse", + "properties": { + "resource": { + "$ref": "GenericClass", + "description": "The updated EventTicketClass resource." + } + }, + "type": "object" + }, "GenericClassListResponse": { "description": "List response which contains the list of all generic classes for a given issuer ID.", "id": "GenericClassListResponse", diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index 16f6a0bb5c6..c8c0ee88b79 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -608,10 +608,16 @@ func (s *AppLinkDataAppLinkInfo) MarshalJSON() ([]byte, error) { } type AppLinkDataAppLinkInfoAppTarget struct { + // PackageName: Package name for AppTarget. For example: + // com.google.android.gm + PackageName string `json:"packageName,omitempty"` + // TargetUri: URI for AppTarget. The description on the URI must be set. + // Prefer setting package field instead, if this target is defined for + // your application. TargetUri *Uri `json:"targetUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetUri") to + // ForceSendFields is a list of field names (e.g. "PackageName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -619,10 +625,10 @@ type AppLinkDataAppLinkInfoAppTarget struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetUri") to include in - // API requests with the JSON null value. By default, fields with 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. "PackageName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -3875,6 +3881,39 @@ func (s *GenericClass) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GenericClassAddMessageResponse: Response to adding a new issuer +// message to the class. This contains the entire updated GenericClass. +type GenericClassAddMessageResponse struct { + // Resource: The updated EventTicketClass resource. + Resource *GenericClass `json:"resource,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Resource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Resource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenericClassAddMessageResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenericClassAddMessageResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GenericClassListResponse: List response which contains the list of // all generic classes for a given issuer ID. type GenericClassListResponse struct { @@ -12696,6 +12735,152 @@ func (c *FlightobjectUpdateCall) Do(opts ...googleapi.CallOption) (*FlightObject } +// method id "walletobjects.genericclass.addmessage": + +type GenericclassAddmessageCall struct { + s *Service + resourceId string + addmessagerequest *AddMessageRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Addmessage: Adds a message to the generic class referenced by the +// given class ID. +// +// - resourceId: The unique identifier for a class. This ID must be +// unique across all classes from an issuer. This value should follow +// the format issuer ID. identifier where the former is issued by +// Google and latter is chosen by you. Your unique identifier should +// only include alphanumeric characters, '.', '_', or '-'. +func (r *GenericclassService) Addmessage(resourceId string, addmessagerequest *AddMessageRequest) *GenericclassAddmessageCall { + c := &GenericclassAddmessageCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resourceId = resourceId + c.addmessagerequest = addmessagerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GenericclassAddmessageCall) Fields(s ...googleapi.Field) *GenericclassAddmessageCall { + 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 *GenericclassAddmessageCall) Context(ctx context.Context) *GenericclassAddmessageCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GenericclassAddmessageCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GenericclassAddmessageCall) 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.addmessagerequest) + 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, "walletobjects/v1/genericClass/{resourceId}/addMessage") + 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{ + "resourceId": c.resourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "walletobjects.genericclass.addmessage" call. +// Exactly one of *GenericClassAddMessageResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GenericClassAddMessageResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *GenericclassAddmessageCall) Do(opts ...googleapi.CallOption) (*GenericClassAddMessageResponse, error) { + gensupport.SetOptions(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 := &GenericClassAddMessageResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds a message to the generic class referenced by the given class ID.", + // "flatPath": "walletobjects/v1/genericClass/{resourceId}/addMessage", + // "httpMethod": "POST", + // "id": "walletobjects.genericclass.addmessage", + // "parameterOrder": [ + // "resourceId" + // ], + // "parameters": { + // "resourceId": { + // "description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "walletobjects/v1/genericClass/{resourceId}/addMessage", + // "request": { + // "$ref": "AddMessageRequest" + // }, + // "response": { + // "$ref": "GenericClassAddMessageResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/wallet_object.issuer" + // ] + // } + +} + // method id "walletobjects.genericclass.get": type GenericclassGetCall struct { diff --git a/workspaceevents/v1/workspaceevents-api.json b/workspaceevents/v1/workspaceevents-api.json index 4f0cff33497..8f6438d78b5 100644 --- a/workspaceevents/v1/workspaceevents-api.json +++ b/workspaceevents/v1/workspaceevents-api.json @@ -1,4 +1,37 @@ { + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/chat.bot": { + "description": "Private Service: https://www.googleapis.com/auth/chat.bot" + }, + "https://www.googleapis.com/auth/chat.memberships": { + "description": "View, add, and remove members from conversations in Google Chat" + }, + "https://www.googleapis.com/auth/chat.memberships.readonly": { + "description": "View members in Google Chat conversations." + }, + "https://www.googleapis.com/auth/chat.messages": { + "description": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages." + }, + "https://www.googleapis.com/auth/chat.messages.reactions": { + "description": "View, add, and delete reactions to messages in Google Chat" + }, + "https://www.googleapis.com/auth/chat.messages.reactions.readonly": { + "description": "View reactions to messages in Google Chat" + }, + "https://www.googleapis.com/auth/chat.messages.readonly": { + "description": "View messages and reactions in Google Chat" + }, + "https://www.googleapis.com/auth/chat.spaces": { + "description": "Create conversations and spaces and see or edit metadata (including history settings and access settings) in Google Chat" + }, + "https://www.googleapis.com/auth/chat.spaces.readonly": { + "description": "View chat and spaces in Google Chat" + } + } + } + }, "basePath": "", "baseUrl": "https://workspaceevents.googleapis.com/", "batchPath": "batch", @@ -95,10 +128,512 @@ } }, "protocol": "rest", - "resources": {}, - "revision": "20240125", + "resources": { + "operations": { + "methods": { + "get": { + "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}", + "httpMethod": "GET", + "id": "workspaceevents.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + } + } + }, + "subscriptions": { + "methods": { + "create": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a Google Workspace subscription. To learn how to use this method, see [Create a Google Workspace subscription](https://developers.google.com/workspace/events/guides/create-subscription).", + "flatPath": "v1/subscriptions", + "httpMethod": "POST", + "id": "workspaceevents.subscriptions.create", + "parameterOrder": [], + "parameters": { + "validateOnly": { + "description": "Optional. If set to `true`, validates and previews the request, but doesn't create the subscription.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/subscriptions", + "request": { + "$ref": "Subscription" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "delete": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a Google Workspace subscription. To learn how to use this method, see [Delete a Google Workspace subscription](https://developers.google.com/workspace/events/guides/delete-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}", + "httpMethod": "DELETE", + "id": "workspaceevents.subscriptions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to `true` and the subscription isn't found, the request succeeds but doesn't delete the subscription.", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "Optional. Etag of the subscription. If present, it must match with the server's etag. Otherwise, request fails with the status `ABORTED`.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Resource name of the subscription to delete. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set to `true`, validates and previews the request, but doesn't delete the subscription.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "get": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Gets details about a Google Workspace subscription. To learn how to use this method, see [Get details about a Google Workspace subscription](https://developers.google.com/workspace/events/guides/get-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}", + "httpMethod": "GET", + "id": "workspaceevents.subscriptions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Subscription" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "list": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists Google Workspace subscriptions. To learn how to use this method, see [List Google Workspace subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).", + "flatPath": "v1/subscriptions", + "httpMethod": "GET", + "id": "workspaceevents.subscriptions.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "Required. A query filter. You can filter subscriptions by event type (`event_types`) and target resource (`target_resource`). You must specify at least one event type in your query. To filter for multiple event types, use the `OR` operator. To filter by both event type and target resource, use the `AND` operator and specify the full resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, the following queries are valid: ``` event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" event_types:\"google.workspace.chat.message.v1.created\" AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ( event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" ) AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ``` The server rejects invalid queries with an `INVALID_ARGUMENT` error.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of subscriptions to return. The service might return fewer than this value. If unspecified or set to `0`, up to 50 subscriptions are returned. The maximum value is 100. If you specify a value more than 100, the system only returns 100 subscriptions.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous list subscriptions call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.", + "location": "query", + "type": "string" + } + }, + "path": "v1/subscriptions", + "response": { + "$ref": "ListSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "patch": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Updates or renews a Google Workspace subscription. To learn how to use this method, see [Update or renew a Google Workspace subscription](https://developers.google.com/workspace/events/guides/update-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}", + "httpMethod": "PATCH", + "id": "workspaceevents.subscriptions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Required. The field to update. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set to `true`, validates and previews the request, but doesn't update the subscription.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Subscription" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "reactivate": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Reactivates a suspended Google Workspace subscription. This method resets your subscription's `State` field to `ACTIVE`. Before you use this method, you must fix the error that suspended the subscription. To learn how to use this method, see [Reactivate a Google Workspace subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}:reactivate", + "httpMethod": "POST", + "id": "workspaceevents.subscriptions.reactivate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:reactivate", + "request": { + "$ref": "ReactivateSubscriptionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + } + } + } + }, + "revision": "20240215", "rootUrl": "https://workspaceevents.googleapis.com/", - "schemas": {}, + "schemas": { + "ListSubscriptionsResponse": { + "description": "The response message for SubscriptionsService.ListSubscriptions.", + "id": "ListSubscriptionsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "subscriptions": { + "description": "List of subscriptions.", + "items": { + "$ref": "Subscription" + }, + "type": "array" + } + }, + "type": "object" + }, + "NotificationEndpoint": { + "description": "The endpoint where the subscription delivers events.", + "id": "NotificationEndpoint", + "properties": { + "pubsubTopic": { + "description": "Immutable. The Cloud Pub/Sub topic that receives events for the subscription. Format: `projects/{project}/topics/{topic}` You must create the topic in the same Google Cloud project where you create this subscription. When the topic receives events, the events are encoded as Cloud Pub/Sub messages. For details, see the [Google Cloud Pub/Sub Protocol Binding for CloudEvents](https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md).", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "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.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "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.", + "type": "object" + }, + "name": { + "description": "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}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "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`.", + "type": "object" + } + }, + "type": "object" + }, + "PayloadOptions": { + "description": "Options about what data to include in the event payload. Only supported for Google Chat events.", + "id": "PayloadOptions", + "properties": { + "fieldMask": { + "description": "Optional. If `include_resource` is set to `true`, the list of fields to include in the event payload. Separate fields with a comma. For example, to include a Google Chat message's sender and create time, enter `message.sender,message.createTime`. If omitted, the payload includes all fields for the resource. If you specify a field that doesn't exist for the resource, the system ignores the field.", + "format": "google-fieldmask", + "type": "string" + }, + "includeResource": { + "description": "Optional. Whether the event payload includes data about the resource that changed. For example, for an event where a Google Chat message was created, whether the payload contains data about the [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) resource. If false, the event payload only includes the name of the changed resource.", + "type": "boolean" + } + }, + "type": "object" + }, + "ReactivateSubscriptionRequest": { + "description": "The request message for SubscriptionsService.ReactivateSubscription.", + "id": "ReactivateSubscriptionRequest", + "properties": {}, + "type": "object" + }, + "Status": { + "description": "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).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "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.", + "type": "string" + } + }, + "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).", + "id": "Subscription", + "properties": { + "authority": { + "description": "Output only. The user who authorized the creation of the subscription. Format: `users/{user}` For Google Workspace users, the `{user}` value is the [`user.id`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) field from the Directory API.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the subscription is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other fields, and might be sent on update requests to ensure the client has an up-to-date value before proceeding.", + "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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "description": "Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "type": "string" + }, + "notificationEndpoint": { + "$ref": "NotificationEndpoint", + "description": "Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic." + }, + "payloadOptions": { + "$ref": "PayloadOptions", + "description": "Optional. Options about what data to include in the event payload. Only supported for Google Chat events." + }, + "reconciling": { + "description": "Output only. If `true`, the subscription is in the process of being updated.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. The state of the subscription. Determines whether the subscription can receive events and deliver them to the notification endpoint.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "SUSPENDED", + "DELETED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The subscription is active and can receive and deliver events to its notification endpoint.", + "The subscription is unable to receive events due to an error. To identify the error, see the `suspension_reason` field.", + "The subscription is deleted." + ], + "readOnly": true, + "type": "string" + }, + "suspensionReason": { + "description": "Output only. The error that suspended the subscription. To reactivate the subscription, resolve the error and call the `ReactivateSubscription` method.", + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "USER_SCOPE_REVOKED", + "RESOURCE_DELETED", + "USER_AUTHORIZATION_FAILURE", + "ENDPOINT_PERMISSION_DENIED", + "ENDPOINT_NOT_FOUND", + "ENDPOINT_RESOURCE_EXHAUSTED", + "OTHER" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The authorizing user has revoked the grant of one or more OAuth scopes. To learn more about authorization for Google Workspace, see [Configure the OAuth consent screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).", + "The target resource for the subscription no longer exists.", + "The user that authorized the creation of the subscription no longer has access to the subscription's target resource.", + "The Google Workspace application doesn't have access to deliver events to your subscription's notification endpoint.", + "The subscription's notification endpoint doesn't exist, or the endpoint can't be found in the Google Cloud project where you created the subscription.", + "The subscription's notification endpoint failed to receive events due to insufficient quota or reaching rate limiting.", + "An unidentified error has occurred." + ], + "readOnly": true, + "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.", + "type": "string" + }, + "ttl": { + "description": "Input only. The time-to-live (TTL) or duration for the subscription. If unspecified or set to `0`, uses the maximum possible duration.", + "format": "google-duration", + "type": "string" + }, + "uid": { + "description": "Output only. System-assigned unique identifier for the subscription.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last time that the subscription is updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + } + }, "servicePath": "", "title": "Google Workspace Events API", "version": "v1", diff --git a/workspaceevents/v1/workspaceevents-gen.go b/workspaceevents/v1/workspaceevents-gen.go index 1fd4690599c..742d36cc3e3 100644 --- a/workspaceevents/v1/workspaceevents-gen.go +++ b/workspaceevents/v1/workspaceevents-gen.go @@ -34,6 +34,11 @@ // // # Other authentication options // +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: +// +// workspaceeventsService, err := workspaceevents.NewService(ctx, option.WithScopes(workspaceevents.ChatSpacesReadonlyScope)) +// // To use an API key for authentication (note: some APIs do not support API // keys), use [google.golang.org/api/option.WithAPIKey]: // @@ -94,8 +99,53 @@ const basePathTemplate = "https://workspaceevents.UNIVERSE_DOMAIN/" const mtlsBasePath = "https://workspaceevents.mtls.googleapis.com/" const defaultUniverseDomain = "googleapis.com" +// OAuth2 scopes used by this API. +const ( + // Private Service: https://www.googleapis.com/auth/chat.bot + ChatBotScope = "https://www.googleapis.com/auth/chat.bot" + + // View, add, and remove members from conversations in Google Chat + ChatMembershipsScope = "https://www.googleapis.com/auth/chat.memberships" + + // View members in Google Chat conversations. + ChatMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.memberships.readonly" + + // View, compose, send, update, and delete messages, and add, view, and + // delete reactions to messages. + ChatMessagesScope = "https://www.googleapis.com/auth/chat.messages" + + // View, add, and delete reactions to messages in Google Chat + ChatMessagesReactionsScope = "https://www.googleapis.com/auth/chat.messages.reactions" + + // View reactions to messages in Google Chat + ChatMessagesReactionsReadonlyScope = "https://www.googleapis.com/auth/chat.messages.reactions.readonly" + + // View messages and reactions in Google Chat + ChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly" + + // Create conversations and spaces and see or edit metadata (including + // history settings and access settings) in Google Chat + ChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces" + + // View chat and spaces in Google Chat + ChatSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.spaces.readonly" +) + // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) @@ -124,6 +174,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Operations = NewOperationsService(s) + s.Subscriptions = NewSubscriptionsService(s) return s, nil } @@ -131,6 +183,10 @@ type Service struct { client *http.Client BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + + Operations *OperationsService + + Subscriptions *SubscriptionsService } func (s *Service) userAgent() string { @@ -139,3 +195,1607 @@ func (s *Service) userAgent() string { } return googleapi.UserAgent + " " + s.UserAgent } + +func NewOperationsService(s *Service) *OperationsService { + rs := &OperationsService{s: s} + return rs +} + +type OperationsService struct { + s *Service +} + +func NewSubscriptionsService(s *Service) *SubscriptionsService { + rs := &SubscriptionsService{s: s} + return rs +} + +type SubscriptionsService struct { + s *Service +} + +// ListSubscriptionsResponse: The response message for +// SubscriptionsService.ListSubscriptions. +type ListSubscriptionsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Subscriptions: List of subscriptions. + Subscriptions []*Subscription `json:"subscriptions,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 *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSubscriptionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NotificationEndpoint: The endpoint where the subscription delivers +// events. +type NotificationEndpoint struct { + // PubsubTopic: Immutable. The Cloud Pub/Sub topic that receives events + // for the subscription. Format: `projects/{project}/topics/{topic}` You + // must create the topic in the same Google Cloud project where you + // create this subscription. When the topic receives events, the events + // are encoded as Cloud Pub/Sub messages. For details, see the Google + // Cloud Pub/Sub Protocol Binding for CloudEvents + // (https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md). + PubsubTopic string `json:"pubsubTopic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PubsubTopic") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PubsubTopic") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NotificationEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpoint + 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 { + // 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 *Status `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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PayloadOptions: Options about what data to include in the event +// payload. Only supported for Google Chat events. +type PayloadOptions struct { + // FieldMask: Optional. If `include_resource` is set to `true`, the list + // of fields to include in the event payload. Separate fields with a + // comma. For example, to include a Google Chat message's sender and + // create time, enter `message.sender,message.createTime`. If omitted, + // the payload includes all fields for the resource. If you specify a + // field that doesn't exist for the resource, the system ignores the + // field. + FieldMask string `json:"fieldMask,omitempty"` + + // IncludeResource: Optional. Whether the event payload includes data + // about the resource that changed. For example, for an event where a + // Google Chat message was created, whether the payload contains data + // about the `Message` + // (https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) + // resource. If false, the event payload only includes the name of the + // changed resource. + IncludeResource bool `json:"includeResource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldMask") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldMask") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PayloadOptions) MarshalJSON() ([]byte, error) { + type NoMethod PayloadOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReactivateSubscriptionRequest: The request message for +// SubscriptionsService.ReactivateSubscription. +type ReactivateSubscriptionRequest struct { +} + +// Status: 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 Status 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Subscription: 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). +type Subscription struct { + // Authority: Output only. The user who authorized the creation of the + // subscription. Format: `users/{user}` For Google Workspace users, the + // `{user}` value is the `user.id` + // (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) + // field from the Directory API. + Authority string `json:"authority,omitempty"` + + // CreateTime: Output only. The time when the subscription is created. + CreateTime string `json:"createTime,omitempty"` + + // Etag: Optional. This checksum is computed by the server based on the + // value of other fields, and might be sent on update requests to ensure + // the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // 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) + // 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. + EventTypes []string `json:"eventTypes,omitempty"` + + // ExpireTime: Non-empty default. The timestamp in UTC when the + // subscription expires. Always displayed on output, regardless of what + // was used on input. + ExpireTime string `json:"expireTime,omitempty"` + + // Name: Optional. Immutable. Identifier. Resource name of the + // subscription. Format: `subscriptions/{subscription}` + Name string `json:"name,omitempty"` + + // NotificationEndpoint: Required. Immutable. The endpoint where the + // subscription delivers events, such as a Pub/Sub topic. + NotificationEndpoint *NotificationEndpoint `json:"notificationEndpoint,omitempty"` + + // PayloadOptions: Optional. Options about what data to include in the + // event payload. Only supported for Google Chat events. + PayloadOptions *PayloadOptions `json:"payloadOptions,omitempty"` + + // Reconciling: Output only. If `true`, the subscription is in the + // process of being updated. + Reconciling bool `json:"reconciling,omitempty"` + + // State: Output only. The state of the subscription. Determines whether + // the subscription can receive events and deliver them to the + // notification endpoint. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - The subscription is active and can receive and deliver + // events to its notification endpoint. + // "SUSPENDED" - The subscription is unable to receive events due to + // an error. To identify the error, see the `suspension_reason` field. + // "DELETED" - The subscription is deleted. + State string `json:"state,omitempty"` + + // SuspensionReason: Output only. The error that suspended the + // subscription. To reactivate the subscription, resolve the error and + // call the `ReactivateSubscription` method. + // + // Possible values: + // "ERROR_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "USER_SCOPE_REVOKED" - The authorizing user has revoked the grant + // of one or more OAuth scopes. To learn more about authorization for + // Google Workspace, see [Configure the OAuth consent + // screen](https://developers.google.com/workspace/guides/configure-oauth + // -consent#choose-scopes). + // "RESOURCE_DELETED" - The target resource for the subscription no + // longer exists. + // "USER_AUTHORIZATION_FAILURE" - The user that authorized the + // creation of the subscription no longer has access to the + // subscription's target resource. + // "ENDPOINT_PERMISSION_DENIED" - The Google Workspace application + // doesn't have access to deliver events to your subscription's + // notification endpoint. + // "ENDPOINT_NOT_FOUND" - The subscription's notification endpoint + // doesn't exist, or the endpoint can't be found in the Google Cloud + // project where you created the subscription. + // "ENDPOINT_RESOURCE_EXHAUSTED" - The subscription's notification + // endpoint failed to receive events due to insufficient quota or + // reaching rate limiting. + // "OTHER" - An unidentified error has occurred. + SuspensionReason string `json:"suspensionReason,omitempty"` + + // 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 + // given target resource. If your app tries to create another + // subscription with the same user credentials, the request returns an + // `ALREADY_EXISTS` error. + TargetResource string `json:"targetResource,omitempty"` + + // Ttl: Input only. The time-to-live (TTL) or duration for the + // subscription. If unspecified or set to `0`, uses the maximum possible + // duration. + Ttl string `json:"ttl,omitempty"` + + // Uid: Output only. System-assigned unique identifier for the + // subscription. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The last time that the subscription is + // updated. + 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. "Authority") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Authority") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Subscription) MarshalJSON() ([]byte, error) { + type NoMethod Subscription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "workspaceevents.operations.get": + +type OperationsGetCall 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 *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{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 *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { + 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 *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { + 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 *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 *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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 "workspaceevents.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 *OperationsGetCall) 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": "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}", + // "httpMethod": "GET", + // "id": "workspaceevents.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.create": + +type SubscriptionsCreateCall struct { + s *Service + subscription *Subscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Developer Preview +// (https://developers.google.com/workspace/preview): Creates a Google +// Workspace subscription. To learn how to use this method, see Create a +// Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/create-subscription). +func (r *SubscriptionsService) Create(subscription *Subscription) *SubscriptionsCreateCall { + c := &SubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.subscription = subscription + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to +// `true`, validates and previews the request, but doesn't create the +// subscription. +func (c *SubscriptionsCreateCall) ValidateOnly(validateOnly bool) *SubscriptionsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubscriptionsCreateCall) Fields(s ...googleapi.Field) *SubscriptionsCreateCall { + 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 *SubscriptionsCreateCall) Context(ctx context.Context) *SubscriptionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsCreateCall) 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.subscription) + 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/subscriptions") + 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 "workspaceevents.subscriptions.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 *SubscriptionsCreateCall) 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": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a Google Workspace subscription. To learn how to use this method, see [Create a Google Workspace subscription](https://developers.google.com/workspace/events/guides/create-subscription).", + // "flatPath": "v1/subscriptions", + // "httpMethod": "POST", + // "id": "workspaceevents.subscriptions.create", + // "parameterOrder": [], + // "parameters": { + // "validateOnly": { + // "description": "Optional. If set to `true`, validates and previews the request, but doesn't create the subscription.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/subscriptions", + // "request": { + // "$ref": "Subscription" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.delete": + +type SubscriptionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Developer Preview +// (https://developers.google.com/workspace/preview): Deletes a Google +// Workspace subscription. To learn how to use this method, see Delete a +// Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/delete-subscription). +// +// - name: Resource name of the subscription to delete. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Delete(name string) *SubscriptionsDeleteCall { + c := &SubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// `true` and the subscription isn't found, the request succeeds but +// doesn't delete the subscription. +func (c *SubscriptionsDeleteCall) AllowMissing(allowMissing bool) *SubscriptionsDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": Etag of the subscription. If +// present, it must match with the server's etag. Otherwise, request +// fails with the status `ABORTED`. +func (c *SubscriptionsDeleteCall) Etag(etag string) *SubscriptionsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to +// `true`, validates and previews the request, but doesn't delete the +// subscription. +func (c *SubscriptionsDeleteCall) ValidateOnly(validateOnly bool) *SubscriptionsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall { + 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 *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsDeleteCall) 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 "workspaceevents.subscriptions.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 *SubscriptionsDeleteCall) 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": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a Google Workspace subscription. To learn how to use this method, see [Delete a Google Workspace subscription](https://developers.google.com/workspace/events/guides/delete-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}", + // "httpMethod": "DELETE", + // "id": "workspaceevents.subscriptions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to `true` and the subscription isn't found, the request succeeds but doesn't delete the subscription.", + // "location": "query", + // "type": "boolean" + // }, + // "etag": { + // "description": "Optional. Etag of the subscription. If present, it must match with the server's etag. Otherwise, request fails with the status `ABORTED`.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Resource name of the subscription to delete. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set to `true`, validates and previews the request, but doesn't delete the subscription.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.get": + +type SubscriptionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Developer Preview +// (https://developers.google.com/workspace/preview): Gets details about +// a Google Workspace subscription. To learn how to use this method, see +// Get details about a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/get-subscription). +// +// - name: Resource name of the subscription. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Get(name string) *SubscriptionsGetCall { + c := &SubscriptionsGetCall{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 *SubscriptionsGetCall) Fields(s ...googleapi.Field) *SubscriptionsGetCall { + 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 *SubscriptionsGetCall) IfNoneMatch(entityTag string) *SubscriptionsGetCall { + 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 *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsGetCall) 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 "workspaceevents.subscriptions.get" call. +// Exactly one of *Subscription or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Subscription.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { + gensupport.SetOptions(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 := &Subscription{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Gets details about a Google Workspace subscription. To learn how to use this method, see [Get details about a Google Workspace subscription](https://developers.google.com/workspace/events/guides/get-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}", + // "httpMethod": "GET", + // "id": "workspaceevents.subscriptions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Subscription" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.list": + +type SubscriptionsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Developer Preview +// (https://developers.google.com/workspace/preview): Lists Google +// Workspace subscriptions. To learn how to use this method, see List +// Google Workspace subscriptions +// (https://developers.google.com/workspace/events/guides/list-subscriptions). +func (r *SubscriptionsService) List() *SubscriptionsListCall { + c := &SubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": Required. A query +// filter. You can filter subscriptions by event type (`event_types`) +// and target resource (`target_resource`). You must specify at least +// one event type in your query. To filter for multiple event types, use +// the `OR` operator. To filter by both event type and target resource, +// use the `AND` operator and specify the full resource name, such as +// `//chat.googleapis.com/spaces/{space}`. For example, the following +// queries are valid: ``` +// event_types:"google.workspace.chat.membership.v1.updated" OR +// event_types:"google.workspace.chat.message.v1.created" +// event_types:"google.workspace.chat.message.v1.created" AND +// target_resource="//chat.googleapis.com/spaces/{space}" ( +// event_types:"google.workspace.chat.membership.v1.updated" OR +// event_types:"google.workspace.chat.message.v1.created" ) AND +// target_resource="//chat.googleapis.com/spaces/{space}" ``` The server +// rejects invalid queries with an `INVALID_ARGUMENT` error. +func (c *SubscriptionsListCall) Filter(filter string) *SubscriptionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of subscriptions to return. The service might return fewer than this +// value. If unspecified or set to `0`, up to 50 subscriptions are +// returned. The maximum value is 100. If you specify a value more than +// 100, the system only returns 100 subscriptions. +func (c *SubscriptionsListCall) PageSize(pageSize int64) *SubscriptionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous list subscriptions call. Provide this +// parameter to retrieve the subsequent page. When paginating, the +// filter value should match the call that provided the page token. +// Passing a different value might lead to unexpected results. +func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall { + 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 *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall { + 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 *SubscriptionsListCall) IfNoneMatch(entityTag string) *SubscriptionsListCall { + 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 *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsListCall) 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/subscriptions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.list" call. +// Exactly one of *ListSubscriptionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListSubscriptionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscriptionsResponse, error) { + gensupport.SetOptions(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 := &ListSubscriptionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists Google Workspace subscriptions. To learn how to use this method, see [List Google Workspace subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).", + // "flatPath": "v1/subscriptions", + // "httpMethod": "GET", + // "id": "workspaceevents.subscriptions.list", + // "parameterOrder": [], + // "parameters": { + // "filter": { + // "description": "Required. A query filter. You can filter subscriptions by event type (`event_types`) and target resource (`target_resource`). You must specify at least one event type in your query. To filter for multiple event types, use the `OR` operator. To filter by both event type and target resource, use the `AND` operator and specify the full resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, the following queries are valid: ``` event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" event_types:\"google.workspace.chat.message.v1.created\" AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ( event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" ) AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ``` The server rejects invalid queries with an `INVALID_ARGUMENT` error.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of subscriptions to return. The service might return fewer than this value. If unspecified or set to `0`, up to 50 subscriptions are returned. The maximum value is 100. If you specify a value more than 100, the system only returns 100 subscriptions.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous list subscriptions call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/subscriptions", + // "response": { + // "$ref": "ListSubscriptionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *SubscriptionsListCall) Pages(ctx context.Context, f func(*ListSubscriptionsResponse) 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 "workspaceevents.subscriptions.patch": + +type SubscriptionsPatchCall struct { + s *Service + name string + subscription *Subscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Developer Preview +// (https://developers.google.com/workspace/preview): Updates or renews +// a Google Workspace subscription. To learn how to use this method, see +// Update or renew a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/update-subscription). +// +// - name: Optional. Immutable. Identifier. Resource name of the +// subscription. Format: `subscriptions/{subscription}`. +func (r *SubscriptionsService) Patch(name string, subscription *Subscription) *SubscriptionsPatchCall { + c := &SubscriptionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.subscription = subscription + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// field to update. You can update one of the following fields in a +// subscription: * `expire_time`: The timestamp when the subscription +// expires. * `ttl`: The time-to-live (TTL) or duration of the +// subscription. +func (c *SubscriptionsPatchCall) UpdateMask(updateMask string) *SubscriptionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to +// `true`, validates and previews the request, but doesn't update the +// subscription. +func (c *SubscriptionsPatchCall) ValidateOnly(validateOnly bool) *SubscriptionsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubscriptionsPatchCall) Fields(s ...googleapi.Field) *SubscriptionsPatchCall { + 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 *SubscriptionsPatchCall) Context(ctx context.Context) *SubscriptionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsPatchCall) 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.subscription) + 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 "workspaceevents.subscriptions.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 *SubscriptionsPatchCall) 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": "[Developer Preview](https://developers.google.com/workspace/preview): Updates or renews a Google Workspace subscription. To learn how to use this method, see [Update or renew a Google Workspace subscription](https://developers.google.com/workspace/events/guides/update-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}", + // "httpMethod": "PATCH", + // "id": "workspaceevents.subscriptions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Required. The field to update. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set to `true`, validates and previews the request, but doesn't update the subscription.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Subscription" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.reactivate": + +type SubscriptionsReactivateCall struct { + s *Service + name string + reactivatesubscriptionrequest *ReactivateSubscriptionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Reactivate: Developer Preview +// (https://developers.google.com/workspace/preview): Reactivates a +// suspended Google Workspace subscription. This method resets your +// subscription's `State` field to `ACTIVE`. Before you use this method, +// you must fix the error that suspended the subscription. To learn how +// to use this method, see Reactivate a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/reactivate-subscription). +// +// - name: Resource name of the subscription. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Reactivate(name string, reactivatesubscriptionrequest *ReactivateSubscriptionRequest) *SubscriptionsReactivateCall { + c := &SubscriptionsReactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.reactivatesubscriptionrequest = reactivatesubscriptionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubscriptionsReactivateCall) Fields(s ...googleapi.Field) *SubscriptionsReactivateCall { + 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 *SubscriptionsReactivateCall) Context(ctx context.Context) *SubscriptionsReactivateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsReactivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsReactivateCall) 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.reactivatesubscriptionrequest) + 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}:reactivate") + 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 "workspaceevents.subscriptions.reactivate" 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 *SubscriptionsReactivateCall) 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": "[Developer Preview](https://developers.google.com/workspace/preview): Reactivates a suspended Google Workspace subscription. This method resets your subscription's `State` field to `ACTIVE`. Before you use this method, you must fix the error that suspended the subscription. To learn how to use this method, see [Reactivate a Google Workspace subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}:reactivate", + // "httpMethod": "POST", + // "id": "workspaceevents.subscriptions.reactivate", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:reactivate", + // "request": { + // "$ref": "ReactivateSubscriptionRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +}