From dd565a4a1b3867b4a1fe86ff9d8a633a6f3ba032 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 17 Nov 2022 07:30:51 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1752) --- api-list.json | 15 + apigee/v1/apigee-api.json | 61 +- apigee/v1/apigee-gen.go | 207 +- assuredworkloads/v1/assuredworkloads-api.json | 10 +- assuredworkloads/v1/assuredworkloads-gen.go | 9 +- .../v1beta1/assuredworkloads-api.json | 10 +- .../v1beta1/assuredworkloads-gen.go | 9 +- .../v1/contactcenterinsights-api.json | 35 +- .../v1/contactcenterinsights-gen.go | 136 + dlp/v2/dlp-api.json | 4 +- dlp/v2/dlp-gen.go | 4 +- documentai/v1/documentai-api.json | 356 +- documentai/v1/documentai-gen.go | 1300 +-- documentai/v1beta2/documentai-api.json | 137 +- documentai/v1beta2/documentai-gen.go | 295 +- documentai/v1beta3/documentai-api.json | 181 +- documentai/v1beta3/documentai-gen.go | 392 +- metastore/v1/metastore-api.json | 2515 ++++++ metastore/v1/metastore-gen.go | 7996 +++++++++++++++++ monitoring/v3/monitoring-api.json | 10 +- monitoring/v3/monitoring-gen.go | 10 +- policysimulator/v1/policysimulator-api.json | 222 +- policysimulator/v1/policysimulator-gen.go | 1974 +++- .../v1alpha/policysimulator-api.json | 258 +- .../v1alpha/policysimulator-gen.go | 1318 ++- .../v1beta1/policysimulator-api.json | 222 +- .../v1beta1/policysimulator-gen.go | 1952 +++- retail/v2/retail-api.json | 16 +- retail/v2/retail-gen.go | 12 + retail/v2alpha/retail-api.json | 16 +- retail/v2alpha/retail-gen.go | 12 + retail/v2beta/retail-api.json | 16 +- retail/v2beta/retail-gen.go | 12 + .../v1/serviceconsumermanagement-api.json | 326 +- .../v1/serviceconsumermanagement-gen.go | 581 +- .../serviceconsumermanagement-api.json | 326 +- .../v1beta1/serviceconsumermanagement-gen.go | 581 +- .../v1/servicenetworking-api.json | 326 +- servicenetworking/v1/servicenetworking-gen.go | 581 +- .../v1beta/servicenetworking-api.json | 326 +- .../v1beta/servicenetworking-gen.go | 581 +- serviceusage/v1/serviceusage-api.json | 326 +- serviceusage/v1/serviceusage-gen.go | 581 +- serviceusage/v1beta1/serviceusage-api.json | 326 +- serviceusage/v1beta1/serviceusage-gen.go | 581 +- 45 files changed, 22670 insertions(+), 2494 deletions(-) create mode 100644 metastore/v1/metastore-api.json create mode 100644 metastore/v1/metastore-gen.go diff --git a/api-list.json b/api-list.json index 7d8ae996b7a..f4bda720ca1 100644 --- a/api-list.json +++ b/api-list.json @@ -3784,6 +3784,21 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "metastore:v1", + "name": "metastore", + "version": "v1", + "title": "Dataproc Metastore API", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryRestUrl": "https://metastore.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://cloud.google.com/dataproc-metastore/docs", "preferred": true }, { diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index a678f6820ea..ed523746dbd 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -3539,6 +3539,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getApiSecurityRuntimeConfig": { + "description": "Gets the API Security runtime configuration for an environment. This named ApiSecurityRuntimeConfig to prevent conflicts with ApiSecurityConfig from addon config.", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apiSecurityRuntimeConfig", + "httpMethod": "GET", + "id": "apigee.organizations.environments.getApiSecurityRuntimeConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the environment API Security Runtime configuration resource. Use the following structure in your request: `organizations/{org}/environments/{env}/apiSecurityRuntimeConfig`", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+/apiSecurityRuntimeConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1ApiSecurityRuntimeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getDebugmask": { "description": "Gets the debug mask singleton resource for an environment.", "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/debugmask", @@ -8609,7 +8634,7 @@ } } }, - "revision": "20220930", + "revision": "20221110", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -9240,6 +9265,38 @@ }, "type": "object" }, + "GoogleCloudApigeeV1ApiSecurityRuntimeConfig": { + "description": "Response for GetApiSecurityRuntimeConfig[EnvironmentService.GetApiSecurityRuntimeConfig].", + "id": "GoogleCloudApigeeV1ApiSecurityRuntimeConfig", + "properties": { + "location": { + "description": "A list of up to 5 Cloud Storage Blobs that contain SecurityActions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Name of the environment API Security Runtime configuration resource. Format: `organizations/{org}/environments/{env}/apiSecurityRuntimeConfig`", + "type": "string" + }, + "revisionId": { + "description": "Revision ID of the API Security Runtime configuration. The higher the value, the more recently the configuration was deployed.", + "format": "int64", + "type": "string" + }, + "uid": { + "description": "Unique ID for the API Security Runtime configuration. The ID will only change if the environment is deleted and recreated.", + "type": "string" + }, + "updateTime": { + "description": "Time that the API Security Runtime configuration was updated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1App": { "id": "GoogleCloudApigeeV1App", "properties": { @@ -14186,7 +14243,7 @@ "type": "string" }, "state": { - "description": "Query state could be \"enqueued\", \"running\", \"completed\", \"failed\".", + "description": "Query state could be \"enqueued\", \"running\", \"completed\", \"expired\" and \"failed\".", "type": "string" }, "updated": { diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index f6d8ae6f45f..2667ac43a4b 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -2106,6 +2106,59 @@ func (s *GoogleCloudApigeeV1ApiSecurityConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1ApiSecurityRuntimeConfig: Response for +// GetApiSecurityRuntimeConfig[EnvironmentService.GetApiSecurityRuntimeCo +// nfig]. +type GoogleCloudApigeeV1ApiSecurityRuntimeConfig struct { + // Location: A list of up to 5 Cloud Storage Blobs that contain + // SecurityActions. + Location []string `json:"location,omitempty"` + + // Name: Name of the environment API Security Runtime configuration + // resource. Format: + // `organizations/{org}/environments/{env}/apiSecurityRuntimeConfig` + Name string `json:"name,omitempty"` + + // RevisionId: Revision ID of the API Security Runtime configuration. + // The higher the value, the more recently the configuration was + // deployed. + RevisionId int64 `json:"revisionId,omitempty,string"` + + // Uid: Unique ID for the API Security Runtime configuration. The ID + // will only change if the environment is deleted and recreated. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Time that the API Security Runtime configuration was + // 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. "Location") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Location") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1ApiSecurityRuntimeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ApiSecurityRuntimeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type GoogleCloudApigeeV1App struct { // ApiProducts: List of API products associated with the app. ApiProducts []*GoogleCloudApigeeV1ApiProductRef `json:"apiProducts,omitempty"` @@ -9799,7 +9852,7 @@ type GoogleCloudApigeeV1SecurityReport struct { Self string `json:"self,omitempty"` // State: Query state could be "enqueued", "running", "completed", - // "failed". + // "expired" and "failed". State string `json:"state,omitempty"` // Updated: Output only. Last updated timestamp for the query. @@ -29386,6 +29439,158 @@ func (c *OrganizationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Go } +// method id "apigee.organizations.environments.getApiSecurityRuntimeConfig": + +type OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetApiSecurityRuntimeConfig: Gets the API Security runtime +// configuration for an environment. This named ApiSecurityRuntimeConfig +// to prevent conflicts with ApiSecurityConfig from addon config. +// +// - name: Name of the environment API Security Runtime configuration +// resource. Use the following structure in your request: +// `organizations/{org}/environments/{env}/apiSecurityRuntimeConfig`. +func (r *OrganizationsEnvironmentsService) GetApiSecurityRuntimeConfig(name string) *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall { + c := &OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall{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 *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall { + 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 *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall { + 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 *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall) 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 "apigee.organizations.environments.getApiSecurityRuntimeConfig" call. +// Exactly one of *GoogleCloudApigeeV1ApiSecurityRuntimeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ApiSecurityRuntimeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsEnvironmentsGetApiSecurityRuntimeConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiSecurityRuntimeConfig, error) { + gensupport.SetOptions(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 := &GoogleCloudApigeeV1ApiSecurityRuntimeConfig{ + ServerResponse: googleapi.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 API Security runtime configuration for an environment. This named ApiSecurityRuntimeConfig to prevent conflicts with ApiSecurityConfig from addon config.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apiSecurityRuntimeConfig", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.getApiSecurityRuntimeConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the environment API Security Runtime configuration resource. Use the following structure in your request: `organizations/{org}/environments/{env}/apiSecurityRuntimeConfig`", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apiSecurityRuntimeConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1ApiSecurityRuntimeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "apigee.organizations.environments.getDebugmask": type OrganizationsEnvironmentsGetDebugmaskCall struct { diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 37437e94092..7bee7b52a3e 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -491,7 +491,7 @@ } } }, - "revision": "20221104", + "revision": "20221110", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -941,16 +941,16 @@ "type": "string" }, "partner": { - "description": "Optional. Compliance Regime associated with this workload.", + "description": "Optional. Partner regime associated with this workload.", "enum": [ "PARTNER_UNSPECIFIED", "LOCAL_CONTROLS_BY_S3NS", "SOVEREIGN_CONTROLS_BY_T_SYSTEMS" ], "enumDescriptions": [ - "Unknown partner regime/controls.", - "S3NS regime/controls.", - "TSystem regime/controls." + "", + "Enum representing S3NS partner.", + "Enum representing T_SYSTEM partner." ], "type": "string" }, diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 083bcf25b04..7c83f93dd10 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -786,12 +786,13 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // Read-only. Name string `json:"name,omitempty"` - // Partner: Optional. Compliance Regime associated with this workload. + // Partner: Optional. Partner regime associated with this workload. // // Possible values: - // "PARTNER_UNSPECIFIED" - Unknown partner regime/controls. - // "LOCAL_CONTROLS_BY_S3NS" - S3NS regime/controls. - // "SOVEREIGN_CONTROLS_BY_T_SYSTEMS" - TSystem regime/controls. + // "PARTNER_UNSPECIFIED" + // "LOCAL_CONTROLS_BY_S3NS" - Enum representing S3NS partner. + // "SOVEREIGN_CONTROLS_BY_T_SYSTEMS" - Enum representing T_SYSTEM + // partner. Partner string `json:"partner,omitempty"` // ProvisionedResourcesParent: Input only. The parent resource for the diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index 92dacdb2c2b..bce55297637 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -595,7 +595,7 @@ } } }, - "revision": "20221104", + "revision": "20221110", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -1019,16 +1019,16 @@ "type": "string" }, "partner": { - "description": "Optional. Compliance Regime associated with this workload.", + "description": "Optional. Partner regime associated with this workload.", "enum": [ "PARTNER_UNSPECIFIED", "LOCAL_CONTROLS_BY_S3NS", "SOVEREIGN_CONTROLS_BY_T_SYSTEMS" ], "enumDescriptions": [ - "Unknown partner regime/controls.", - "S3NS regime/controls.", - "TSystems regime/controls." + "", + "Enum representing S3NS partner.", + "Enum representing T_SYSTEM partner." ], "type": "string" }, diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index 8b7e312b981..5264350e726 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -860,12 +860,13 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // Read-only. Name string `json:"name,omitempty"` - // Partner: Optional. Compliance Regime associated with this workload. + // Partner: Optional. Partner regime associated with this workload. // // Possible values: - // "PARTNER_UNSPECIFIED" - Unknown partner regime/controls. - // "LOCAL_CONTROLS_BY_S3NS" - S3NS regime/controls. - // "SOVEREIGN_CONTROLS_BY_T_SYSTEMS" - TSystems regime/controls. + // "PARTNER_UNSPECIFIED" + // "LOCAL_CONTROLS_BY_S3NS" - Enum representing S3NS partner. + // "SOVEREIGN_CONTROLS_BY_T_SYSTEMS" - Enum representing T_SYSTEM + // partner. Partner string `json:"partner,omitempty"` // ProvisionedResourcesParent: Input only. The parent resource for the diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index b52175e4ec7..860e483885e 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -834,6 +834,31 @@ "resources": { "issues": { "methods": { + "delete": { + "description": "Deletes an issue.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/issueModels/{issueModelsId}/issues/{issuesId}", + "httpMethod": "DELETE", + "id": "contactcenterinsights.projects.locations.issueModels.issues.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the issue to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/issues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets an issue.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/issueModels/{issueModelsId}/issues/{issuesId}", @@ -1331,7 +1356,7 @@ } } }, - "revision": "20221112", + "revision": "20221116", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -2624,6 +2649,14 @@ "description": "Immutable. The resource name of the issue. Format: projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}", "type": "string" }, + "sampleUtterances": { + "description": "Output only. Resource names of the sample representative utterances that match to this issue.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "updateTime": { "description": "Output only. The most recent time that this issue was updated.", "format": "google-datetime", diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 5da776c91b3..7b3aa1fa06f 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -2385,6 +2385,10 @@ type GoogleCloudContactcenterinsightsV1Issue struct { // es/{issue} Name string `json:"name,omitempty"` + // SampleUtterances: Output only. Resource names of the sample + // representative utterances that match to this issue. + SampleUtterances []string `json:"sampleUtterances,omitempty"` + // UpdateTime: Output only. The most recent time that this issue was // updated. UpdateTime string `json:"updateTime,omitempty"` @@ -8322,6 +8326,138 @@ func (c *ProjectsLocationsIssueModelsUndeployCall) Do(opts ...googleapi.CallOpti } +// method id "contactcenterinsights.projects.locations.issueModels.issues.delete": + +type ProjectsLocationsIssueModelsIssuesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an issue. +// +// - name: The name of the issue to delete. +func (r *ProjectsLocationsIssueModelsIssuesService) Delete(name string) *ProjectsLocationsIssueModelsIssuesDeleteCall { + c := &ProjectsLocationsIssueModelsIssuesDeleteCall{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 *ProjectsLocationsIssueModelsIssuesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIssueModelsIssuesDeleteCall { + 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 *ProjectsLocationsIssueModelsIssuesDeleteCall) Context(ctx context.Context) *ProjectsLocationsIssueModelsIssuesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsIssueModelsIssuesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsIssueModelsIssuesDeleteCall) 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 "contactcenterinsights.projects.locations.issueModels.issues.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsIssueModelsIssuesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an issue.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/issueModels/{issueModelsId}/issues/{issuesId}", + // "httpMethod": "DELETE", + // "id": "contactcenterinsights.projects.locations.issueModels.issues.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the issue to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/issues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "contactcenterinsights.projects.locations.issueModels.issues.get": type ProjectsLocationsIssueModelsIssuesGetCall struct { diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 02623aa4c4a..1c88821d69e 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3412,7 +3412,7 @@ } } }, - "revision": "20221106", + "revision": "20221115", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -5045,7 +5045,7 @@ "type": "object" }, "GooglePrivacyDlpV2ExcludeByHotword": { - "description": "The rule to exclude findings based on a hotword. For record inspection of tables, column names are considered hotwords. An example of this is to exclude a finding if a BigQuery column matches a specific pattern.", + "description": "The rule to exclude findings based on a hotword. For record inspection of tables, column names are considered hotwords. An example of this is to exclude a finding if it belongs to a BigQuery column that matches a specific pattern.", "id": "GooglePrivacyDlpV2ExcludeByHotword", "properties": { "hotwordRegex": { diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 9a175ea3909..f2a7841311f 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -3450,8 +3450,8 @@ func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2ExcludeByHotword: The rule to exclude findings // based on a hotword. For record inspection of tables, column names are -// considered hotwords. An example of this is to exclude a finding if a -// BigQuery column matches a specific pattern. +// considered hotwords. An example of this is to exclude a finding if it +// belongs to a BigQuery column that matches a specific pattern. type GooglePrivacyDlpV2ExcludeByHotword struct { // HotwordRegex: Regular expression pattern defining what qualifies as a // hotword. diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 102be59b476..2a9cc821927 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -892,184 +892,9 @@ } } } - }, - "uiv1beta3": { - "resources": { - "projects": { - "resources": { - "locations": { - "methods": { - "get": { - "description": "Gets information about a location.", - "flatPath": "uiv1beta3/projects/{projectsId}/locations/{locationsId}", - "httpMethod": "GET", - "id": "documentai.uiv1beta3.projects.locations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name for the location.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "uiv1beta3/{+name}", - "response": { - "$ref": "GoogleCloudLocationLocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists information about the supported locations for this service.", - "flatPath": "uiv1beta3/projects/{projectsId}/locations", - "httpMethod": "GET", - "id": "documentai.uiv1beta3.projects.locations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", - "location": "query", - "type": "string" - }, - "name": { - "description": "The resource that owns the locations collection, if applicable.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of results to return. If not set, the service selects a default.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - "location": "query", - "type": "string" - } - }, - "path": "uiv1beta3/{+name}/locations", - "response": { - "$ref": "GoogleCloudLocationListLocationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "flatPath": "uiv1beta3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "documentai.uiv1beta3.projects.locations.operations.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "uiv1beta3/{+name}:cancel", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "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": "uiv1beta3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "documentai.uiv1beta3.projects.locations.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "uiv1beta3/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - "flatPath": "uiv1beta3/projects/{projectsId}/locations/{locationsId}/operations", - "httpMethod": "GET", - "id": "documentai.uiv1beta3.projects.locations.operations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "uiv1beta3/{+name}", - "response": { - "$ref": "GoogleLongrunningListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - } } }, - "revision": "20221108", + "revision": "20221114", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1808,15 +1633,15 @@ "id": "GoogleCloudDocumentaiV1Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -1832,7 +1657,7 @@ }, "gcsPrefix": { "$ref": "GoogleCloudDocumentaiV1GcsPrefix", - "description": "The set of documents that match the specified Cloud Storage [gcs_prefix]." + "description": "The set of documents that match the specified Cloud Storage `gcs_prefix`." } }, "type": "object" @@ -2123,7 +1948,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1DocumentTextChange" }, @@ -2148,7 +1973,7 @@ "id": "GoogleCloudDocumentaiV1DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -2417,7 +2242,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -2499,12 +2324,12 @@ "id": "GoogleCloudDocumentaiV1DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -2614,7 +2439,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -2626,12 +2451,12 @@ "id": "GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -2646,7 +2471,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -3085,7 +2910,7 @@ "description": "If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \u003e10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file." }, "name": { - "description": "Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - *use snake_casing* - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The '/' is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility.", + "description": "Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - *use `snake_casing`* - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The `/` is sometimes used to denote a property of a type. For example `line_item/amount`. This convention is deprecated, but will still be honored for backward compatibility.", "type": "string" }, "properties": { @@ -3203,7 +3028,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -3569,9 +3394,9 @@ "The processor is in an unspecified state.", "The processor is enabled, i.e., has an enabled version which can currently serve processing requests and all the feature dependencies have been successfully initialized.", "The processor is disabled.", - "The processor is being enabled, will become ENABLED if successful.", - "The processor is being disabled, will become DISABLED if successful.", - "The processor is being created, will become either ENABLED (for successful creation) or FAILED (for failed ones). Once a processor is in this state, it can then be used for document processing, but the feature dependencies of the processor might not be fully created yet.", + "The processor is being enabled, will become `ENABLED` if successful.", + "The processor is being disabled, will become `DISABLED` if successful.", + "The processor is being created, will become either `ENABLED` (for successful creation) or `FAILED` (for failed ones). Once a processor is in this state, it can then be used for document processing, but the feature dependencies of the processor might not be fully created yet.", "The processor failed during creation or initialization of feature dependencies. The user should delete the processor and recreate one as all the functionalities of the processor are disabled.", "The processor is being deleted, will be removed if successful." ], @@ -3579,7 +3404,7 @@ "type": "string" }, "type": { - "description": "The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors types, see FetchProcessorTypes.", + "description": "The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. To get a list of processors types, see FetchProcessorTypes.", "type": "string" } }, @@ -3629,11 +3454,11 @@ "type": "string" }, "name": { - "description": "The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type}", + "description": "The resource name of the processor type. Format: `projects/{project}/processorTypes/{processor_type}`", "type": "string" }, "type": { - "description": "The type of the processor, e.g., \"invoice_parsing\".", + "description": "The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.", "type": "string" } }, @@ -3740,7 +3565,7 @@ "type": "string" }, "mimeType": { - "description": "An IANA MIME type (RFC6838) indicating the nature and format of the [content].", + "description": "An IANA MIME type (RFC6838) indicating the nature and format of the content.", "type": "string" } }, @@ -3950,15 +3775,15 @@ "id": "GoogleCloudDocumentaiV1beta1Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -4053,7 +3878,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextChange" }, @@ -4078,7 +3903,7 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -4320,7 +4145,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -4402,12 +4227,12 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -4517,7 +4342,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -4529,12 +4354,12 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -4549,7 +4374,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -4977,7 +4802,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -5224,15 +5049,15 @@ "id": "GoogleCloudDocumentaiV1beta2Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -5334,7 +5159,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextChange" }, @@ -5359,7 +5184,7 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -5621,7 +5446,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -5703,12 +5528,12 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -5818,7 +5643,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -5830,12 +5655,12 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -5850,7 +5675,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -6278,7 +6103,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -6726,6 +6551,28 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata": { + "description": "Metadata of the EvaluateProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse": { + "description": "Metadata of the EvaluateProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse", + "properties": { + "evaluation": { + "description": "The resource name of the created evaluation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3HumanReviewStatus": { "description": "The status of human review on a processed document.", "id": "GoogleCloudDocumentaiV1beta3HumanReviewStatus", @@ -6854,6 +6701,67 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata": { + "description": "The metadata that represents a processor version being created.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + }, + "testDatasetValidation": { + "$ref": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "description": "The test dataset validation information." + }, + "trainingDatasetValidation": { + "$ref": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "description": "The training dataset validation information." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation": { + "description": "The dataset validation information. This includes any and all errors with documents and the dataset.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "properties": { + "datasetErrorCount": { + "description": "The total number of dataset errors.", + "format": "int32", + "type": "integer" + }, + "datasetErrors": { + "description": "Error information for the dataset as a whole. A maximum of 10 dataset errors will be returned. A single dataset error is terminal for training.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "documentErrorCount": { + "description": "The total number of document errors.", + "format": "int32", + "type": "integer" + }, + "documentErrors": { + "description": "Error information pertaining to specific documents. A maximum of 10 document errors will be returned. Any document with errors will not be used throughout training.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse": { + "description": "The response for the TrainProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse", + "properties": { + "processorVersion": { + "description": "The resource name of the processor version produced by training.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata": { "description": "The long running operation metadata for the undeploy processor version method.", "id": "GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata", diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index bbcc9ca7a89..b82c2593131 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -120,7 +120,6 @@ func New(client *http.Client) (*Service, error) { s := &Service{client: client, BasePath: basePath} s.Operations = NewOperationsService(s) s.Projects = NewProjectsService(s) - s.Uiv1beta3 = NewUiv1beta3Service(s) return s, nil } @@ -132,8 +131,6 @@ type Service struct { Operations *OperationsService Projects *ProjectsService - - Uiv1beta3 *Uiv1beta3Service } func (s *Service) userAgent() string { @@ -245,51 +242,6 @@ type ProjectsOperationsService struct { s *Service } -func NewUiv1beta3Service(s *Service) *Uiv1beta3Service { - rs := &Uiv1beta3Service{s: s} - rs.Projects = NewUiv1beta3ProjectsService(s) - return rs -} - -type Uiv1beta3Service struct { - s *Service - - Projects *Uiv1beta3ProjectsService -} - -func NewUiv1beta3ProjectsService(s *Service) *Uiv1beta3ProjectsService { - rs := &Uiv1beta3ProjectsService{s: s} - rs.Locations = NewUiv1beta3ProjectsLocationsService(s) - return rs -} - -type Uiv1beta3ProjectsService struct { - s *Service - - Locations *Uiv1beta3ProjectsLocationsService -} - -func NewUiv1beta3ProjectsLocationsService(s *Service) *Uiv1beta3ProjectsLocationsService { - rs := &Uiv1beta3ProjectsLocationsService{s: s} - rs.Operations = NewUiv1beta3ProjectsLocationsOperationsService(s) - return rs -} - -type Uiv1beta3ProjectsLocationsService struct { - s *Service - - Operations *Uiv1beta3ProjectsLocationsOperationsService -} - -func NewUiv1beta3ProjectsLocationsOperationsService(s *Service) *Uiv1beta3ProjectsLocationsOperationsService { - rs := &Uiv1beta3ProjectsLocationsOperationsService{s: s} - return rs -} - -type Uiv1beta3ProjectsLocationsOperationsService struct { - s *Service -} - type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` @@ -1644,24 +1596,26 @@ func (s *GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata) Marsh // GoogleCloudDocumentaiV1Barcode: Encodes the detailed information of a // barcode. type GoogleCloudDocumentaiV1Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -1695,7 +1649,7 @@ type GoogleCloudDocumentaiV1BatchDocumentsInputConfig struct { GcsDocuments *GoogleCloudDocumentaiV1GcsDocuments `json:"gcsDocuments,omitempty"` // GcsPrefix: The set of documents that match the specified Cloud - // Storage [gcs_prefix]. + // Storage `gcs_prefix`. GcsPrefix *GoogleCloudDocumentaiV1GcsPrefix `json:"gcsPrefix,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsDocuments") to @@ -2129,9 +2083,9 @@ type GoogleCloudDocumentaiV1Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -2170,8 +2124,8 @@ func (s *GoogleCloudDocumentaiV1Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -2553,7 +2507,7 @@ type GoogleCloudDocumentaiV1DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -2689,10 +2643,10 @@ func (s *GoogleCloudDocumentaiV1DocumentPageDetectedBarcode) MarshalJSON() ([]by // GoogleCloudDocumentaiV1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -2888,7 +2842,7 @@ type GoogleCloudDocumentaiV1DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -2933,15 +2887,15 @@ func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScores) UnmarshalJSON(da // GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect: // Image Quality Defects type GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -2989,7 +2943,7 @@ type GoogleCloudDocumentaiV1DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -3653,13 +3607,13 @@ type GoogleCloudDocumentaiV1DocumentSchemaEntityType struct { // Name: Name of the type. It must be unique within the schema file and // cannot be a 'Common Type'. Besides that we use the following naming - // conventions: - *use snake_casing* - name matching is case-insensitive - // - Maximum 64 characters. - Must start with a letter. - Allowed - // characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility - // internal infrastructure and tooling can handle any ascii character) - - // The '/' is sometimes used to denote a property of a type. For example - // line_item/amount. This convention is deprecated, but will still be - // honored for backward compatibility. + // conventions: - *use `snake_casing`* - name matching is + // case-insensitive - Maximum 64 characters. - Must start with a letter. + // - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward + // compatibility internal infrastructure and tooling can handle any + // ascii character) - The `/` is sometimes used to denote a property of + // a type. For example `line_item/amount`. This convention is + // deprecated, but will still be honored for backward compatibility. Name string `json:"name,omitempty"` // Properties: Describing the nested structure, or composition of an @@ -3860,7 +3814,7 @@ type GoogleCloudDocumentaiV1DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -4551,13 +4505,13 @@ type GoogleCloudDocumentaiV1Processor struct { // which can currently serve processing requests and all the feature // dependencies have been successfully initialized. // "DISABLED" - The processor is disabled. - // "ENABLING" - The processor is being enabled, will become ENABLED if - // successful. - // "DISABLING" - The processor is being disabled, will become DISABLED + // "ENABLING" - The processor is being enabled, will become `ENABLED` // if successful. + // "DISABLING" - The processor is being disabled, will become + // `DISABLED` if successful. // "CREATING" - The processor is being created, will become either - // ENABLED (for successful creation) or FAILED (for failed ones). Once a - // processor is in this state, it can then be used for document + // `ENABLED` (for successful creation) or `FAILED` (for failed ones). + // Once a processor is in this state, it can then be used for document // processing, but the feature dependencies of the processor might not // be fully created yet. // "FAILED" - The processor failed during creation or initialization @@ -4568,7 +4522,7 @@ type GoogleCloudDocumentaiV1Processor struct { // successful. State string `json:"state,omitempty"` - // Type: The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, + // Type: The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, // etc. To get a list of processors types, see FetchProcessorTypes. Type string `json:"type,omitempty"` @@ -4654,10 +4608,11 @@ type GoogleCloudDocumentaiV1ProcessorType struct { LaunchStage string `json:"launchStage,omitempty"` // Name: The resource name of the processor type. Format: - // projects/{project}/processorTypes/{processor_type} + // `projects/{project}/processorTypes/{processor_type}` Name string `json:"name,omitempty"` - // Type: The type of the processor, e.g., "invoice_parsing". + // Type: The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, + // etc. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowCreation") to @@ -4834,7 +4789,7 @@ type GoogleCloudDocumentaiV1RawDocument struct { Content string `json:"content,omitempty"` // MimeType: An IANA MIME type (RFC6838) indicating the nature and - // format of the [content]. + // format of the content. MimeType string `json:"mimeType,omitempty"` // ForceSendFields is a list of field names (e.g. "Content") to @@ -5207,24 +5162,26 @@ func (s *GoogleCloudDocumentaiV1alpha1CommonOperationMetadata) MarshalJSON() ([] // GoogleCloudDocumentaiV1beta1Barcode: Encodes the detailed information // of a barcode. type GoogleCloudDocumentaiV1beta1Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -5355,9 +5312,9 @@ type GoogleCloudDocumentaiV1beta1Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1beta1DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -5396,8 +5353,8 @@ func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1beta1DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -5715,7 +5672,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -5851,10 +5808,10 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() // GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -6051,7 +6008,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -6096,15 +6053,15 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJS // GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefe // ct: Image Quality Defects type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -6152,7 +6109,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -6804,7 +6761,7 @@ type GoogleCloudDocumentaiV1beta1DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -7310,24 +7267,26 @@ func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { // GoogleCloudDocumentaiV1beta2Barcode: Encodes the detailed information // of a barcode. type GoogleCloudDocumentaiV1beta2Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -7461,9 +7420,9 @@ type GoogleCloudDocumentaiV1beta2Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -7502,8 +7461,8 @@ func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1beta2DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -7876,7 +7835,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -8012,10 +7971,10 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() // GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -8212,7 +8171,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -8257,15 +8216,15 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJS // GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefe // ct: Image Quality Defects type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -8313,7 +8272,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -8965,7 +8924,7 @@ type GoogleCloudDocumentaiV1beta2DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -9803,6 +9762,65 @@ func (s *GoogleCloudDocumentaiV1beta3EnableProcessorMetadata) MarshalJSON() ([]b type GoogleCloudDocumentaiV1beta3EnableProcessorResponse struct { } +// GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata: +// Metadata of the EvaluateProcessorVersion method. +type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse: +// Metadata of the EvaluateProcessorVersion method. +type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse struct { + // Evaluation: The resource name of the created evaluation. + Evaluation string `json:"evaluation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Evaluation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Evaluation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3HumanReviewStatus: The status of human // review on a processed document. type GoogleCloudDocumentaiV1beta3HumanReviewStatus struct { @@ -9992,6 +10010,118 @@ func (s *GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata) Marshal type GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse struct { } +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata: The +// metadata that represents a processor version being created. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // TestDatasetValidation: The test dataset validation information. + TestDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"testDatasetValidation,omitempty"` + + // TrainingDatasetValidation: The training dataset validation + // information. + TrainingDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"trainingDatasetValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValida +// tion: The dataset validation information. This includes any and all +// errors with documents and the dataset. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation struct { + // DatasetErrorCount: The total number of dataset errors. + DatasetErrorCount int64 `json:"datasetErrorCount,omitempty"` + + // DatasetErrors: Error information for the dataset as a whole. A + // maximum of 10 dataset errors will be returned. A single dataset error + // is terminal for training. + DatasetErrors []*GoogleRpcStatus `json:"datasetErrors,omitempty"` + + // DocumentErrorCount: The total number of document errors. + DocumentErrorCount int64 `json:"documentErrorCount,omitempty"` + + // DocumentErrors: Error information pertaining to specific documents. A + // maximum of 10 document errors will be returned. Any document with + // errors will not be used throughout training. + DocumentErrors []*GoogleRpcStatus `json:"documentErrors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetErrorCount") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetErrorCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse: The +// response for the TrainProcessorVersion method. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse struct { + // ProcessorVersion: The resource name of the processor version produced + // by training. + ProcessorVersion string `json:"processorVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProcessorVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata: The // long running operation metadata for the undeploy processor version // method. @@ -14755,863 +14885,3 @@ func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLon // } } - -// method id "documentai.uiv1beta3.projects.locations.get": - -type Uiv1beta3ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets information about a location. -// -// - name: Resource name for the location. -func (r *Uiv1beta3ProjectsLocationsService) Get(name string) *Uiv1beta3ProjectsLocationsGetCall { - c := &Uiv1beta3ProjectsLocationsGetCall{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 *Uiv1beta3ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *Uiv1beta3ProjectsLocationsGetCall { - 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 *Uiv1beta3ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *Uiv1beta3ProjectsLocationsGetCall { - 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 *Uiv1beta3ProjectsLocationsGetCall) Context(ctx context.Context) *Uiv1beta3ProjectsLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *Uiv1beta3ProjectsLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *Uiv1beta3ProjectsLocationsGetCall) 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, "uiv1beta3/{+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 "documentai.uiv1beta3.projects.locations.get" call. -// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *Uiv1beta3ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { - gensupport.SetOptions(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 := &GoogleCloudLocationLocation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets information about a location.", - // "flatPath": "uiv1beta3/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "documentai.uiv1beta3.projects.locations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name for the location.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "uiv1beta3/{+name}", - // "response": { - // "$ref": "GoogleCloudLocationLocation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "documentai.uiv1beta3.projects.locations.list": - -type Uiv1beta3ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists information about the supported locations for this -// service. -// -// - name: The resource that owns the locations collection, if -// applicable. -func (r *Uiv1beta3ProjectsLocationsService) List(name string) *Uiv1beta3ProjectsLocationsListCall { - c := &Uiv1beta3ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *Uiv1beta3ProjectsLocationsListCall) Filter(filter string) *Uiv1beta3ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *Uiv1beta3ProjectsLocationsListCall) PageSize(pageSize int64) *Uiv1beta3ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *Uiv1beta3ProjectsLocationsListCall) PageToken(pageToken string) *Uiv1beta3ProjectsLocationsListCall { - 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 *Uiv1beta3ProjectsLocationsListCall) Fields(s ...googleapi.Field) *Uiv1beta3ProjectsLocationsListCall { - 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 *Uiv1beta3ProjectsLocationsListCall) IfNoneMatch(entityTag string) *Uiv1beta3ProjectsLocationsListCall { - 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 *Uiv1beta3ProjectsLocationsListCall) Context(ctx context.Context) *Uiv1beta3ProjectsLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *Uiv1beta3ProjectsLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *Uiv1beta3ProjectsLocationsListCall) 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, "uiv1beta3/{+name}/locations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "documentai.uiv1beta3.projects.locations.list" call. -// Exactly one of *GoogleCloudLocationListLocationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *Uiv1beta3ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { - gensupport.SetOptions(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 := &GoogleCloudLocationListLocationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "uiv1beta3/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "documentai.uiv1beta3.projects.locations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "uiv1beta3/{+name}/locations", - // "response": { - // "$ref": "GoogleCloudLocationListLocationsResponse" - // }, - // "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 *Uiv1beta3ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 "documentai.uiv1beta3.projects.locations.operations.cancel": - -type Uiv1beta3ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *Uiv1beta3ProjectsLocationsOperationsService) Cancel(name string) *Uiv1beta3ProjectsLocationsOperationsCancelCall { - c := &Uiv1beta3ProjectsLocationsOperationsCancelCall{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 *Uiv1beta3ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *Uiv1beta3ProjectsLocationsOperationsCancelCall { - 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 *Uiv1beta3ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *Uiv1beta3ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *Uiv1beta3ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *Uiv1beta3ProjectsLocationsOperationsCancelCall) 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, "uiv1beta3/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "documentai.uiv1beta3.projects.locations.operations.cancel" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *Uiv1beta3ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { - gensupport.SetOptions(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 := &GoogleProtobufEmpty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "uiv1beta3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "documentai.uiv1beta3.projects.locations.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "uiv1beta3/{+name}:cancel", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "documentai.uiv1beta3.projects.locations.operations.get": - -type Uiv1beta3ProjectsLocationsOperationsGetCall 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 *Uiv1beta3ProjectsLocationsOperationsService) Get(name string) *Uiv1beta3ProjectsLocationsOperationsGetCall { - c := &Uiv1beta3ProjectsLocationsOperationsGetCall{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 *Uiv1beta3ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Uiv1beta3ProjectsLocationsOperationsGetCall { - 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 *Uiv1beta3ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Uiv1beta3ProjectsLocationsOperationsGetCall { - 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 *Uiv1beta3ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *Uiv1beta3ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *Uiv1beta3ProjectsLocationsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *Uiv1beta3ProjectsLocationsOperationsGetCall) 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, "uiv1beta3/{+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 "documentai.uiv1beta3.projects.locations.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *Uiv1beta3ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "uiv1beta3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "documentai.uiv1beta3.projects.locations.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "uiv1beta3/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "documentai.uiv1beta3.projects.locations.operations.list": - -type Uiv1beta3ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. -// -// - name: The name of the operation's parent resource. -func (r *Uiv1beta3ProjectsLocationsOperationsService) List(name string) *Uiv1beta3ProjectsLocationsOperationsListCall { - c := &Uiv1beta3ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *Uiv1beta3ProjectsLocationsOperationsListCall) Filter(filter string) *Uiv1beta3ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *Uiv1beta3ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *Uiv1beta3ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *Uiv1beta3ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Uiv1beta3ProjectsLocationsOperationsListCall { - 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 *Uiv1beta3ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Uiv1beta3ProjectsLocationsOperationsListCall { - 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 *Uiv1beta3ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Uiv1beta3ProjectsLocationsOperationsListCall { - 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 *Uiv1beta3ProjectsLocationsOperationsListCall) Context(ctx context.Context) *Uiv1beta3ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *Uiv1beta3ProjectsLocationsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *Uiv1beta3ProjectsLocationsOperationsListCall) 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, "uiv1beta3/{+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 "documentai.uiv1beta3.projects.locations.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *Uiv1beta3ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { - gensupport.SetOptions(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 := &GoogleLongrunningListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "uiv1beta3/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "documentai.uiv1beta3.projects.locations.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "uiv1beta3/{+name}", - // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" - // }, - // "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 *Uiv1beta3ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 4020f57d315..91c9e6a1735 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20221017", + "revision": "20221114", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1395,15 +1395,15 @@ "id": "GoogleCloudDocumentaiV1beta1Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -1498,7 +1498,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextChange" }, @@ -1523,7 +1523,7 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -1765,7 +1765,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -1847,12 +1847,12 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -1962,7 +1962,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -1974,12 +1974,12 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -1994,7 +1994,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -2422,7 +2422,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -2680,15 +2680,15 @@ "id": "GoogleCloudDocumentaiV1beta2Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -2804,7 +2804,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextChange" }, @@ -2829,7 +2829,7 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -3091,7 +3091,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -3173,12 +3173,12 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -3288,7 +3288,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -3300,12 +3300,12 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -3320,7 +3320,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -3748,7 +3748,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -4353,6 +4353,28 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata": { + "description": "Metadata of the EvaluateProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse": { + "description": "Metadata of the EvaluateProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse", + "properties": { + "evaluation": { + "description": "The resource name of the created evaluation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3HumanReviewStatus": { "description": "The status of human review on a processed document.", "id": "GoogleCloudDocumentaiV1beta3HumanReviewStatus", @@ -4481,6 +4503,67 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata": { + "description": "The metadata that represents a processor version being created.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + }, + "testDatasetValidation": { + "$ref": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "description": "The test dataset validation information." + }, + "trainingDatasetValidation": { + "$ref": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "description": "The training dataset validation information." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation": { + "description": "The dataset validation information. This includes any and all errors with documents and the dataset.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "properties": { + "datasetErrorCount": { + "description": "The total number of dataset errors.", + "format": "int32", + "type": "integer" + }, + "datasetErrors": { + "description": "Error information for the dataset as a whole. A maximum of 10 dataset errors will be returned. A single dataset error is terminal for training.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "documentErrorCount": { + "description": "The total number of document errors.", + "format": "int32", + "type": "integer" + }, + "documentErrors": { + "description": "Error information pertaining to specific documents. A maximum of 10 document errors will be returned. Any document with errors will not be used throughout training.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse": { + "description": "The response for the TrainProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse", + "properties": { + "processorVersion": { + "description": "The resource name of the processor version produced by training.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata": { "description": "The long running operation metadata for the undeploy processor version method.", "id": "GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata", diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 79e98ab8bd5..47a9e74795d 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -2163,24 +2163,26 @@ func (s *GoogleCloudDocumentaiV1alpha1CommonOperationMetadata) MarshalJSON() ([] // GoogleCloudDocumentaiV1beta1Barcode: Encodes the detailed information // of a barcode. type GoogleCloudDocumentaiV1beta1Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -2311,9 +2313,9 @@ type GoogleCloudDocumentaiV1beta1Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1beta1DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -2352,8 +2354,8 @@ func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1beta1DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -2671,7 +2673,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -2807,10 +2809,10 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() // GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -3007,7 +3009,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -3052,15 +3054,15 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJS // GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefe // ct: Image Quality Defects type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -3108,7 +3110,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -3760,7 +3762,7 @@ type GoogleCloudDocumentaiV1beta1DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -4296,24 +4298,26 @@ func (s *GoogleCloudDocumentaiV1beta2AutoMlParams) MarshalJSON() ([]byte, error) // GoogleCloudDocumentaiV1beta2Barcode: Encodes the detailed information // of a barcode. type GoogleCloudDocumentaiV1beta2Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -4477,9 +4481,9 @@ type GoogleCloudDocumentaiV1beta2Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -4522,8 +4526,8 @@ func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1beta2DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -4896,7 +4900,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -5032,10 +5036,10 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() // GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -5232,7 +5236,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -5277,15 +5281,15 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJS // GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefe // ct: Image Quality Defects type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -5333,7 +5337,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -5985,7 +5989,7 @@ type GoogleCloudDocumentaiV1beta2DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -7110,6 +7114,65 @@ func (s *GoogleCloudDocumentaiV1beta3EnableProcessorMetadata) MarshalJSON() ([]b type GoogleCloudDocumentaiV1beta3EnableProcessorResponse struct { } +// GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata: +// Metadata of the EvaluateProcessorVersion method. +type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse: +// Metadata of the EvaluateProcessorVersion method. +type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse struct { + // Evaluation: The resource name of the created evaluation. + Evaluation string `json:"evaluation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Evaluation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Evaluation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3HumanReviewStatus: The status of human // review on a processed document. type GoogleCloudDocumentaiV1beta3HumanReviewStatus struct { @@ -7299,6 +7362,118 @@ func (s *GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata) Marshal type GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse struct { } +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata: The +// metadata that represents a processor version being created. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // TestDatasetValidation: The test dataset validation information. + TestDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"testDatasetValidation,omitempty"` + + // TrainingDatasetValidation: The training dataset validation + // information. + TrainingDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"trainingDatasetValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValida +// tion: The dataset validation information. This includes any and all +// errors with documents and the dataset. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation struct { + // DatasetErrorCount: The total number of dataset errors. + DatasetErrorCount int64 `json:"datasetErrorCount,omitempty"` + + // DatasetErrors: Error information for the dataset as a whole. A + // maximum of 10 dataset errors will be returned. A single dataset error + // is terminal for training. + DatasetErrors []*GoogleRpcStatus `json:"datasetErrors,omitempty"` + + // DocumentErrorCount: The total number of document errors. + DocumentErrorCount int64 `json:"documentErrorCount,omitempty"` + + // DocumentErrors: Error information pertaining to specific documents. A + // maximum of 10 document errors will be returned. Any document with + // errors will not be used throughout training. + DocumentErrors []*GoogleRpcStatus `json:"documentErrors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetErrorCount") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetErrorCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse: The +// response for the TrainProcessorVersion method. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse struct { + // ProcessorVersion: The resource name of the processor version produced + // by training. + ProcessorVersion string `json:"processorVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProcessorVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata: The // long running operation metadata for the undeploy processor version // method. diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 2c2fd1f16f4..7dfdca29e5c 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -959,7 +959,7 @@ } } }, - "revision": "20221108", + "revision": "20221114", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -2062,15 +2062,15 @@ "id": "GoogleCloudDocumentaiV1beta1Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -2165,7 +2165,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextChange" }, @@ -2190,7 +2190,7 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -2432,7 +2432,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -2514,12 +2514,12 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -2629,7 +2629,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -2641,12 +2641,12 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -2661,7 +2661,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -3089,7 +3089,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -3336,15 +3336,15 @@ "id": "GoogleCloudDocumentaiV1beta2Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -3446,7 +3446,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextChange" }, @@ -3471,7 +3471,7 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -3733,7 +3733,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -3815,12 +3815,12 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -3930,7 +3930,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -3942,12 +3942,12 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -3962,7 +3962,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -4390,7 +4390,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -4642,15 +4642,15 @@ "id": "GoogleCloudDocumentaiV1beta3Barcode", "properties": { "format": { - "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "description": "Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.", "type": "string" }, "rawValue": { - "description": "Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'.", + "description": "Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.", "type": "string" }, "valueFormat": { - "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license.", + "description": "Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.", "type": "string" } }, @@ -4666,7 +4666,7 @@ }, "gcsPrefix": { "$ref": "GoogleCloudDocumentaiV1beta3GcsPrefix", - "description": "The set of documents that match the specified Cloud Storage [gcs_prefix]." + "description": "The set of documents that match the specified Cloud Storage `gcs_prefix`." } }, "type": "object" @@ -4998,7 +4998,7 @@ "type": "string" }, "textChanges": { - "description": "Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", "items": { "$ref": "GoogleCloudDocumentaiV1beta3DocumentTextChange" }, @@ -5023,7 +5023,7 @@ "id": "GoogleCloudDocumentaiV1beta3DocumentEntity", "properties": { "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range [0, 1].", + "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -5292,7 +5292,7 @@ "description": "Optional. Identifies the bounding polygon of a layout element on the page." }, "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range [0, 1].", + "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -5374,12 +5374,12 @@ "id": "GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage", "properties": { "confidence": { - "description": "Confidence of detected language. Range [0, 1].", + "description": "Confidence of detected language. Range `[0, 1]`.", "format": "float", "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -5489,7 +5489,7 @@ "type": "array" }, "qualityScore": { - "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "description": "The overall quality score. Range `[0, 1]` where 1 is perfect quality.", "format": "float", "type": "number" } @@ -5501,12 +5501,12 @@ "id": "GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect", "properties": { "confidence": { - "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "description": "Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists.", "format": "float", "type": "number" }, "type": { - "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "description": "Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`", "type": "string" } }, @@ -5521,7 +5521,7 @@ "description": "The bounding polygon for the Layout." }, "confidence": { - "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1].", + "description": "Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.", "format": "float", "type": "number" }, @@ -5960,7 +5960,7 @@ "description": "If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \u003e10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file." }, "name": { - "description": "Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - *use snake_casing* - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The '/' is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility.", + "description": "Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - *use `snake_casing`* - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The `/` is sometimes used to denote a property of a type. For example `line_item/amount`. This convention is deprecated, but will still be honored for backward compatibility.", "type": "string" }, "properties": { @@ -6078,7 +6078,7 @@ "description": "Text color." }, "fontFamily": { - "description": "Font family such as \"Arial\", \"Times New Roman\". https://www.w3schools.com/cssref/pr_font_font-family.asp", + "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", "type": "string" }, "fontSize": { @@ -6200,6 +6200,17 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata": { + "description": "Metadata of the EvaluateProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest": { "description": "Evaluates the given ProcessorVersion against the supplied documents.", "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest", @@ -6211,6 +6222,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse": { + "description": "Metadata of the EvaluateProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse", + "properties": { + "evaluation": { + "description": "The resource name of the created evaluation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3Evaluation": { "description": "An evaluation of a ProcessorVersion's performance.", "id": "GoogleCloudDocumentaiV1beta3Evaluation", @@ -6678,9 +6700,9 @@ "The processor is in an unspecified state.", "The processor is enabled, i.e., has an enabled version which can currently serve processing requests and all the feature dependencies have been successfully initialized.", "The processor is disabled.", - "The processor is being enabled, will become ENABLED if successful.", - "The processor is being disabled, will become DISABLED if successful.", - "The processor is being created, will become either ENABLED (for successful creation) or FAILED (for failed ones). Once a processor is in this state, it can then be used for document processing, but the feature dependencies of the processor might not be fully created yet.", + "The processor is being enabled, will become `ENABLED` if successful.", + "The processor is being disabled, will become `DISABLED` if successful.", + "The processor is being created, will become either `ENABLED` (for successful creation) or `FAILED` (for failed ones). Once a processor is in this state, it can then be used for document processing, but the feature dependencies of the processor might not be fully created yet.", "The processor failed during creation or initialization of feature dependencies. The user should delete the processor and recreate one as all the functionalities of the processor are disabled.", "The processor is being deleted, will be removed if successful." ], @@ -6688,7 +6710,7 @@ "type": "string" }, "type": { - "description": "The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors types, see FetchProcessorTypes.", + "description": "The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. To get a list of processors types, see FetchProcessorTypes.", "type": "string" } }, @@ -6738,11 +6760,11 @@ "type": "string" }, "name": { - "description": "The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type}", + "description": "The resource name of the processor type. Format: `projects/{project}/processorTypes/{processor_type}`", "type": "string" }, "type": { - "description": "The type of the processor, e.g., \"invoice_parsing\".", + "description": "The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.", "type": "string" } }, @@ -6849,7 +6871,7 @@ "type": "string" }, "mimeType": { - "description": "An IANA MIME type (RFC6838) indicating the nature and format of the [content].", + "description": "An IANA MIME type (RFC6838) indicating the nature and format of the content.", "type": "string" } }, @@ -6996,6 +7018,56 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata": { + "description": "The metadata that represents a processor version being created.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + }, + "testDatasetValidation": { + "$ref": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "description": "The test dataset validation information." + }, + "trainingDatasetValidation": { + "$ref": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "description": "The training dataset validation information." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation": { + "description": "The dataset validation information. This includes any and all errors with documents and the dataset.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation", + "properties": { + "datasetErrorCount": { + "description": "The total number of dataset errors.", + "format": "int32", + "type": "integer" + }, + "datasetErrors": { + "description": "Error information for the dataset as a whole. A maximum of 10 dataset errors will be returned. A single dataset error is terminal for training.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "documentErrorCount": { + "description": "The total number of document errors.", + "format": "int32", + "type": "integer" + }, + "documentErrors": { + "description": "Error information pertaining to specific documents. A maximum of 10 document errors will be returned. Any document with errors will not be used throughout training.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest": { "description": "Request message for the create processor version method.", "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest", @@ -7034,6 +7106,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse": { + "description": "The response for the TrainProcessorVersion method.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse", + "properties": { + "processorVersion": { + "description": "The resource name of the processor version produced by training.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata": { "description": "The long running operation metadata for the undeploy processor version method.", "id": "GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata", diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 89f6d2a57c9..1c0924f6f33 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -2187,24 +2187,26 @@ func (s *GoogleCloudDocumentaiV1alpha1CommonOperationMetadata) MarshalJSON() ([] // GoogleCloudDocumentaiV1beta1Barcode: Encodes the detailed information // of a barcode. type GoogleCloudDocumentaiV1beta1Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -2335,9 +2337,9 @@ type GoogleCloudDocumentaiV1beta1Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1beta1DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -2376,8 +2378,8 @@ func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1beta1DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -2695,7 +2697,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -2831,10 +2833,10 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() // GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -3031,7 +3033,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -3076,15 +3078,15 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJS // GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefe // ct: Image Quality Defects type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -3132,7 +3134,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -3784,7 +3786,7 @@ type GoogleCloudDocumentaiV1beta1DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -4290,24 +4292,26 @@ func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { // GoogleCloudDocumentaiV1beta2Barcode: Encodes the detailed information // of a barcode. type GoogleCloudDocumentaiV1beta2Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -4441,9 +4445,9 @@ type GoogleCloudDocumentaiV1beta2Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -4482,8 +4486,8 @@ func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1beta2DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -4856,7 +4860,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -4992,10 +4996,10 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() // GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -5192,7 +5196,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -5237,15 +5241,15 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJS // GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefe // ct: Image Quality Defects type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -5293,7 +5297,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -5945,7 +5949,7 @@ type GoogleCloudDocumentaiV1beta2DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -6457,24 +6461,26 @@ func (s *GoogleCloudDocumentaiV1beta2Vertex) MarshalJSON() ([]byte, error) { // GoogleCloudDocumentaiV1beta3Barcode: Encodes the detailed information // of a barcode. type GoogleCloudDocumentaiV1beta3Barcode struct { - // Format: Format of a barcode. The supported formats are: CODE_128: - // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: - // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. - // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. - // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D - // Aztec code type. DATABAR: GS1 DataBar code type. + // Format: Format of a barcode. The supported formats are: - `CODE_128`: + // Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. + // - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - + // `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - + // `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E + // type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - + // `DATABAR`: GS1 DataBar code type. Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example, - // 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. RawValue string `json:"rawValue,omitempty"` // ValueFormat: Value format describes the format of the value that a - // barcode encodes. The supported formats are: CONTACT_INFO: Contact - // information. EMAIL: Email address. ISBN: ISBN identifier. PHONE: - // Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. - // URL: URL address. WIFI: Wifi information. GEO: Geo-localization. - // CALENDAR_EVENT: Calendar event. DRIVER_LICENSE: Driver's license. + // barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact + // information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - + // `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - + // `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi + // information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar + // event. - `DRIVER_LICENSE`: Driver's license. ValueFormat string `json:"valueFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -6508,7 +6514,7 @@ type GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig struct { GcsDocuments *GoogleCloudDocumentaiV1beta3GcsDocuments `json:"gcsDocuments,omitempty"` // GcsPrefix: The set of documents that match the specified Cloud - // Storage [gcs_prefix]. + // Storage `gcs_prefix`. GcsPrefix *GoogleCloudDocumentaiV1beta3GcsPrefix `json:"gcsPrefix,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsDocuments") to @@ -7023,9 +7029,9 @@ type GoogleCloudDocumentaiV1beta3Document struct { Text string `json:"text,omitempty"` // TextChanges: Placeholder. A list of text corrections made to - // [Document.text]. This is usually used for annotating corrections to - // OCR mistakes. Text changes for a given revision may not overlap with - // each other. + // Document.text. This is usually used for annotating corrections to OCR + // mistakes. Text changes for a given revision may not overlap with each + // other. TextChanges []*GoogleCloudDocumentaiV1beta3DocumentTextChange `json:"textChanges,omitempty"` // TextStyles: Placeholder. Styles for the Document.text. @@ -7064,8 +7070,8 @@ func (s *GoogleCloudDocumentaiV1beta3Document) MarshalJSON() ([]byte, error) { // phrase in the text or a property that belongs to the document. It is // a known entity type, such as a person, an organization, or location. type GoogleCloudDocumentaiV1beta3DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range [0, - // 1]. + // Confidence: Optional. Confidence of detected Schema entity. Range + // `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Id: Optional. Canonical id. This will be a unique value in the entity @@ -7448,7 +7454,7 @@ type GoogleCloudDocumentaiV1beta3DocumentPageAnchorPageRef struct { BoundingPoly *GoogleCloudDocumentaiV1beta3BoundingPoly `json:"boundingPoly,omitempty"` // Confidence: Optional. Confidence of detected page element, if - // applicable. Range [0, 1]. + // applicable. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. @@ -7584,10 +7590,10 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode) MarshalJSON() // GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range [0, 1]. + // Confidence: Confidence of detected language. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". + // LanguageCode: The BCP-47 language code, such as `en-US` or `sr-Latn`. // For more information, see // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` @@ -7784,7 +7790,7 @@ type GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores struct { // DetectedDefects: A list of detected defects. DetectedDefects []*GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range [0, 1] where 1 is + // QualityScore: The overall quality score. Range `[0, 1]` where 1 is // perfect quality. QualityScore float64 `json:"qualityScore,omitempty"` @@ -7829,15 +7835,15 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores) UnmarshalJS // GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefe // ct: Image Quality Defects type GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // Confidence: Confidence of detected defect. Range `[0, 1]` where 1 // indicates strong confidence of that the defect exists. Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are - // "quality/defect_blurry", "quality/defect_noisy", - // "quality/defect_dark", "quality/defect_faint", - // "quality/defect_text_too_small", "quality/defect_document_cutoff", - // "quality/defect_text_cutoff", "quality/defect_glare" + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - + // `quality/defect_dark` - `quality/defect_faint` - + // `quality/defect_text_too_small` - `quality/defect_document_cutoff` - + // `quality/defect_text_cutoff` - `quality/defect_glare` Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -7885,7 +7891,7 @@ type GoogleCloudDocumentaiV1beta3DocumentPageLayout struct { // Confidence: Confidence of the current Layout within context of the // object this layout is for. e.g. confidence can be for a single token, - // a table, a visual element, etc. depending on context. Range [0, 1]. + // a table, a visual element, etc. depending on context. Range `[0, 1]`. Confidence float64 `json:"confidence,omitempty"` // Orientation: Detected orientation for the Layout. @@ -8549,13 +8555,13 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType struct { // Name: Name of the type. It must be unique within the schema file and // cannot be a 'Common Type'. Besides that we use the following naming - // conventions: - *use snake_casing* - name matching is case-insensitive - // - Maximum 64 characters. - Must start with a letter. - Allowed - // characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility - // internal infrastructure and tooling can handle any ascii character) - - // The '/' is sometimes used to denote a property of a type. For example - // line_item/amount. This convention is deprecated, but will still be - // honored for backward compatibility. + // conventions: - *use `snake_casing`* - name matching is + // case-insensitive - Maximum 64 characters. - Must start with a letter. + // - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward + // compatibility internal infrastructure and tooling can handle any + // ascii character) - The `/` is sometimes used to denote a property of + // a type. For example `line_item/amount`. This convention is + // deprecated, but will still be honored for backward compatibility. Name string `json:"name,omitempty"` // Properties: Describing the nested structure, or composition of an @@ -8756,7 +8762,7 @@ type GoogleCloudDocumentaiV1beta3DocumentStyle struct { // Color: Text color. Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as "Arial", "Times New Roman". + // FontFamily: Font family such as `Arial`, `Times New Roman`. // https://www.w3schools.com/cssref/pr_font_font-family.asp FontFamily string `json:"fontFamily,omitempty"` @@ -8998,6 +9004,36 @@ type GoogleCloudDocumentaiV1beta3EnableProcessorRequest struct { type GoogleCloudDocumentaiV1beta3EnableProcessorResponse struct { } +// GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata: +// Metadata of the EvaluateProcessorVersion method. +type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest: // Evaluates the given ProcessorVersion against the supplied documents. type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest struct { @@ -9029,6 +9065,35 @@ func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse: +// Metadata of the EvaluateProcessorVersion method. +type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse struct { + // Evaluation: The resource name of the created evaluation. + Evaluation string `json:"evaluation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Evaluation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Evaluation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3Evaluation: An evaluation of a // ProcessorVersion's performance. type GoogleCloudDocumentaiV1beta3Evaluation struct { @@ -9838,13 +9903,13 @@ type GoogleCloudDocumentaiV1beta3Processor struct { // which can currently serve processing requests and all the feature // dependencies have been successfully initialized. // "DISABLED" - The processor is disabled. - // "ENABLING" - The processor is being enabled, will become ENABLED if - // successful. - // "DISABLING" - The processor is being disabled, will become DISABLED + // "ENABLING" - The processor is being enabled, will become `ENABLED` // if successful. + // "DISABLING" - The processor is being disabled, will become + // `DISABLED` if successful. // "CREATING" - The processor is being created, will become either - // ENABLED (for successful creation) or FAILED (for failed ones). Once a - // processor is in this state, it can then be used for document + // `ENABLED` (for successful creation) or `FAILED` (for failed ones). + // Once a processor is in this state, it can then be used for document // processing, but the feature dependencies of the processor might not // be fully created yet. // "FAILED" - The processor failed during creation or initialization @@ -9855,7 +9920,7 @@ type GoogleCloudDocumentaiV1beta3Processor struct { // successful. State string `json:"state,omitempty"` - // Type: The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, + // Type: The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, // etc. To get a list of processors types, see FetchProcessorTypes. Type string `json:"type,omitempty"` @@ -9941,10 +10006,11 @@ type GoogleCloudDocumentaiV1beta3ProcessorType struct { LaunchStage string `json:"launchStage,omitempty"` // Name: The resource name of the processor type. Format: - // projects/{project}/processorTypes/{processor_type} + // `projects/{project}/processorTypes/{processor_type}` Name string `json:"name,omitempty"` - // Type: The type of the processor, e.g., "invoice_parsing". + // Type: The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, + // etc. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowCreation") to @@ -10121,7 +10187,7 @@ type GoogleCloudDocumentaiV1beta3RawDocument struct { Content string `json:"content,omitempty"` // MimeType: An IANA MIME type (RFC6838) indicating the nature and - // format of the [content]. + // format of the content. MimeType string `json:"mimeType,omitempty"` // ForceSendFields is a list of field names (e.g. "Content") to @@ -10363,6 +10429,87 @@ func (s *GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionRequest) MarshalJ type GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse struct { } +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata: The +// metadata that represents a processor version being created. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // TestDatasetValidation: The test dataset validation information. + TestDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"testDatasetValidation,omitempty"` + + // TrainingDatasetValidation: The training dataset validation + // information. + TrainingDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"trainingDatasetValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValida +// tion: The dataset validation information. This includes any and all +// errors with documents and the dataset. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation struct { + // DatasetErrorCount: The total number of dataset errors. + DatasetErrorCount int64 `json:"datasetErrorCount,omitempty"` + + // DatasetErrors: Error information for the dataset as a whole. A + // maximum of 10 dataset errors will be returned. A single dataset error + // is terminal for training. + DatasetErrors []*GoogleRpcStatus `json:"datasetErrors,omitempty"` + + // DocumentErrorCount: The total number of document errors. + DocumentErrorCount int64 `json:"documentErrorCount,omitempty"` + + // DocumentErrors: Error information pertaining to specific documents. A + // maximum of 10 document errors will be returned. Any document with + // errors will not be used throughout training. + DocumentErrors []*GoogleRpcStatus `json:"documentErrors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetErrorCount") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetErrorCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest: Request // message for the create processor version method. type GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest struct { @@ -10441,6 +10588,37 @@ func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData) Mars return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse: The +// response for the TrainProcessorVersion method. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse struct { + // ProcessorVersion: The resource name of the processor version produced + // by training. + ProcessorVersion string `json:"processorVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProcessorVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata: The // long running operation metadata for the undeploy processor version // method. diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json new file mode 100644 index 00000000000..9e5544fbf89 --- /dev/null +++ b/metastore/v1/metastore-api.json @@ -0,0 +1,2515 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://metastore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dataproc Metastore", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "metastore:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://metastore.mtls.googleapis.com/", + "name": "metastore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "flatPath": "v1/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "metastore.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "metastore.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "federations": { + "methods": { + "create": { + "description": "Creates a metastore federation in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations", + "httpMethod": "POST", + "id": "metastore.projects.locations.federations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "federationId": { + "description": "Required. The ID of the metastore federation, which is used as the final component of the metastore federation's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location in which to create a federation service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/federations", + "request": { + "$ref": "Federation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single federation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.federations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore federation to delete, in the following form:projects/{project_number}/locations/{location_id}/federations/{federation_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single federation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.federations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore federation to retrieve, in the following form:projects/{project_number}/locations/{location_id}/federations/{federation_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Federation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}:getIamPolicy", + "httpMethod": "GET", + "id": "metastore.projects.locations.federations.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists federations in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations", + "httpMethod": "GET", + "id": "metastore.projects.locations.federations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of federations to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous ListFederationServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to ListFederationServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore federations to list, in the following form: projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/federations", + "response": { + "$ref": "ListFederationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the fields of a federation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.federations.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore federation resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Federation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}:setIamPolicy", + "httpMethod": "POST", + "id": "metastore.projects.locations.federations.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}:testIamPermissions", + "httpMethod": "POST", + "id": "metastore.projects.locations.federations.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "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/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "metastore.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "services": { + "methods": { + "create": { + "description": "Creates a metastore service in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/services", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportMetadata": { + "description": "Exports metadata from a service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.exportMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+service}:exportMetadata", + "request": { + "$ref": "ExportMetadataRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Service" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:getIamPolicy", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists services in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/services", + "response": { + "$ref": "ListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a service from a backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.restore", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+service}:restore", + "request": { + "$ref": "RestoreServiceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:setIamPolicy", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:testIamPermissions", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new backup in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}:getIamPolicy", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists backups in a service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}:setIamPolicy", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "metadataImports": { + "methods": { + "create": { + "description": "Creates a new MetadataImport in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.metadataImports.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "metadataImportId": { + "description": "Required. The ID of the metadata import, which is used as the final component of the metadata import's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/metadataImports", + "request": { + "$ref": "MetadataImport" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single import.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports/{metadataImportsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.metadataImports.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "MetadataImport" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists imports in a service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.metadataImports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of imports to return. The response may contain less than the maximum number. If unspecified, no more than 500 imports are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/metadataImports", + "response": { + "$ref": "ListMetadataImportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a single import. Only the description field of MetadataImport is supported to be updated.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports/{metadataImportsId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.metadataImports.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metadata import resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "MetadataImport" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20221103", + "rootUrl": "https://metastore.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.If there are AuditConfigs for both allServices and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "BackendMetastore": { + "description": "Represents a backend metastore for the federation.", + "id": "BackendMetastore", + "properties": { + "metastoreType": { + "description": "The type of the backend metastore.", + "enum": [ + "METASTORE_TYPE_UNSPECIFIED", + "DATAPROC_METASTORE" + ], + "enumDescriptions": [ + "The metastore type is not set.", + "The backend metastore is Dataproc Metastore." + ], + "type": "string" + }, + "name": { + "description": "The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: Dataplex: projects/{project_id}/locations/{location}/lakes/{lake_id} BigQuery: projects/{project_id} Dataproc Metastore: projects/{project_id}/locations/{location}/services/{service_id}", + "type": "string" + } + }, + "type": "object" + }, + "Backup": { + "description": "The details of a backup resource.", + "id": "Backup", + "properties": { + "createTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the backup.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the backup finished creating.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "type": "string" + }, + "restoringServices": { + "description": "Output only. Services that are restoring from the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "serviceRevision": { + "$ref": "Service", + "description": "Output only. The revision of the service at the time of backup.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "DELETING", + "ACTIVE", + "FAILED", + "RESTORING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is being created.", + "The backup is being deleted.", + "The backup is active and ready to use.", + "The backup failed.", + "The backup is being restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates members, or principals, with a role.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. members can have the following values: allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com . serviceAccount:{emailid}: An email address that represents a Google service account. For example, my-other-app@appspot.gserviceaccount.com. serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: An identifier for a Kubernetes service account (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, my-project.svc.id.goog[my-namespace/my-kubernetes-sa]. group:{emailid}: An email address that represents a Google group. For example, admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Consumer": { + "description": "Contains information of the customer's network configurations.", + "id": "Consumer", + "properties": { + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "subnetwork": { + "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:`projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + } + }, + "type": "object" + }, + "DatabaseDump": { + "description": "A specification of the location of and metadata about a database dump from a relational database management system.", + "id": "DatabaseDump", + "properties": { + "databaseType": { + "description": "The type of the database.", + "enum": [ + "DATABASE_TYPE_UNSPECIFIED", + "MYSQL" + ], + "enumDescriptions": [ + "The type of the source database is unknown.", + "The type of the source database is MySQL." + ], + "type": "string" + }, + "gcsUri": { + "description": "A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.", + "type": "string" + }, + "sourceDatabase": { + "description": "The name of the source database.", + "type": "string" + }, + "type": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EncryptionConfig": { + "description": "Encryption settings for the service.", + "id": "EncryptionConfig", + "properties": { + "kmsKey": { + "description": "The fully qualified customer provided Cloud KMS key name to use for customer data encryption, in the following form:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}.", + "type": "string" + } + }, + "type": "object" + }, + "ExportMetadataRequest": { + "description": "Request message for DataprocMetastore.ExportMetadata.", + "id": "ExportMetadataRequest", + "properties": { + "databaseDumpType": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + }, + "destinationGcsFolder": { + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "Federation": { + "description": "Represents a federation of multiple backend metastores.", + "id": "Federation", + "properties": { + "backendMetastores": { + "additionalProperties": { + "$ref": "BackendMetastore" + }, + "description": "A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.", + "type": "object" + }, + "createTime": { + "description": "Output only. The time when the metastore federation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endpointUri": { + "description": "Output only. The federation endpoint.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore federation.", + "type": "object" + }, + "name": { + "description": "Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the federation.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "The state of the metastore federation is unknown.", + "The metastore federation is in the process of being created.", + "The metastore federation is running and ready to serve queries.", + "The metastore federation is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore federation is undergoing deletion. It cannot be used.", + "The metastore federation has encountered an error and cannot be used. The metastore federation should be deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore federation, if available.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore federation.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore federation was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "version": { + "description": "Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.", + "type": "string" + } + }, + "type": "object" + }, + "HiveMetastoreConfig": { + "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.", + "id": "HiveMetastoreConfig", + "properties": { + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.", + "type": "object" + }, + "kerberosConfig": { + "$ref": "KerberosConfig", + "description": "Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (hive_metastore_config.kerberos_config) in the request's update_mask while omitting this field from the request's service." + }, + "version": { + "description": "Immutable. The Hive metastore schema version.", + "type": "string" + } + }, + "type": "object" + }, + "HiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "HiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "KerberosConfig": { + "description": "Configuration information for a Kerberos principal.", + "id": "KerberosConfig", + "properties": { + "keytab": { + "$ref": "Secret", + "description": "A Kerberos keytab file that can be used to authenticate a service principal with a Kerberos Key Distribution Center (KDC)." + }, + "krb5ConfigGcsUri": { + "description": "A Cloud Storage URI that specifies the path to a krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the file does not need to be named krb5.conf explicitly.", + "type": "string" + }, + "principal": { + "description": "A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format.", + "type": "string" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "Response message for DataprocMetastore.ListBackups.", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "The backups of the specified service.", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListFederationsResponse": { + "description": "Response message for ListFederations", + "id": "ListFederationsResponse", + "properties": { + "federations": { + "description": "The services in the specified location.", + "items": { + "$ref": "Federation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListMetadataImportsResponse": { + "description": "Response message for DataprocMetastore.ListMetadataImports.", + "id": "ListMetadataImportsResponse", + "properties": { + "metadataImports": { + "description": "The imports in the specified service.", + "items": { + "$ref": "MetadataImport" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListServicesResponse": { + "description": "Response message for DataprocMetastore.ListServices.", + "id": "ListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "services": { + "description": "The services in the specified location.", + "items": { + "$ref": "Service" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"} ", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + } + }, + "type": "object" + }, + "LocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "LocationMetadata", + "properties": { + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "HiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "MaintenanceWindow": { + "description": "Maintenance window. This specifies when Dataproc Metastore may perform system maintenance operation to the service.", + "id": "MaintenanceWindow", + "properties": { + "dayOfWeek": { + "description": "The day of week, when the window starts.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "hourOfDay": { + "description": "The hour of day (0-23) when the window starts.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "MetadataExport": { + "description": "The details of a metadata export operation.", + "id": "MetadataExport", + "properties": { + "databaseDumpType": { + "description": "Output only. The type of the database dump.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "readOnly": true, + "type": "string" + }, + "destinationGcsUri": { + "description": "Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated.", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the export ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the export started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the export.", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ], + "enumDescriptions": [ + "The state of the metadata export is unknown.", + "The metadata export is running.", + "The metadata export completed successfully.", + "The metadata export failed.", + "The metadata export is cancelled." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MetadataImport": { + "description": "A metastore resource that imports metadata.", + "id": "MetadataImport", + "properties": { + "createTime": { + "description": "Output only. The time when the metadata import was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseDump": { + "$ref": "DatabaseDump", + "description": "Immutable. A database dump from a pre-existing metastore's database." + }, + "description": { + "description": "The description of the metadata import.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the metadata import finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the metadata import.", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "SUCCEEDED", + "UPDATING", + "FAILED" + ], + "enumDescriptions": [ + "The state of the metadata import is unknown.", + "The metadata import is running.", + "The metadata import completed successfully.", + "The metadata import is being updated.", + "The metadata import failed, and attempted metadata changes were rolled back." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metadata import was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MetadataManagementActivity": { + "description": "The metadata management activities of the metastore service.", + "id": "MetadataManagementActivity", + "properties": { + "metadataExports": { + "description": "Output only. The latest metadata exports of the metastore service.", + "items": { + "$ref": "MetadataExport" + }, + "readOnly": true, + "type": "array" + }, + "restores": { + "description": "Output only. The latest restores of the metastore service.", + "items": { + "$ref": "Restore" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Network configuration for the Dataproc Metastore service.", + "id": "NetworkConfig", + "properties": { + "consumers": { + "description": "Immutable. The consumer-side network configuration for the Dataproc Metastore instance.", + "items": { + "$ref": "Consumer" + }, + "type": "array" + } + }, + "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 response of the operation in case of success. 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" + }, + "OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).JSON example: { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } YAML example: bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of members, or principals, with a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one principal.The bindings in a Policy can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the bindings grant 50 different roles to user:alice@example.com, and not to any other principal, then you can add another 1,450 principals to the bindings in the Policy.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Restore": { + "description": "The details of a metadata restore operation.", + "id": "Restore", + "properties": { + "backup": { + "description": "Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "readOnly": true, + "type": "string" + }, + "details": { + "description": "Output only. The restore details containing the revision of the service to be restored to, in format of JSON.", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the restore ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the restore started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the restore.", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ], + "enumDescriptions": [ + "The state of the metadata restore is unknown.", + "The metadata restore is running.", + "The metadata restore completed successfully.", + "The metadata restore failed.", + "The metadata restore is cancelled." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. The type of restore.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RestoreServiceRequest": { + "description": "Request message for DataprocMetastore.Restore.", + "id": "RestoreServiceRequest", + "properties": { + "backup": { + "description": "Required. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + }, + "restoreType": { + "description": "Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "type": "string" + } + }, + "type": "object" + }, + "Secret": { + "description": "A securely stored value.", + "id": "Secret", + "properties": { + "cloudSecret": { + "description": "The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}.", + "type": "string" + } + }, + "type": "object" + }, + "Service": { + "description": "A managed metastore service that serves metadata queries.", + "id": "Service", + "properties": { + "artifactGcsUri": { + "description": "Output only. A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the metastore service was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "databaseType": { + "description": "Immutable. The database type that the Metastore service stores its data.", + "enum": [ + "DATABASE_TYPE_UNSPECIFIED", + "MYSQL", + "SPANNER" + ], + "enumDescriptions": [ + "The DATABASE_TYPE is not set.", + "MySQL is used to persist the metastore data.", + "Spanner is used to persist the metastore data." + ], + "type": "string" + }, + "encryptionConfig": { + "$ref": "EncryptionConfig", + "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated." + }, + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "hiveMetastoreConfig": { + "$ref": "HiveMetastoreConfig", + "description": "Configuration information specific to running Hive metastore software as the metastore service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore service.", + "type": "object" + }, + "maintenanceWindow": { + "$ref": "MaintenanceWindow", + "description": "The one hour maintenance window of the metastore service. This specifies when the service can be restarted for maintenance purposes in UTC time. Maintenance window is not needed for services with the SPANNER database type." + }, + "metadataManagementActivity": { + "$ref": "MetadataManagementActivity", + "description": "Output only. The metadata management activities of the metastore service.", + "readOnly": true + }, + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "type": "string" + }, + "network": { + "description": "Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.", + "type": "string" + }, + "networkConfig": { + "$ref": "NetworkConfig", + "description": "The configuration specifying the network settings for the Dataproc Metastore service." + }, + "port": { + "description": "The TCP port at which the metastore service is reached. Default: 9083.", + "format": "int32", + "type": "integer" + }, + "releaseChannel": { + "description": "Immutable. The release channel of the service. If unspecified, defaults to STABLE.", + "enum": [ + "RELEASE_CHANNEL_UNSPECIFIED", + "CANARY", + "STABLE" + ], + "enumDescriptions": [ + "Release channel is not specified.", + "The CANARY release channel contains the newest features, which may be unstable and subject to unresolved issues with no known workarounds. Services using the CANARY release channel are not subject to any SLAs.", + "The STABLE release channel contains features that are considered stable and have been validated for production use." + ], + "type": "string" + }, + "state": { + "description": "Output only. The current state of the metastore service.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "UPDATING", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "The state of the metastore service is unknown.", + "The metastore service is in the process of being created.", + "The metastore service is running and ready to serve queries.", + "The metastore service is entering suspension. Its query-serving availability may cease unexpectedly.", + "The metastore service is suspended and unable to serve queries.", + "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore service is undergoing deletion. It cannot be used.", + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore service, if available.", + "readOnly": true, + "type": "string" + }, + "telemetryConfig": { + "$ref": "TelemetryConfig", + "description": "The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON." + }, + "tier": { + "description": "The tier of the service.", + "enum": [ + "TIER_UNSPECIFIED", + "DEVELOPER", + "ENTERPRISE" + ], + "enumDescriptions": [ + "The tier is not set.", + "The developer tier provides limited scalability and no fault tolerance. Good for low-cost proof-of-concept.", + "The enterprise tier provides multi-zone high availability, and sufficient scalability for enterprise-level Dataproc Metastore workloads." + ], + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore service.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore service was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for SetIamPolicy method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:paths: \"bindings, etag\"", + "format": "google-fieldmask", + "type": "string" + } + }, + "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" + }, + "TelemetryConfig": { + "description": "Telemetry Configuration for the Dataproc Metastore service.", + "id": "TelemetryConfig", + "properties": { + "logFormat": { + "enum": [ + "LOG_FORMAT_UNSPECIFIED", + "LEGACY", + "JSON" + ], + "enumDescriptions": [ + "The LOG_FORMAT is not set.", + "Logging output uses the legacy textPayload format.", + "Logging output uses the jsonPayload format." + ], + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for TestIamPermissions method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the resource. Permissions with wildcards (such as * or storage.*) are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for TestIamPermissions method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of TestPermissionsRequest.permissions that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Dataproc Metastore API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go new file mode 100644 index 00000000000..c40df9c1cc7 --- /dev/null +++ b/metastore/v1/metastore-gen.go @@ -0,0 +1,7996 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package metastore provides access to the Dataproc Metastore API. +// +// For product documentation, see: https://cloud.google.com/dataproc-metastore/docs +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/metastore/v1" +// ... +// ctx := context.Background() +// metastoreService, err := metastore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package metastore // import "google.golang.org/api/metastore/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "metastore:v1" +const apiName = "metastore" +const apiVersion = "v1" +const basePath = "https://metastore.googleapis.com/" +const mtlsBasePath = "https://metastore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new APIService. +func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new APIService. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*APIService, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &APIService{client: client, BasePath: basePath} + s.Operations = NewOperationsService(s) + s.Projects = NewProjectsService(s) + return s, nil +} + +type APIService struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Operations *OperationsService + + Projects *ProjectsService +} + +func (s *APIService) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewOperationsService(s *APIService) *OperationsService { + rs := &OperationsService{s: s} + return rs +} + +type OperationsService struct { + s *APIService +} + +func NewProjectsService(s *APIService) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *APIService + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Federations = NewProjectsLocationsFederationsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Services = NewProjectsLocationsServicesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *APIService + + Federations *ProjectsLocationsFederationsService + + Operations *ProjectsLocationsOperationsService + + Services *ProjectsLocationsServicesService +} + +func NewProjectsLocationsFederationsService(s *APIService) *ProjectsLocationsFederationsService { + rs := &ProjectsLocationsFederationsService{s: s} + return rs +} + +type ProjectsLocationsFederationsService struct { + s *APIService +} + +func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *APIService +} + +func NewProjectsLocationsServicesService(s *APIService) *ProjectsLocationsServicesService { + rs := &ProjectsLocationsServicesService{s: s} + rs.Backups = NewProjectsLocationsServicesBackupsService(s) + rs.MetadataImports = NewProjectsLocationsServicesMetadataImportsService(s) + return rs +} + +type ProjectsLocationsServicesService struct { + s *APIService + + Backups *ProjectsLocationsServicesBackupsService + + MetadataImports *ProjectsLocationsServicesMetadataImportsService +} + +func NewProjectsLocationsServicesBackupsService(s *APIService) *ProjectsLocationsServicesBackupsService { + rs := &ProjectsLocationsServicesBackupsService{s: s} + return rs +} + +type ProjectsLocationsServicesBackupsService struct { + s *APIService +} + +func NewProjectsLocationsServicesMetadataImportsService(s *APIService) *ProjectsLocationsServicesMetadataImportsService { + rs := &ProjectsLocationsServicesMetadataImportsService{s: s} + return rs +} + +type ProjectsLocationsServicesMetadataImportsService struct { + s *APIService +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs.If there are AuditConfigs for both +// allServices and a specific service, the union of the two AuditConfigs +// is used for that service: the log_types specified in each AuditConfig +// are enabled, and the exempted_members in each AuditLogConfig are +// exempted.Example Policy with multiple AuditConfigs: { +// "audit_configs": [ { "service": "allServices", "audit_log_configs": [ +// { "log_type": "DATA_READ", "exempted_members": [ +// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// jose@example.com from DATA_READ logging, and aliya@example.com from +// DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, storage.googleapis.com, cloudsql.googleapis.com. + // allServices is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackendMetastore: Represents a backend metastore for the federation. +type BackendMetastore struct { + // MetastoreType: The type of the backend metastore. + // + // Possible values: + // "METASTORE_TYPE_UNSPECIFIED" - The metastore type is not set. + // "DATAPROC_METASTORE" - The backend metastore is Dataproc Metastore. + MetastoreType string `json:"metastoreType,omitempty"` + + // Name: The relative resource name of the metastore that is being + // federated. The formats of the relative resource names for the + // currently supported metastores are listed below: Dataplex: + // projects/{project_id}/locations/{location}/lakes/{lake_id} BigQuery: + // projects/{project_id} Dataproc Metastore: + // projects/{project_id}/locations/{location}/services/{service_id} + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MetastoreType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MetastoreType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BackendMetastore) MarshalJSON() ([]byte, error) { + type NoMethod BackendMetastore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Backup: The details of a backup resource. +type Backup struct { + // CreateTime: Output only. The time when the backup was started. + CreateTime string `json:"createTime,omitempty"` + + // Description: The description of the backup. + Description string `json:"description,omitempty"` + + // EndTime: Output only. The time when the backup finished creating. + EndTime string `json:"endTime,omitempty"` + + // Name: Immutable. The relative resource name of the backup, in the + // following + // form:projects/{project_number}/locations/{location_id}/services/{servi + // ce_id}/backups/{backup_id} + Name string `json:"name,omitempty"` + + // RestoringServices: Output only. Services that are restoring from the + // backup. + RestoringServices []string `json:"restoringServices,omitempty"` + + // ServiceRevision: Output only. The revision of the service at the time + // of backup. + ServiceRevision *Service `json:"serviceRevision,omitempty"` + + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "CREATING" - The backup is being created. + // "DELETING" - The backup is being deleted. + // "ACTIVE" - The backup is active and ready to use. + // "FAILED" - The backup failed. + // "RESTORING" - The backup is being restored. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates members, or principals, with a role. +type Binding struct { + // Condition: The condition that is associated with this binding.If the + // condition evaluates to true, then this binding applies to the current + // request.If the condition evaluates to false, then this binding does + // not apply to the current request. However, a different role binding + // might grant the same role to one or more of the principals in this + // binding.To learn which resources support conditions in their IAM + // policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. members can have the following values: allUsers: A + // special identifier that represents anyone who is on the internet; + // with or without a Google account. allAuthenticatedUsers: A special + // identifier that represents anyone who is authenticated with a Google + // account or a service account. Does not include identities that come + // from external identity providers (IdPs) through identity federation. + // user:{emailid}: An email address that represents a specific Google + // account. For example, alice@example.com . serviceAccount:{emailid}: + // An email address that represents a Google service account. For + // example, my-other-app@appspot.gserviceaccount.com. + // serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, my-project.svc.id.goog[my-namespace/my-kubernetes-sa]. + // group:{emailid}: An email address that represents a Google group. For + // example, admins@example.com. deleted:user:{emailid}?uid={uniqueid}: + // An email address (plus unique identifier) representing a user that + // has been recently deleted. For example, + // alice@example.com?uid=123456789012345678901. If the user is + // recovered, this value reverts to user:{emailid} and the recovered + // user retains the role in the binding. + // deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. + // If the service account is undeleted, this value reverts to + // serviceAccount:{emailid} and the undeleted service account retains + // the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An + // email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // admins@example.com?uid=123456789012345678901. If the group is + // recovered, this value reverts to group:{emailid} and the recovered + // group retains the role in the binding. domain:{domain}: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, google.com or example.com. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of members, or principals. + // For example, roles/viewer, roles/editor, or roles/owner. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Consumer: Contains information of the customer's network +// configurations. +type Consumer struct { + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + + // Subnetwork: Immutable. The subnetwork of the customer project from + // which an IP address is reserved and used as the Dataproc Metastore + // service's endpoint. It is accessible to hosts in the subnet and to + // all hosts in a subnet in the same region and same network. There must + // be at least one IP address available in the subnet's primary range. + // The subnet is specified in the following + // form:`projects/{project_number}/regions/{region_id}/subnetworks/{subne + // twork_id} + Subnetwork string `json:"subnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndpointUri") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Consumer) MarshalJSON() ([]byte, error) { + type NoMethod Consumer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DatabaseDump: A specification of the location of and metadata about a +// database dump from a relational database management system. +type DatabaseDump struct { + // DatabaseType: The type of the database. + // + // Possible values: + // "DATABASE_TYPE_UNSPECIFIED" - The type of the source database is + // unknown. + // "MYSQL" - The type of the source database is MySQL. + DatabaseType string `json:"databaseType,omitempty"` + + // GcsUri: A Cloud Storage object or folder URI that specifies the + // source from which to import metadata. It must begin with gs://. + GcsUri string `json:"gcsUri,omitempty"` + + // SourceDatabase: The name of the source database. + SourceDatabase string `json:"sourceDatabase,omitempty"` + + // Type: Optional. The type of the database dump. If unspecified, + // defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatabaseType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DatabaseDump) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseDump + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// EncryptionConfig: Encryption settings for the service. +type EncryptionConfig struct { + // KmsKey: The fully qualified customer provided Cloud KMS key name to + // use for customer data encryption, in the following + // form:projects/{project_number}/locations/{location_id}/keyRings/{key_r + // ing_id}/cryptoKeys/{crypto_key_id}. + KmsKey string `json:"kmsKey,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KmsKey") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EncryptionConfig) MarshalJSON() ([]byte, error) { + type NoMethod EncryptionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExportMetadataRequest: Request message for +// DataprocMetastore.ExportMetadata. +type ExportMetadataRequest struct { + // DatabaseDumpType: Optional. The type of the database dump. If + // unspecified, defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + + // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format + // gs:///. A sub-folder containing exported files will be created below + // it. + DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"` + + // RequestId: Optional. A request ID. Specify a unique request ID to + // allow the server to ignore the request if it has completed. The + // server will ignore subsequent requests that provide a duplicate + // request ID for at least 60 minutes after the first request.For + // example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to + // prevent the creation of duplicate commitments.The request ID must be + // a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatabaseDumpType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ExportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportMetadataRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec.Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Federation: Represents a federation of multiple backend metastores. +type Federation struct { + // BackendMetastores: A map from BackendMetastore rank to + // BackendMetastores from which the federation service serves metadata + // at query time. The map key represents the order in which + // BackendMetastores should be evaluated to resolve database names at + // query time and should be greater than or equal to zero. A + // BackendMetastore with a lower number will be evaluated before a + // BackendMetastore with a higher number. + BackendMetastores map[string]BackendMetastore `json:"backendMetastores,omitempty"` + + // CreateTime: Output only. The time when the metastore federation was + // created. + CreateTime string `json:"createTime,omitempty"` + + // EndpointUri: Output only. The federation endpoint. + EndpointUri string `json:"endpointUri,omitempty"` + + // Labels: User-defined labels for the metastore federation. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. The relative resource name of the federation, of the + // form: + // projects/{project_number}/locations/{location_id}/federations/{federat + // ion_id}`. + Name string `json:"name,omitempty"` + + // State: Output only. The current state of the federation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore federation is + // unknown. + // "CREATING" - The metastore federation is in the process of being + // created. + // "ACTIVE" - The metastore federation is running and ready to serve + // queries. + // "UPDATING" - The metastore federation is being updated. It remains + // usable but cannot accept additional update requests or be deleted at + // this time. + // "DELETING" - The metastore federation is undergoing deletion. It + // cannot be used. + // "ERROR" - The metastore federation has encountered an error and + // cannot be used. The metastore federation should be deleted. + State string `json:"state,omitempty"` + + // StateMessage: Output only. Additional information about the current + // state of the metastore federation, if available. + StateMessage string `json:"stateMessage,omitempty"` + + // Uid: Output only. The globally unique resource identifier of the + // metastore federation. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the metastore federation was + // last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // Version: Immutable. The Apache Hive metastore version of the + // federation. All backend metastore versions must be compatible with + // the federation version. + Version string `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BackendMetastores") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackendMetastores") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Federation) MarshalJSON() ([]byte, error) { + type NoMethod Federation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HiveMetastoreConfig: Specifies configuration information specific to +// running Hive metastore software as the metastore service. +type HiveMetastoreConfig struct { + // ConfigOverrides: A mapping of Hive metastore configuration key-value + // pairs to apply to the Hive metastore (configured in hive-site.xml). + // The mappings override system defaults (some keys cannot be + // overridden). These overrides are also applied to auxiliary versions + // and can be further customized in the auxiliary version's + // AuxiliaryVersionConfig. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + + // KerberosConfig: Information used to configure the Hive metastore + // service as a service principal in a Kerberos realm. To disable + // Kerberos, use the UpdateService method and specify this field's path + // (hive_metastore_config.kerberos_config) in the request's update_mask + // while omitting this field from the request's service. + KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"` + + // Version: Immutable. The Hive metastore schema version. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConfigOverrides") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HiveMetastoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod HiveMetastoreConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HiveMetastoreVersion: A specification of a supported version of the +// Hive Metastore software. +type HiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a + // metastore service is created with a HiveMetastoreConfig that omits + // the version. + IsDefault bool `json:"isDefault,omitempty"` + + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IsDefault") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod HiveMetastoreVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// KerberosConfig: Configuration information for a Kerberos principal. +type KerberosConfig struct { + // Keytab: A Kerberos keytab file that can be used to authenticate a + // service principal with a Kerberos Key Distribution Center (KDC). + Keytab *Secret `json:"keytab,omitempty"` + + // Krb5ConfigGcsUri: A Cloud Storage URI that specifies the path to a + // krb5.conf file. It is of the form + // gs://{bucket_name}/path/to/krb5.conf, although the file does not need + // to be named krb5.conf explicitly. + Krb5ConfigGcsUri string `json:"krb5ConfigGcsUri,omitempty"` + + // Principal: A Kerberos principal that exists in the both the keytab + // the KDC to authenticate as. A typical principal is of the form + // primary/instance@REALM, but there is no exact format. + Principal string `json:"principal,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Keytab") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Keytab") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *KerberosConfig) MarshalJSON() ([]byte, error) { + type NoMethod KerberosConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: Response message for +// DataprocMetastore.ListBackups. +type ListBackupsResponse struct { + // Backups: The backups of the specified service. + Backups []*Backup `json:"backups,omitempty"` + + // NextPageToken: A token that 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"` + + // 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. "Backups") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Backups") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListFederationsResponse: Response message for ListFederations +type ListFederationsResponse struct { + // Federations: The services in the specified location. + Federations []*Federation `json:"federations,omitempty"` + + // NextPageToken: A token that 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"` + + // 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. "Federations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Federations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListFederationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListFederationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListMetadataImportsResponse: Response message for +// DataprocMetastore.ListMetadataImports. +type ListMetadataImportsResponse struct { + // MetadataImports: The imports in the specified service. + MetadataImports []*MetadataImport `json:"metadataImports,omitempty"` + + // NextPageToken: A token that 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"` + + // 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. "MetadataImports") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MetadataImports") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListMetadataImportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMetadataImportsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListServicesResponse: Response message for +// DataprocMetastore.ListServices. +type ListServicesResponse struct { + // NextPageToken: A token that 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"` + + // Services: The services in the specified location. + Services []*Service `json:"services,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServicesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LocationMetadata: Metadata about the service in a location. +type LocationMetadata struct { + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that + // can be used when creating a new metastore service in this location. + // The server guarantees that exactly one HiveMetastoreVersion in the + // list will set is_default. + SupportedHiveMetastoreVersions []*HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SupportedHiveMetastoreVersions") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "SupportedHiveMetastoreVersions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LocationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MaintenanceWindow: Maintenance window. This specifies when Dataproc +// Metastore may perform system maintenance operation to the service. +type MaintenanceWindow struct { + // DayOfWeek: The day of week, when the window starts. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + DayOfWeek string `json:"dayOfWeek,omitempty"` + + // HourOfDay: The hour of day (0-23) when the window starts. + HourOfDay int64 `json:"hourOfDay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DayOfWeek") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DayOfWeek") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MetadataExport: The details of a metadata export operation. +type MetadataExport struct { + // DatabaseDumpType: Output only. The type of the database dump. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + + // DestinationGcsUri: Output only. A Cloud Storage URI of a folder that + // metadata are exported to, in the form of gs:////, where is + // automatically generated. + DestinationGcsUri string `json:"destinationGcsUri,omitempty"` + + // EndTime: Output only. The time when the export ended. + EndTime string `json:"endTime,omitempty"` + + // StartTime: Output only. The time when the export started. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the export. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metadata export is unknown. + // "RUNNING" - The metadata export is running. + // "SUCCEEDED" - The metadata export completed successfully. + // "FAILED" - The metadata export failed. + // "CANCELLED" - The metadata export is cancelled. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatabaseDumpType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MetadataExport) MarshalJSON() ([]byte, error) { + type NoMethod MetadataExport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MetadataImport: A metastore resource that imports metadata. +type MetadataImport struct { + // CreateTime: Output only. The time when the metadata import was + // started. + CreateTime string `json:"createTime,omitempty"` + + // DatabaseDump: Immutable. A database dump from a pre-existing + // metastore's database. + DatabaseDump *DatabaseDump `json:"databaseDump,omitempty"` + + // Description: The description of the metadata import. + Description string `json:"description,omitempty"` + + // EndTime: Output only. The time when the metadata import finished. + EndTime string `json:"endTime,omitempty"` + + // Name: Immutable. The relative resource name of the metadata import, + // of the + // form:projects/{project_number}/locations/{location_id}/services/{servi + // ce_id}/metadataImports/{metadata_import_id}. + Name string `json:"name,omitempty"` + + // State: Output only. The current state of the metadata import. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metadata import is unknown. + // "RUNNING" - The metadata import is running. + // "SUCCEEDED" - The metadata import completed successfully. + // "UPDATING" - The metadata import is being updated. + // "FAILED" - The metadata import failed, and attempted metadata + // changes were rolled back. + State string `json:"state,omitempty"` + + // UpdateTime: Output only. The time when the metadata import was last + // 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. "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 *MetadataImport) MarshalJSON() ([]byte, error) { + type NoMethod MetadataImport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MetadataManagementActivity: The metadata management activities of the +// metastore service. +type MetadataManagementActivity struct { + // MetadataExports: Output only. The latest metadata exports of the + // metastore service. + MetadataExports []*MetadataExport `json:"metadataExports,omitempty"` + + // Restores: Output only. The latest restores of the metastore service. + Restores []*Restore `json:"restores,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MetadataExports") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MetadataExports") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MetadataManagementActivity) MarshalJSON() ([]byte, error) { + type NoMethod MetadataManagementActivity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConfig: Network configuration for the Dataproc Metastore +// service. +type NetworkConfig struct { + // Consumers: Immutable. The consumer-side network configuration for the + // Dataproc Metastore instance. + Consumers []*Consumer `json:"consumers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Consumers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Consumers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig + 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 response of the operation in case of success. 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) +} + +// OperationMetadata: Represents the metadata of a long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources.A Policy is a +// collection of bindings. A binding binds one or more members, or +// principals, to a single role. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// role is a named list of permissions; each role can be an IAM +// predefined role or a user-created custom role.For some types of +// Google Cloud resources, a binding can also specify a condition, which +// is a logical expression that allows access to a resource only if the +// expression evaluates to true. A condition can add constraints based +// on attributes of the request, the resource, or both. To learn which +// resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies).JSON +// example: { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } YAML example: bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of members, or principals, with a role. + // Optionally, may specify a condition that determines how and when the + // bindings are applied. Each of the bindings must contain at least one + // principal.The bindings in a Policy can refer to up to 1,500 + // principals; up to 250 of these principals can be Google groups. Each + // occurrence of a principal counts towards these limits. For example, + // if the bindings grant 50 different roles to user:alice@example.com, + // and not to any other principal, then you can add another 1,450 + // principals to the bindings in the Policy. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: etag is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the etag in + // the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An etag is returned in the response to + // getIamPolicy, and systems are expected to put that etag in the + // request to setIamPolicy to ensure that their change will be applied + // to the same version of the policy.Important: If you use IAM + // Conditions, you must include the etag field whenever you call + // setIamPolicy. If you omit this field, then IAM allows you to + // overwrite a version 3 policy with a version 1 policy, and all of the + // conditions in the version 3 policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy.Valid values are 0, 1, + // and 3. Requests that specify an invalid value are rejected.Any + // operation that affects conditional role bindings must specify version + // 3. This requirement applies to the following operations: Getting a + // policy that includes a conditional role binding Adding a conditional + // role binding to a policy Changing a conditional role binding in a + // policy Removing any role binding, with or without a condition, from a + // policy that includes conditionsImportant: If you use IAM Conditions, + // you must include the etag field whenever you call setIamPolicy. If + // you omit this field, then IAM allows you to overwrite a version 3 + // policy with a version 1 policy, and all of the conditions in the + // version 3 policy are lost.If a policy does not include any + // conditions, operations on that policy may specify any valid version + // or leave the field unset.To learn which resources support conditions + // in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Restore: The details of a metadata restore operation. +type Restore struct { + // Backup: Output only. The relative resource name of the metastore + // service backup to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_i + // d}/backups/{backup_id}. + Backup string `json:"backup,omitempty"` + + // Details: Output only. The restore details containing the revision of + // the service to be restored to, in format of JSON. + Details string `json:"details,omitempty"` + + // EndTime: Output only. The time when the restore ended. + EndTime string `json:"endTime,omitempty"` + + // StartTime: Output only. The time when the restore started. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the restore. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metadata restore is unknown. + // "RUNNING" - The metadata restore is running. + // "SUCCEEDED" - The metadata restore completed successfully. + // "FAILED" - The metadata restore failed. + // "CANCELLED" - The metadata restore is cancelled. + State string `json:"state,omitempty"` + + // Type: Output only. The type of restore. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Backup") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Restore) MarshalJSON() ([]byte, error) { + type NoMethod Restore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RestoreServiceRequest: Request message for DataprocMetastore.Restore. +type RestoreServiceRequest struct { + // Backup: Required. The relative resource name of the metastore service + // backup to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_i + // d}/backups/{backup_id}. + Backup string `json:"backup,omitempty"` + + // RequestId: Optional. A request ID. Specify a unique request ID to + // allow the server to ignore the request if it has completed. The + // server will ignore subsequent requests that provide a duplicate + // request ID for at least 60 minutes after the first request.For + // example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to + // prevent the creation of duplicate commitments.The request ID must be + // a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + + // RestoreType: Optional. The type of restore. If unspecified, defaults + // to METADATA_ONLY. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + RestoreType string `json:"restoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Backup") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RestoreServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreServiceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Secret: A securely stored value. +type Secret struct { + // CloudSecret: The relative resource name of a Secret Manager secret + // version, in the following + // form:projects/{project_number}/secrets/{secret_id}/versions/{version_i + // d}. + CloudSecret string `json:"cloudSecret,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CloudSecret") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CloudSecret") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Secret) MarshalJSON() ([]byte, error) { + type NoMethod Secret + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Service: A managed metastore service that serves metadata queries. +type Service struct { + // ArtifactGcsUri: Output only. A Cloud Storage URI (starting with + // gs://) that specifies where artifacts related to the metastore + // service are stored. + ArtifactGcsUri string `json:"artifactGcsUri,omitempty"` + + // CreateTime: Output only. The time when the metastore service was + // created. + CreateTime string `json:"createTime,omitempty"` + + // DatabaseType: Immutable. The database type that the Metastore service + // stores its data. + // + // Possible values: + // "DATABASE_TYPE_UNSPECIFIED" - The DATABASE_TYPE is not set. + // "MYSQL" - MySQL is used to persist the metastore data. + // "SPANNER" - Spanner is used to persist the metastore data. + DatabaseType string `json:"databaseType,omitempty"` + + // EncryptionConfig: Immutable. Information used to configure the + // Dataproc Metastore service to encrypt customer data at rest. Cannot + // be updated. + EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + + // HiveMetastoreConfig: Configuration information specific to running + // Hive metastore software as the metastore service. + HiveMetastoreConfig *HiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"` + + // Labels: User-defined labels for the metastore service. + Labels map[string]string `json:"labels,omitempty"` + + // MaintenanceWindow: The one hour maintenance window of the metastore + // service. This specifies when the service can be restarted for + // maintenance purposes in UTC time. Maintenance window is not needed + // for services with the SPANNER database type. + MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + + // MetadataManagementActivity: Output only. The metadata management + // activities of the metastore service. + MetadataManagementActivity *MetadataManagementActivity `json:"metadataManagementActivity,omitempty"` + + // Name: Immutable. The relative resource name of the metastore service, + // in the following + // format:projects/{project_number}/locations/{location_id}/services/{ser + // vice_id}. + Name string `json:"name,omitempty"` + + // Network: Immutable. The relative resource name of the VPC network on + // which the instance can be accessed. It is specified in the following + // form:projects/{project_number}/global/networks/{network_id}. + Network string `json:"network,omitempty"` + + // NetworkConfig: The configuration specifying the network settings for + // the Dataproc Metastore service. + NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + + // Port: The TCP port at which the metastore service is reached. + // Default: 9083. + Port int64 `json:"port,omitempty"` + + // ReleaseChannel: Immutable. The release channel of the service. If + // unspecified, defaults to STABLE. + // + // Possible values: + // "RELEASE_CHANNEL_UNSPECIFIED" - Release channel is not specified. + // "CANARY" - The CANARY release channel contains the newest features, + // which may be unstable and subject to unresolved issues with no known + // workarounds. Services using the CANARY release channel are not + // subject to any SLAs. + // "STABLE" - The STABLE release channel contains features that are + // considered stable and have been validated for production use. + ReleaseChannel string `json:"releaseChannel,omitempty"` + + // State: Output only. The current state of the metastore service. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore service is + // unknown. + // "CREATING" - The metastore service is in the process of being + // created. + // "ACTIVE" - The metastore service is running and ready to serve + // queries. + // "SUSPENDING" - The metastore service is entering suspension. Its + // query-serving availability may cease unexpectedly. + // "SUSPENDED" - The metastore service is suspended and unable to + // serve queries. + // "UPDATING" - The metastore service is being updated. It remains + // usable but cannot accept additional update requests or be deleted at + // this time. + // "DELETING" - The metastore service is undergoing deletion. It + // cannot be used. + // "ERROR" - The metastore service has encountered an error and cannot + // be used. The metastore service should be deleted. + State string `json:"state,omitempty"` + + // StateMessage: Output only. Additional information about the current + // state of the metastore service, if available. + StateMessage string `json:"stateMessage,omitempty"` + + // TelemetryConfig: The configuration specifying telemetry settings for + // the Dataproc Metastore service. If unspecified defaults to JSON. + TelemetryConfig *TelemetryConfig `json:"telemetryConfig,omitempty"` + + // Tier: The tier of the service. + // + // Possible values: + // "TIER_UNSPECIFIED" - The tier is not set. + // "DEVELOPER" - The developer tier provides limited scalability and + // no fault tolerance. Good for low-cost proof-of-concept. + // "ENTERPRISE" - The enterprise tier provides multi-zone high + // availability, and sufficient scalability for enterprise-level + // Dataproc Metastore workloads. + Tier string `json:"tier,omitempty"` + + // Uid: Output only. The globally unique resource identifier of the + // metastore service. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the metastore service was last + // 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. "ArtifactGcsUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ArtifactGcsUri") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Service) MarshalJSON() ([]byte, error) { + type NoMethod Service + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for SetIamPolicy method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the resource. + // The size of the policy is limited to a few 10s of KB. An empty policy + // is a valid policy but certain Google Cloud services (such as + // Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used:paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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) +} + +// TelemetryConfig: Telemetry Configuration for the Dataproc Metastore +// service. +type TelemetryConfig struct { + // Possible values: + // "LOG_FORMAT_UNSPECIFIED" - The LOG_FORMAT is not set. + // "LEGACY" - Logging output uses the legacy textPayload format. + // "JSON" - Logging output uses the jsonPayload format. + LogFormat string `json:"logFormat,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogFormat") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogFormat") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TelemetryConfig) MarshalJSON() ([]byte, error) { + type NoMethod TelemetryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for TestIamPermissions +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the resource. + // Permissions with wildcards (such as * or storage.*) are not allowed. + // For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for TestIamPermissions +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of TestPermissionsRequest.permissions that the + // caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "metastore.operations.cancel": + +type OperationsCancelCall struct { + s *APIService + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns google.rpc.Code.UNIMPLEMENTED. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. +// +// - name: The name of the operation resource to be cancelled. +func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { + c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { + 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 *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + // "flatPath": "v1/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "metastore.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the next_page_token field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "metastore.projects.locations.federations.create": + +type ProjectsLocationsFederationsCreateCall struct { + s *APIService + parent string + federation *Federation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore federation in a project and location. +// +// - parent: The relative resource name of the location in which to +// create a federation service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsFederationsService) Create(parent string, federation *Federation) *ProjectsLocationsFederationsCreateCall { + c := &ProjectsLocationsFederationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.federation = federation + return c +} + +// FederationId sets the optional parameter "federationId": Required. +// The ID of the metastore federation, which is used as the final +// component of the metastore federation's name.This value must be +// between 2 and 63 characters long inclusive, begin with a letter, end +// with a letter or number, and consist of alpha-numeric ASCII +// characters or hyphens. +func (c *ProjectsLocationsFederationsCreateCall) FederationId(federationId string) *ProjectsLocationsFederationsCreateCall { + c.urlParams_.Set("federationId", federationId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsFederationsCreateCall) RequestId(requestId string) *ProjectsLocationsFederationsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFederationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsCreateCall { + 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 *ProjectsLocationsFederationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFederationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsCreateCall) 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.federation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/federations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.federations.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 *ProjectsLocationsFederationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a metastore federation in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.federations.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "federationId": { + // "description": "Required. The ID of the metastore federation, which is used as the final component of the metastore federation's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The relative resource name of the location in which to create a federation service, in the following form:projects/{project_number}/locations/{location_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/federations", + // "request": { + // "$ref": "Federation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.federations.delete": + +type ProjectsLocationsFederationsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single federation. +// +// - name: The relative resource name of the metastore federation to +// delete, in the following +// form:projects/{project_number}/locations/{location_id}/federations/{ +// federation_id}. +func (r *ProjectsLocationsFederationsService) Delete(name string) *ProjectsLocationsFederationsDeleteCall { + c := &ProjectsLocationsFederationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsFederationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFederationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFederationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsDeleteCall { + 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 *ProjectsLocationsFederationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFederationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsDeleteCall) 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 "metastore.projects.locations.federations.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 *ProjectsLocationsFederationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single federation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}", + // "httpMethod": "DELETE", + // "id": "metastore.projects.locations.federations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the metastore federation to delete, in the following form:projects/{project_number}/locations/{location_id}/federations/{federation_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.federations.get": + +type ProjectsLocationsFederationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single federation. +// +// - name: The relative resource name of the metastore federation to +// retrieve, in the following +// form:projects/{project_number}/locations/{location_id}/federations/{ +// federation_id}. +func (r *ProjectsLocationsFederationsService) Get(name string) *ProjectsLocationsFederationsGetCall { + c := &ProjectsLocationsFederationsGetCall{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 *ProjectsLocationsFederationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetCall { + 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 *ProjectsLocationsFederationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetCall { + 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 *ProjectsLocationsFederationsGetCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsGetCall) 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 "metastore.projects.locations.federations.get" call. +// Exactly one of *Federation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Federation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFederationsGetCall) Do(opts ...googleapi.CallOption) (*Federation, error) { + gensupport.SetOptions(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 := &Federation{ + ServerResponse: googleapi.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 details of a single federation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.federations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the metastore federation to retrieve, in the following form:projects/{project_number}/locations/{location_id}/federations/{federation_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Federation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.federations.getIamPolicy": + +type ProjectsLocationsFederationsGetIamPolicyCall struct { + s *APIService + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsFederationsService) GetIamPolicy(resource string) *ProjectsLocationsFederationsGetIamPolicyCall { + c := &ProjectsLocationsFederationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy.Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected.Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset.The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1.To learn which +// resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsFederationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFederationsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFederationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetIamPolicyCall { + 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 *ProjectsLocationsFederationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetIamPolicyCall { + 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 *ProjectsLocationsFederationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.federations.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsFederationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.federations.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.federations.list": + +type ProjectsLocationsFederationsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists federations in a project and location. +// +// - parent: The relative resource name of the location of metastore +// federations to list, in the following form: +// projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsFederationsService) List(parent string) *ProjectsLocationsFederationsListCall { + c := &ProjectsLocationsFederationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to +// list results. +func (c *ProjectsLocationsFederationsListCall) Filter(filter string) *ProjectsLocationsFederationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering +// of results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). +// If not specified, the results will be sorted in the default order. +func (c *ProjectsLocationsFederationsListCall) OrderBy(orderBy string) *ProjectsLocationsFederationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of federations to return. The response may contain less than the +// maximum number. If unspecified, no more than 500 services are +// returned. The maximum value is 1000; values above 1000 are changed to +// 1000. +func (c *ProjectsLocationsFederationsListCall) PageSize(pageSize int64) *ProjectsLocationsFederationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous ListFederationServices call. Provide this +// token to retrieve the subsequent page.To retrieve the first page, +// supply an empty page token.When paginating, other parameters provided +// to ListFederationServices must match the call that provided the page +// token. +func (c *ProjectsLocationsFederationsListCall) PageToken(pageToken string) *ProjectsLocationsFederationsListCall { + 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 *ProjectsLocationsFederationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsListCall { + 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 *ProjectsLocationsFederationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsListCall { + 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 *ProjectsLocationsFederationsListCall) Context(ctx context.Context) *ProjectsLocationsFederationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/federations") + 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 "metastore.projects.locations.federations.list" call. +// Exactly one of *ListFederationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListFederationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFederationsListCall) Do(opts ...googleapi.CallOption) (*ListFederationsResponse, error) { + gensupport.SetOptions(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 := &ListFederationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists federations in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.federations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter to apply to list results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of federations to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous ListFederationServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to ListFederationServices must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The relative resource name of the location of metastore federations to list, in the following form: projects/{project_number}/locations/{location_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/federations", + // "response": { + // "$ref": "ListFederationsResponse" + // }, + // "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 *ProjectsLocationsFederationsListCall) Pages(ctx context.Context, f func(*ListFederationsResponse) 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 "metastore.projects.locations.federations.patch": + +type ProjectsLocationsFederationsPatchCall struct { + s *APIService + name string + federation *Federation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the fields of a federation. +// +// - name: Immutable. The relative resource name of the federation, of +// the form: +// projects/{project_number}/locations/{location_id}/federations/{feder +// ation_id}`. +func (r *ProjectsLocationsFederationsService) Patch(name string, federation *Federation) *ProjectsLocationsFederationsPatchCall { + c := &ProjectsLocationsFederationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.federation = federation + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsFederationsPatchCall) RequestId(requestId string) *ProjectsLocationsFederationsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// field mask used to specify the fields to be overwritten in the +// metastore federation resource by the update. Fields specified in the +// update_mask are relative to the resource (not to the full request). A +// field is overwritten if it is in the mask. +func (c *ProjectsLocationsFederationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFederationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFederationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsPatchCall { + 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 *ProjectsLocationsFederationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFederationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsPatchCall) 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.federation) + 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 "metastore.projects.locations.federations.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 *ProjectsLocationsFederationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the fields of a federation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}", + // "httpMethod": "PATCH", + // "id": "metastore.projects.locations.federations.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A field mask used to specify the fields to be overwritten in the metastore federation resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Federation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.federations.setIamPolicy": + +type ProjectsLocationsFederationsSetIamPolicyCall struct { + s *APIService + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy.Can return NOT_FOUND, +// INVALID_ARGUMENT, and PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsFederationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFederationsSetIamPolicyCall { + c := &ProjectsLocationsFederationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFederationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsSetIamPolicyCall { + 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 *ProjectsLocationsFederationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.federations.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsFederationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.federations.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.federations.testIamPermissions": + +type ProjectsLocationsFederationsTestIamPermissionsCall struct { + s *APIService + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a NOT_FOUND error.Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsFederationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFederationsTestIamPermissionsCall { + c := &ProjectsLocationsFederationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsTestIamPermissionsCall { + 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 *ProjectsLocationsFederationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFederationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFederationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.federations.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/federations/{federationsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.federations.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/federations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns google.rpc.Code.UNIMPLEMENTED. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + 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 "metastore.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "metastore.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *APIService + 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 *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + 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 "metastore.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + 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/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// UNIMPLEMENTED.NOTE: the name binding allows API services to override +// the binding to use different resource name schemes, such as +// users/*/operations. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + 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}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "metastore.projects.locations.services.create": + +type ProjectsLocationsServicesCreateCall struct { + s *APIService + parent string + service *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to +// create a metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, service *Service) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.service = service + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID +// of the metastore service, which is used as the final component of the +// metastore service's name.This value must be between 2 and 63 +// characters long inclusive, begin with a letter, end with a letter or +// number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + 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 *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a metastore service in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // }, + // "serviceId": { + // "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/services", + // "request": { + // "$ref": "Service" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.delete": + +type ProjectsLocationsServicesDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to +// delete, in the following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { + 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 *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesDeleteCall) 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 "metastore.projects.locations.services.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + // "httpMethod": "DELETE", + // "id": "metastore.projects.locations.services.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.exportMetadata": + +type ProjectsLocationsServicesExportMetadataCall struct { + s *APIService + service string + exportmetadatarequest *ExportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportMetadata: Exports metadata from a service. +// +// - service: The relative resource name of the metastore service to run +// export, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service +// _id}. +func (r *ProjectsLocationsServicesService) ExportMetadata(service string, exportmetadatarequest *ExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall { + c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.exportmetadatarequest = exportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall { + 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 *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesExportMetadataCall) 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.exportmetadatarequest) + 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/{+service}:exportMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.exportMetadata" 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 *ProjectsLocationsServicesExportMetadataCall) 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": "Exports metadata from a service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.exportMetadata", + // "parameterOrder": [ + // "service" + // ], + // "parameters": { + // "service": { + // "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+service}:exportMetadata", + // "request": { + // "$ref": "ExportMetadataRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.get": + +type ProjectsLocationsServicesGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single service. +// +// - name: The relative resource name of the metastore service to +// retrieve, in the following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}. +func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { + c := &ProjectsLocationsServicesGetCall{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 *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { + 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 *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { + 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 *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetCall) 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 "metastore.projects.locations.services.get" call. +// Exactly one of *Service or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Service.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Service{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a single service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Service" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.getIamPolicy": + +type ProjectsLocationsServicesGetIamPolicyCall struct { + s *APIService + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServicesService) GetIamPolicy(resource string) *ProjectsLocationsServicesGetIamPolicyCall { + c := &ProjectsLocationsServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy.Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected.Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset.The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1.To learn which +// resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetIamPolicyCall { + 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 *ProjectsLocationsServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetIamPolicyCall { + 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 *ProjectsLocationsServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.list": + +type ProjectsLocationsServicesListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists services in a project and location. +// +// - parent: The relative resource name of the location of metastore +// services to list, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { + c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to +// list results. +func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering +// of results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). +// If not specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of services to return. The response may contain less than the maximum +// number. If unspecified, no more than 500 services are returned. The +// maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous DataprocMetastore.ListServices call. Provide +// this token to retrieve the subsequent page.To retrieve the first +// page, supply an empty page token.When paginating, other parameters +// provided to DataprocMetastore.ListServices must match the call that +// provided the page token. +func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall { + 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 *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { + 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 *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { + 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 *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.list" call. +// Exactly one of *ListServicesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListServicesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists services in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter to apply to list results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/services", + // "response": { + // "$ref": "ListServicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "metastore.projects.locations.services.patch": + +type ProjectsLocationsServicesPatchCall struct { + s *APIService + name string + service *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single service. +// +// - name: Immutable. The relative resource name of the metastore +// service, in the following +// format:projects/{project_number}/locations/{location_id}/services/{s +// ervice_id}. +func (r *ProjectsLocationsServicesService) Patch(name string, service *Service) *ProjectsLocationsServicesPatchCall { + c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.service = service + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// field mask used to specify the fields to be overwritten in the +// metastore service resource by the update. Fields specified in the +// update_mask are relative to the resource (not to the full request). A +// field is overwritten if it is in the mask. +func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall { + 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 *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + // "httpMethod": "PATCH", + // "id": "metastore.projects.locations.services.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Service" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.restore": + +type ProjectsLocationsServicesRestoreCall struct { + s *APIService + service string + restoreservicerequest *RestoreServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a service from a backup. +// +// - service: The relative resource name of the metastore service to run +// restore, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service +// _id}. +func (r *ProjectsLocationsServicesService) Restore(service string, restoreservicerequest *RestoreServiceRequest) *ProjectsLocationsServicesRestoreCall { + c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.restoreservicerequest = restoreservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall { + 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 *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRestoreCall) 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.restoreservicerequest) + 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/{+service}:restore") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.restore" 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 *ProjectsLocationsServicesRestoreCall) 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": "Restores a service from a backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.restore", + // "parameterOrder": [ + // "service" + // ], + // "parameters": { + // "service": { + // "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+service}:restore", + // "request": { + // "$ref": "RestoreServiceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.setIamPolicy": + +type ProjectsLocationsServicesSetIamPolicyCall struct { + s *APIService + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy.Can return NOT_FOUND, +// INVALID_ARGUMENT, and PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesSetIamPolicyCall { + c := &ProjectsLocationsServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesSetIamPolicyCall { + 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 *ProjectsLocationsServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.testIamPermissions": + +type ProjectsLocationsServicesTestIamPermissionsCall struct { + s *APIService + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a NOT_FOUND error.Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesTestIamPermissionsCall { + c := &ProjectsLocationsServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesTestIamPermissionsCall { + 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 *ProjectsLocationsServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.backups.create": + +type ProjectsLocationsServicesBackupsCreateCall struct { + s *APIService + parent string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new backup in a given project and location. +// +// - parent: The relative resource name of the service in which to +// create a backup of the following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}. +func (r *ProjectsLocationsServicesBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsServicesBackupsCreateCall { + c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backup = backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID of +// the backup, which is used as the final component of the backup's +// name.This value must be between 1 and 64 characters long, begin with +// a letter, end with a letter or number, and consist of alpha-numeric +// ASCII characters or hyphens. +func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall { + 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 *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsCreateCall) 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.backup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.backups.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 *ProjectsLocationsServicesBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new backup in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.backups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "backupId": { + // "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/backups", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.backups.delete": + +type ProjectsLocationsServicesBackupsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single backup. +// +// - name: The relative resource name of the backup to delete, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall { + c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall { + 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 *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsDeleteCall) 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 "metastore.projects.locations.services.backups.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 *ProjectsLocationsServicesBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + // "httpMethod": "DELETE", + // "id": "metastore.projects.locations.services.backups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.backups.get": + +type ProjectsLocationsServicesBackupsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single backup. +// +// - name: The relative resource name of the backup to retrieve, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall { + c := &ProjectsLocationsServicesBackupsGetCall{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 *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall { + 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 *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall { + 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 *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetCall) 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 "metastore.projects.locations.services.backups.get" call. +// Exactly one of *Backup or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Backup.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) { + gensupport.SetOptions(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 := &Backup{ + ServerResponse: googleapi.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 details of a single backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.backups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Backup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.backups.getIamPolicy": + +type ProjectsLocationsServicesBackupsGetIamPolicyCall struct { + s *APIService + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServicesBackupsService) GetIamPolicy(resource string) *ProjectsLocationsServicesBackupsGetIamPolicyCall { + c := &ProjectsLocationsServicesBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy.Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected.Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset.The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1.To learn which +// resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesBackupsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetIamPolicyCall { + 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 *ProjectsLocationsServicesBackupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetIamPolicyCall { + 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 *ProjectsLocationsServicesBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.backups.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.backups.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.backups.list": + +type ProjectsLocationsServicesBackupsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists backups in a service. +// +// - parent: The relative resource name of the service whose backups to +// list, in the following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}/backups. +func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall { + c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to +// list results. +func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering +// of results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). +// If not specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of backups to return. The response may contain less than the maximum +// number. If unspecified, no more than 500 backups are returned. The +// maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous DataprocMetastore.ListBackups call. Provide +// this token to retrieve the subsequent page.To retrieve the first +// page, supply an empty page token.When paginating, other parameters +// provided to DataprocMetastore.ListBackups must match the call that +// provided the page token. +func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall { + 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 *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall { + 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 *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall { + 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 *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.list" call. +// Exactly one of *ListBackupsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) { + gensupport.SetOptions(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 := &ListBackupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists backups in a service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.backups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter to apply to list results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/backups", + // "response": { + // "$ref": "ListBackupsResponse" + // }, + // "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 *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) 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 "metastore.projects.locations.services.backups.setIamPolicy": + +type ProjectsLocationsServicesBackupsSetIamPolicyCall struct { + s *APIService + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy.Can return NOT_FOUND, +// INVALID_ARGUMENT, and PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServicesBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesBackupsSetIamPolicyCall { + c := &ProjectsLocationsServicesBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsSetIamPolicyCall { + 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 *ProjectsLocationsServicesBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.backups.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.backups.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.metadataImports.create": + +type ProjectsLocationsServicesMetadataImportsCreateCall struct { + s *APIService + parent string + metadataimport *MetadataImport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new MetadataImport in a given project and location. +// +// - parent: The relative resource name of the service in which to +// create a metastore import, in the following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}. +func (r *ProjectsLocationsServicesMetadataImportsService) Create(parent string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsCreateCall { + c := &ProjectsLocationsServicesMetadataImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.metadataimport = metadataimport + return c +} + +// MetadataImportId sets the optional parameter "metadataImportId": +// Required. The ID of the metadata import, which is used as the final +// component of the metadata import's name.This value must be between 1 +// and 64 characters long, begin with a letter, end with a letter or +// number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesMetadataImportsCreateCall) MetadataImportId(metadataImportId string) *ProjectsLocationsServicesMetadataImportsCreateCall { + c.urlParams_.Set("metadataImportId", metadataImportId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesMetadataImportsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsCreateCall { + 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 *ProjectsLocationsServicesMetadataImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMetadataImportsCreateCall) 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.metadataimport) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataImports") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.metadataImports.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 *ProjectsLocationsServicesMetadataImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new MetadataImport in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports", + // "httpMethod": "POST", + // "id": "metastore.projects.locations.services.metadataImports.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "metadataImportId": { + // "description": "Required. The ID of the metadata import, which is used as the final component of the metadata import's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/metadataImports", + // "request": { + // "$ref": "MetadataImport" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.metadataImports.get": + +type ProjectsLocationsServicesMetadataImportsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single import. +// +// - name: The relative resource name of the metadata import to +// retrieve, in the following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}/metadataImports/{import_id}. +func (r *ProjectsLocationsServicesMetadataImportsService) Get(name string) *ProjectsLocationsServicesMetadataImportsGetCall { + c := &ProjectsLocationsServicesMetadataImportsGetCall{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 *ProjectsLocationsServicesMetadataImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsGetCall { + 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 *ProjectsLocationsServicesMetadataImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsGetCall { + 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 *ProjectsLocationsServicesMetadataImportsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesMetadataImportsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMetadataImportsGetCall) 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 "metastore.projects.locations.services.metadataImports.get" call. +// Exactly one of *MetadataImport or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *MetadataImport.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesMetadataImportsGetCall) Do(opts ...googleapi.CallOption) (*MetadataImport, error) { + gensupport.SetOptions(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 := &MetadataImport{ + ServerResponse: googleapi.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 details of a single import.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports/{metadataImportsId}", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.metadataImports.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "MetadataImport" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "metastore.projects.locations.services.metadataImports.list": + +type ProjectsLocationsServicesMetadataImportsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists imports in a service. +// +// - parent: The relative resource name of the service whose metadata +// imports to list, in the following +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}/metadataImports. +func (r *ProjectsLocationsServicesMetadataImportsService) List(parent string) *ProjectsLocationsServicesMetadataImportsListCall { + c := &ProjectsLocationsServicesMetadataImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to +// list results. +func (c *ProjectsLocationsServicesMetadataImportsListCall) Filter(filter string) *ProjectsLocationsServicesMetadataImportsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering +// of results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). +// If not specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesMetadataImportsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMetadataImportsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of imports to return. The response may contain less than the maximum +// number. If unspecified, no more than 500 imports are returned. The +// maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesMetadataImportsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMetadataImportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous DataprocMetastore.ListServices call. Provide +// this token to retrieve the subsequent page.To retrieve the first +// page, supply an empty page token.When paginating, other parameters +// provided to DataprocMetastore.ListServices must match the call that +// provided the page token. +func (c *ProjectsLocationsServicesMetadataImportsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMetadataImportsListCall { + 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 *ProjectsLocationsServicesMetadataImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsListCall { + 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 *ProjectsLocationsServicesMetadataImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsListCall { + 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 *ProjectsLocationsServicesMetadataImportsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesMetadataImportsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMetadataImportsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataImports") + 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 "metastore.projects.locations.services.metadataImports.list" call. +// Exactly one of *ListMetadataImportsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListMetadataImportsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesMetadataImportsListCall) Do(opts ...googleapi.CallOption) (*ListMetadataImportsResponse, error) { + gensupport.SetOptions(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 := &ListMetadataImportsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists imports in a service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports", + // "httpMethod": "GET", + // "id": "metastore.projects.locations.services.metadataImports.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter to apply to list results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of imports to return. The response may contain less than the maximum number. If unspecified, no more than 500 imports are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/metadataImports", + // "response": { + // "$ref": "ListMetadataImportsResponse" + // }, + // "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 *ProjectsLocationsServicesMetadataImportsListCall) Pages(ctx context.Context, f func(*ListMetadataImportsResponse) 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 "metastore.projects.locations.services.metadataImports.patch": + +type ProjectsLocationsServicesMetadataImportsPatchCall struct { + s *APIService + name string + metadataimport *MetadataImport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a single import. Only the description field of +// MetadataImport is supported to be updated. +// +// - name: Immutable. The relative resource name of the metadata import, +// of the +// form:projects/{project_number}/locations/{location_id}/services/{ser +// vice_id}/metadataImports/{metadata_import_id}. +func (r *ProjectsLocationsServicesMetadataImportsService) Patch(name string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsPatchCall { + c := &ProjectsLocationsServicesMetadataImportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.metadataimport = metadataimport + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. +// Specify a unique request ID to allow the server to ignore the request +// if it has completed. The server will ignore subsequent requests that +// provide a duplicate request ID for at least 60 minutes after the +// first request.For example, if an initial request times out, followed +// by another request with the same request ID, the server ignores the +// second request to prevent the creation of duplicate commitments.The +// request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) +// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesMetadataImportsPatchCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// field mask used to specify the fields to be overwritten in the +// metadata import resource by the update. Fields specified in the +// update_mask are relative to the resource (not to the full request). A +// field is overwritten if it is in the mask. +func (c *ProjectsLocationsServicesMetadataImportsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesMetadataImportsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsPatchCall { + 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 *ProjectsLocationsServicesMetadataImportsPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMetadataImportsPatchCall) 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.metadataimport) + 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 "metastore.projects.locations.services.metadataImports.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 *ProjectsLocationsServicesMetadataImportsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a single import. Only the description field of MetadataImport is supported to be updated.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/metadataImports/{metadataImportsId}", + // "httpMethod": "PATCH", + // "id": "metastore.projects.locations.services.metadataImports.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A field mask used to specify the fields to be overwritten in the metadata import resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "MetadataImport" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index b5ea7f4569c..10d4cee622e 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2576,7 +2576,7 @@ } } }, - "revision": "20221107", + "revision": "20221114", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -3258,20 +3258,16 @@ "type": "object" }, "Documentation": { - "description": "User-defined documentation of the generated notification.", + "description": "A content string and a MIME type that describes the content string's format.", "id": "Documentation", "properties": { "content": { - "description": "The body of the notification, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables (https://cloud.google.com/monitoring/alerts/doc-variables).", + "description": "The body of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables (https://cloud.google.com/monitoring/alerts/doc-variables).", "type": "string" }, "mimeType": { "description": "The format of the content field. Presently, only the value \"text/markdown\" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information.", "type": "string" - }, - "subject": { - "description": "A public comment for an internal field, because the linter insists that all fields must have a comment. Sigh.", - "type": "string" } }, "type": "object" diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 89bc07ab27b..116d48c9ea6 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -1740,10 +1740,10 @@ func (s *DistributionCut) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Documentation: User-defined documentation of the generated -// notification. +// Documentation: A content string and a MIME type that describes the +// content string's format. type Documentation struct { - // Content: The body of the notification, interpreted according to + // Content: The body of the documentation, interpreted according to // mime_type. The content may not exceed 8,192 Unicode characters and // may not exceed more than 10,240 bytes when encoded in UTF-8 format, // whichever is smaller. This text can be templatized by using variables @@ -1755,10 +1755,6 @@ type Documentation struct { // (https://en.wikipedia.org/wiki/Markdown) for more information. MimeType string `json:"mimeType,omitempty"` - // Subject: A public comment for an internal field, because the linter - // insists that all fields must have a comment. Sigh. - Subject string `json:"subject,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/policysimulator/v1/policysimulator-api.json b/policysimulator/v1/policysimulator-api.json index 1c455ef3dc9..b195abd1964 100644 --- a/policysimulator/v1/policysimulator-api.json +++ b/policysimulator/v1/policysimulator-api.json @@ -166,6 +166,76 @@ } }, "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/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "results": { "methods": { "list": { @@ -244,7 +314,9 @@ "flatPath": "v1/operations", "httpMethod": "GET", "id": "policysimulator.operations.list", - "parameterOrder": [], + "parameterOrder": [ + "name" + ], "parameters": { "filter": { "description": "The standard list filter.", @@ -253,7 +325,9 @@ }, "name": { "description": "The name of the operation's parent resource.", - "location": "query", + "location": "path", + "pattern": "^operations$", + "required": true, "type": "string" }, "pageSize": { @@ -268,7 +342,7 @@ "type": "string" } }, - "path": "v1/operations", + "path": "v1/{+name}", "response": { "$ref": "GoogleLongrunningListOperationsResponse" }, @@ -339,6 +413,76 @@ } }, "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/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "results": { "methods": { "list": { @@ -446,6 +590,76 @@ } }, "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/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "results": { "methods": { "list": { @@ -493,7 +707,7 @@ } } }, - "revision": "20220826", + "revision": "20221112", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudPolicysimulatorV1AccessStateDiff": { diff --git a/policysimulator/v1/policysimulator-gen.go b/policysimulator/v1/policysimulator-gen.go index fc7531b989d..0f143e2569c 100644 --- a/policysimulator/v1/policysimulator-gen.go +++ b/policysimulator/v1/policysimulator-gen.go @@ -172,6 +172,7 @@ type FoldersLocationsService struct { func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysService { rs := &FoldersLocationsReplaysService{s: s} + rs.Operations = NewFoldersLocationsReplaysOperationsService(s) rs.Results = NewFoldersLocationsReplaysResultsService(s) return rs } @@ -179,9 +180,20 @@ func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysServi type FoldersLocationsReplaysService struct { s *Service + Operations *FoldersLocationsReplaysOperationsService + Results *FoldersLocationsReplaysResultsService } +func NewFoldersLocationsReplaysOperationsService(s *Service) *FoldersLocationsReplaysOperationsService { + rs := &FoldersLocationsReplaysOperationsService{s: s} + return rs +} + +type FoldersLocationsReplaysOperationsService struct { + s *Service +} + func NewFoldersLocationsReplaysResultsService(s *Service) *FoldersLocationsReplaysResultsService { rs := &FoldersLocationsReplaysResultsService{s: s} return rs @@ -226,6 +238,7 @@ type OrganizationsLocationsService struct { func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} + rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) rs.Results = NewOrganizationsLocationsReplaysResultsService(s) return rs } @@ -233,9 +246,20 @@ func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocations type OrganizationsLocationsReplaysService struct { s *Service + Operations *OrganizationsLocationsReplaysOperationsService + Results *OrganizationsLocationsReplaysResultsService } +func NewOrganizationsLocationsReplaysOperationsService(s *Service) *OrganizationsLocationsReplaysOperationsService { + rs := &OrganizationsLocationsReplaysOperationsService{s: s} + return rs +} + +type OrganizationsLocationsReplaysOperationsService struct { + s *Service +} + func NewOrganizationsLocationsReplaysResultsService(s *Service) *OrganizationsLocationsReplaysResultsService { rs := &OrganizationsLocationsReplaysResultsService{s: s} return rs @@ -271,6 +295,7 @@ type ProjectsLocationsService struct { func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysService { rs := &ProjectsLocationsReplaysService{s: s} + rs.Operations = NewProjectsLocationsReplaysOperationsService(s) rs.Results = NewProjectsLocationsReplaysResultsService(s) return rs } @@ -278,9 +303,20 @@ func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysSer type ProjectsLocationsReplaysService struct { s *Service + Operations *ProjectsLocationsReplaysOperationsService + Results *ProjectsLocationsReplaysResultsService } +func NewProjectsLocationsReplaysOperationsService(s *Service) *ProjectsLocationsReplaysOperationsService { + rs := &ProjectsLocationsReplaysOperationsService{s: s} + return rs +} + +type ProjectsLocationsReplaysOperationsService struct { + s *Service +} + func NewProjectsLocationsReplaysResultsService(s *Service) *ProjectsLocationsReplaysResultsService { rs := &ProjectsLocationsReplaysResultsService{s: s} return rs @@ -2031,53 +2067,32 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "policysimulator.folders.locations.replays.results.list": +// method id "policysimulator.folders.locations.replays.operations.get": -type FoldersLocationsReplaysResultsListCall struct { +type FoldersLocationsReplaysOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the results of running a Replay. +// Get: 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. // -// - parent: The Replay whose results are listed, in the following -// format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}` Example: -// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 -// 3-479ce1833c36`. -func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { - c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of ReplayResult objects to return. Defaults to 5000. The maximum -// value is 5000; values above 5000 are rounded down to 5000. -func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous Simulator.ListReplayResults call. Provide -// this token to retrieve the next page of results. When paginating, all -// other parameters provided to [Simulator.ListReplayResults[] must -// match the call that provided the page token. -func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2087,7 +2102,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { +func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2095,21 +2110,21 @@ func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2122,7 +2137,7 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2130,21 +2145,19 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.results.list" call. -// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2163,7 +2176,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2175,36 +2188,25 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists the results of running a Replay.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.results.list", + // "id": "policysimulator.folders.locations.replays.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/results", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2213,30 +2215,9 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "policysimulator.operations.get": +// method id "policysimulator.folders.locations.replays.operations.list": -type OperationsGetCall struct { +type FoldersLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2245,21 +2226,49 @@ type OperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2269,7 +2278,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2277,21 +2286,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2317,14 +2326,15 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2343,7 +2353,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2355,25 +2365,41 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2382,55 +2408,66 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OperationsListCall struct { +// method id "policysimulator.folders.locations.replays.results.list": + +type FoldersLocationsReplaysResultsListCall struct { s *Service + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. -func (r *OperationsService) List() *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// Name sets the optional parameter "name": The name of the operation's -// parent resource. -func (c *OperationsListCall) Name(name string) *OperationsListCall { - c.urlParams_.Set("name", name) +// List: Lists the results of running a Replay. +// +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { + c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2438,7 +2475,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2448,7 +2485,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2456,21 +2493,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2483,25 +2520,29 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") 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 "policysimulator.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.folders.locations.replays.results.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2520,7 +2561,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2532,37 +2573,36 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1/operations", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", - // "parameterOrder": [], + // "id": "policysimulator.folders.locations.replays.results.list", + // "parameterOrder": [ + // "parent" + // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "query", - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/operations", + // "path": "v1/{+parent}/results", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2574,7 +2614,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2592,90 +2632,97 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.replays.create": +// method id "policysimulator.operations.get": -type OrganizationsLocationsReplaysCreateCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates and starts a Replay using the given ReplayConfig. +// 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. // -// - parent: The parent resource where this Replay will be created. This -// resource must be a project, folder, or organization with a -// location. Example: `projects/my-example-project/locations/global`. -func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *OrganizationsLocationsReplaysCreateCall { - c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay +// - 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 *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall { +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 *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall { +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 *OrganizationsLocationsReplaysCreateCall) Header() http.Header { +func (c *OperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.create" call. +// Do executes the "policysimulator.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2706,26 +2753,23 @@ func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Creates and starts a Replay using the given ReplayConfig.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays", - // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.replays.create", + // "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": "policysimulator.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/replays", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" - // }, + // "path": "v1/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -2736,9 +2780,9 @@ func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOptio } -// method id "policysimulator.organizations.locations.replays.get": +// method id "policysimulator.operations.list": -type OrganizationsLocationsReplaysGetCall struct { +type OperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2747,25 +2791,49 @@ type OrganizationsLocationsReplaysGetCall struct { header_ http.Header } -// Get: Gets the specified Replay. Each `Replay` is available for at -// least 7 days. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The name of the Replay to retrieve, in the following format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}`, where `{resource-id}` is the ID of the project, -// folder, or organization that owns the `Replay`. Example: -// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- -// 4d7d-8e03-479ce1833c36`. -func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall { - c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { + 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 *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall { +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2775,7 +2843,7 @@ func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *Org // 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 *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall { +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2783,21 +2851,21 @@ func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall { +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header { +func (c *OperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2823,18 +2891,18 @@ func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.get" call. -// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { +// Do executes the "policysimulator.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { res.Body.Close() } @@ -2850,7 +2918,7 @@ func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1Replay{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2862,25 +2930,41 @@ func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/operations", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.get", + // "id": "policysimulator.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2889,53 +2973,201 @@ func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) } -// method id "policysimulator.organizations.locations.replays.results.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsLocationsReplaysResultsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "policysimulator.organizations.locations.replays.create": + +type OrganizationsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the results of running a Replay. +// Create: Creates and starts a Replay using the given ReplayConfig. // -// - parent: The Replay whose results are listed, in the following -// format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}` Example: -// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 -// 3-479ce1833c36`. -func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall { - c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *OrganizationsLocationsReplaysCreateCall { + c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of ReplayResult objects to return. Defaults to 5000. The maximum -// value is 5000; values above 5000 are rounded down to 5000. -func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous Simulator.ListReplayResults call. Provide -// this token to retrieve the next page of results. When paginating, all -// other parameters provided to [Simulator.ListReplayResults[] must -// match the call that provided the page token. -func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.get": + +type OrganizationsLocationsReplaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. +// +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall { + c := &OrganizationsLocationsReplaysGetCall{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 *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2945,7 +3177,7 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Fie // 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 *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2953,21 +3185,883 @@ func (c *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1Replay{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.operations.get": + +type OrganizationsLocationsReplaysOperationsGetCall 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 *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall { + c := &OrganizationsLocationsReplaysOperationsGetCall{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 *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall { + 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 *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall { + 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 *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.operations.list": + +type OrganizationsLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall { + c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "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 *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.results.list": + +type OrganizationsLocationsReplaysResultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the results of running a Replay. +// +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall { + c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall { + 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 *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall { + 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 *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall { + 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 *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") + 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 "policysimulator.organizations.locations.replays.results.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { + gensupport.SetOptions(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 := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.results.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/results", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" + // }, + // "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 *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.projects.locations.replays.create": + +type ProjectsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates and starts a Replay using the given ReplayConfig. +// +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *ProjectsLocationsReplaysCreateCall { + c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall { + 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 *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.projects.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.projects.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.projects.locations.replays.get": + +type ProjectsLocationsReplaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. +// +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall { + c := &ProjectsLocationsReplaysGetCall{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 *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall { + 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 *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall { + 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 *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysGetCall) 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_ { @@ -2980,7 +4074,7 @@ func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2988,21 +4082,20 @@ func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.results.list" call. -// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "policysimulator.projects.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { +func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3021,7 +4114,7 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ + ret := &GoogleCloudPolicysimulatorV1Replay{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3033,36 +4126,25 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists the results of running a Replay.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.results.list", + // "id": "policysimulator.projects.locations.replays.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/results", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1Replay" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3071,111 +4153,97 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.Call } -// 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 *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "policysimulator.projects.locations.replays.create": +// method id "policysimulator.projects.locations.replays.operations.get": -type ProjectsLocationsReplaysCreateCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReplaysOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates and starts a Replay using the given ReplayConfig. +// 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. // -// - parent: The parent resource where this Replay will be created. This -// resource must be a project, folder, or organization with a -// location. Example: `projects/my-example-project/locations/global`. -func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *ProjectsLocationsReplaysCreateCall { - c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay +// - name: The name of the operation resource. +func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall { + c := &ProjectsLocationsReplaysOperationsGetCall{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 *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall { 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 *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall { + 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 *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.create" call. +// Do executes the "policysimulator.projects.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3206,26 +4274,23 @@ func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates and starts a Replay using the given ReplayConfig.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays", - // "httpMethod": "POST", - // "id": "policysimulator.projects.locations.replays.create", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.projects.locations.replays.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/replays", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" - // }, + // "path": "v1/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -3236,9 +4301,9 @@ func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "policysimulator.projects.locations.replays.get": +// method id "policysimulator.projects.locations.replays.operations.list": -type ProjectsLocationsReplaysGetCall struct { +type ProjectsLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3247,25 +4312,49 @@ type ProjectsLocationsReplaysGetCall struct { header_ http.Header } -// Get: Gets the specified Replay. Each `Replay` is available for at -// least 7 days. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The name of the Replay to retrieve, in the following format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}`, where `{resource-id}` is the ID of the project, -// folder, or organization that owns the `Replay`. Example: -// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- -// 4d7d-8e03-479ce1833c36`. -func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall { - c := &ProjectsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall { + c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall { + 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 *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3275,7 +4364,7 @@ func (c *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *Projects // 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 *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3283,21 +4372,21 @@ func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *Project // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsListCall) 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_ { @@ -3323,15 +4412,15 @@ func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.get" call. -// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) { +// Do executes the "policysimulator.projects.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3350,7 +4439,7 @@ func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1Replay{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3362,25 +4451,41 @@ func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.replays.get", + // "id": "policysimulator.projects.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3389,6 +4494,27 @@ func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goo } +// 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 *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "policysimulator.projects.locations.replays.results.list": type ProjectsLocationsReplaysResultsListCall struct { diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json index 877d9e5e1e6..cde057b1866 100644 --- a/policysimulator/v1alpha/policysimulator-api.json +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -105,6 +105,88 @@ }, "protocol": "rest", "resources": { + "folders": { + "resources": { + "locations": { + "resources": { + "replays": { + "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": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, "operations": { "methods": { "get": { @@ -137,7 +219,9 @@ "flatPath": "v1alpha/operations", "httpMethod": "GET", "id": "policysimulator.operations.list", - "parameterOrder": [], + "parameterOrder": [ + "name" + ], "parameters": { "filter": { "description": "The standard list filter.", @@ -146,7 +230,9 @@ }, "name": { "description": "The name of the operation's parent resource.", - "location": "query", + "location": "path", + "pattern": "^operations$", + "required": true, "type": "string" }, "pageSize": { @@ -161,7 +247,7 @@ "type": "string" } }, - "path": "v1alpha/operations", + "path": "v1alpha/{+name}", "response": { "$ref": "GoogleLongrunningListOperationsResponse" }, @@ -170,9 +256,173 @@ ] } } + }, + "organizations": { + "resources": { + "locations": { + "resources": { + "replays": { + "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": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "projects": { + "resources": { + "locations": { + "resources": { + "replays": { + "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } } }, - "revision": "20220826", + "revision": "20221112", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudPolicysimulatorV1Replay": { diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go index 553bb791eb5..58bed4d463f 100644 --- a/policysimulator/v1alpha/policysimulator-gen.go +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -118,7 +118,10 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Folders = NewFoldersService(s) s.Operations = NewOperationsService(s) + s.Organizations = NewOrganizationsService(s) + s.Projects = NewProjectsService(s) return s, nil } @@ -127,7 +130,13 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Folders *FoldersService + Operations *OperationsService + + Organizations *OrganizationsService + + Projects *ProjectsService } func (s *Service) userAgent() string { @@ -137,6 +146,51 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewFoldersService(s *Service) *FoldersService { + rs := &FoldersService{s: s} + rs.Locations = NewFoldersLocationsService(s) + return rs +} + +type FoldersService struct { + s *Service + + Locations *FoldersLocationsService +} + +func NewFoldersLocationsService(s *Service) *FoldersLocationsService { + rs := &FoldersLocationsService{s: s} + rs.Replays = NewFoldersLocationsReplaysService(s) + return rs +} + +type FoldersLocationsService struct { + s *Service + + Replays *FoldersLocationsReplaysService +} + +func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysService { + rs := &FoldersLocationsReplaysService{s: s} + rs.Operations = NewFoldersLocationsReplaysOperationsService(s) + return rs +} + +type FoldersLocationsReplaysService struct { + s *Service + + Operations *FoldersLocationsReplaysOperationsService +} + +func NewFoldersLocationsReplaysOperationsService(s *Service) *FoldersLocationsReplaysOperationsService { + rs := &FoldersLocationsReplaysOperationsService{s: s} + return rs +} + +type FoldersLocationsReplaysOperationsService struct { + s *Service +} + func NewOperationsService(s *Service) *OperationsService { rs := &OperationsService{s: s} return rs @@ -146,6 +200,96 @@ type OperationsService struct { s *Service } +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + Locations *OrganizationsLocationsService +} + +func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { + rs := &OrganizationsLocationsService{s: s} + rs.Replays = NewOrganizationsLocationsReplaysService(s) + return rs +} + +type OrganizationsLocationsService struct { + s *Service + + Replays *OrganizationsLocationsReplaysService +} + +func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { + rs := &OrganizationsLocationsReplaysService{s: s} + rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) + return rs +} + +type OrganizationsLocationsReplaysService struct { + s *Service + + Operations *OrganizationsLocationsReplaysOperationsService +} + +func NewOrganizationsLocationsReplaysOperationsService(s *Service) *OrganizationsLocationsReplaysOperationsService { + rs := &OrganizationsLocationsReplaysOperationsService{s: s} + return rs +} + +type OrganizationsLocationsReplaysOperationsService struct { + s *Service +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Replays = NewProjectsLocationsReplaysService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Replays *ProjectsLocationsReplaysService +} + +func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysService { + rs := &ProjectsLocationsReplaysService{s: s} + rs.Operations = NewProjectsLocationsReplaysOperationsService(s) + return rs +} + +type ProjectsLocationsReplaysService struct { + s *Service + + Operations *ProjectsLocationsReplaysOperationsService +} + +func NewProjectsLocationsReplaysOperationsService(s *Service) *ProjectsLocationsReplaysOperationsService { + rs := &ProjectsLocationsReplaysOperationsService{s: s} + return rs +} + +type ProjectsLocationsReplaysOperationsService struct { + s *Service +} + // GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, // or simulation. type GoogleCloudPolicysimulatorV1Replay struct { @@ -1032,9 +1176,9 @@ func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "policysimulator.operations.get": +// method id "policysimulator.folders.locations.replays.operations.get": -type OperationsGetCall struct { +type FoldersLocationsReplaysOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1048,8 +1192,8 @@ type OperationsGetCall struct { // 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)} +func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1057,7 +1201,7 @@ func (r *OperationsService) Get(name string) *OperationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1067,7 +1211,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1075,21 +1219,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1115,14 +1259,14 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1154,9 +1298,9 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/operations/{operationsId}", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.folders.locations.replays.operations.get", // "parameterOrder": [ // "name" // ], @@ -1164,7 +1308,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } @@ -1180,10 +1324,11 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// method id "policysimulator.folders.locations.replays.operations.list": -type OperationsListCall struct { +type FoldersLocationsReplaysOperationsListCall struct { s *Service + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -1200,35 +1345,31 @@ type OperationsListCall struct { // the operations collection id, however overriding users must ensure // the name binding is the parent resource, without the operations // collection id. -func (r *OperationsService) List() *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// +// - name: The name of the operation's parent resource. +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// Name sets the optional parameter "name": The name of the operation's -// parent resource. -func (c *OperationsListCall) Name(name string) *OperationsListCall { - c.urlParams_.Set("name", name) - return c -} - // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1236,7 +1377,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1246,7 +1387,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1254,21 +1395,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1281,17 +1422,20 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.list" call. +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -1299,7 +1443,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1331,10 +1475,12 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1alpha/operations", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", - // "parameterOrder": [], + // "id": "policysimulator.folders.locations.replays.operations.list", + // "parameterOrder": [ + // "name" + // ], // "parameters": { // "filter": { // "description": "The standard list filter.", @@ -1343,7 +1489,9 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // }, // "name": { // "description": "The name of the operation's parent resource.", - // "location": "query", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "required": true, // "type": "string" // }, // "pageSize": { @@ -1358,7 +1506,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // "type": "string" // } // }, - // "path": "v1alpha/operations", + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningListOperationsResponse" // }, @@ -1372,7 +1520,1093 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.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, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.operations.list": + +type OperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { + 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 *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { + 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 *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { + 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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/operations", + // "httpMethod": "GET", + // "id": "policysimulator.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "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 *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.operations.get": + +type OrganizationsLocationsReplaysOperationsGetCall 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 *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall { + c := &OrganizationsLocationsReplaysOperationsGetCall{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 *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall { + 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 *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall { + 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 *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysOperationsGetCall) 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.operations.list": + +type OrganizationsLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall { + c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysOperationsListCall) 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "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 *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.projects.locations.replays.operations.get": + +type ProjectsLocationsReplaysOperationsGetCall 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 *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall { + c := &ProjectsLocationsReplaysOperationsGetCall{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 *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall { + 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 *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall { + 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 *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReplaysOperationsGetCall) 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.projects.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.projects.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.projects.locations.replays.operations.list": + +type ProjectsLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall { + c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall { + 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 *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall { + 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 *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall { + 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 *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReplaysOperationsListCall) 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.projects.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "httpMethod": "GET", + // "id": "policysimulator.projects.locations.replays.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "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 *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/policysimulator/v1beta1/policysimulator-api.json b/policysimulator/v1beta1/policysimulator-api.json index 38e187b563e..1893c1305ef 100644 --- a/policysimulator/v1beta1/policysimulator-api.json +++ b/policysimulator/v1beta1/policysimulator-api.json @@ -166,6 +166,76 @@ } }, "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": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "results": { "methods": { "list": { @@ -244,7 +314,9 @@ "flatPath": "v1beta1/operations", "httpMethod": "GET", "id": "policysimulator.operations.list", - "parameterOrder": [], + "parameterOrder": [ + "name" + ], "parameters": { "filter": { "description": "The standard list filter.", @@ -253,7 +325,9 @@ }, "name": { "description": "The name of the operation's parent resource.", - "location": "query", + "location": "path", + "pattern": "^operations$", + "required": true, "type": "string" }, "pageSize": { @@ -268,7 +342,7 @@ "type": "string" } }, - "path": "v1beta1/operations", + "path": "v1beta1/{+name}", "response": { "$ref": "GoogleLongrunningListOperationsResponse" }, @@ -339,6 +413,76 @@ } }, "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": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "results": { "methods": { "list": { @@ -446,6 +590,76 @@ } }, "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "results": { "methods": { "list": { @@ -493,7 +707,7 @@ } } }, - "revision": "20220826", + "revision": "20221112", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudPolicysimulatorV1Replay": { diff --git a/policysimulator/v1beta1/policysimulator-gen.go b/policysimulator/v1beta1/policysimulator-gen.go index 497b4c4054a..80b2d0637ce 100644 --- a/policysimulator/v1beta1/policysimulator-gen.go +++ b/policysimulator/v1beta1/policysimulator-gen.go @@ -172,6 +172,7 @@ type FoldersLocationsService struct { func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysService { rs := &FoldersLocationsReplaysService{s: s} + rs.Operations = NewFoldersLocationsReplaysOperationsService(s) rs.Results = NewFoldersLocationsReplaysResultsService(s) return rs } @@ -179,9 +180,20 @@ func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysServi type FoldersLocationsReplaysService struct { s *Service + Operations *FoldersLocationsReplaysOperationsService + Results *FoldersLocationsReplaysResultsService } +func NewFoldersLocationsReplaysOperationsService(s *Service) *FoldersLocationsReplaysOperationsService { + rs := &FoldersLocationsReplaysOperationsService{s: s} + return rs +} + +type FoldersLocationsReplaysOperationsService struct { + s *Service +} + func NewFoldersLocationsReplaysResultsService(s *Service) *FoldersLocationsReplaysResultsService { rs := &FoldersLocationsReplaysResultsService{s: s} return rs @@ -226,6 +238,7 @@ type OrganizationsLocationsService struct { func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} + rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) rs.Results = NewOrganizationsLocationsReplaysResultsService(s) return rs } @@ -233,9 +246,20 @@ func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocations type OrganizationsLocationsReplaysService struct { s *Service + Operations *OrganizationsLocationsReplaysOperationsService + Results *OrganizationsLocationsReplaysResultsService } +func NewOrganizationsLocationsReplaysOperationsService(s *Service) *OrganizationsLocationsReplaysOperationsService { + rs := &OrganizationsLocationsReplaysOperationsService{s: s} + return rs +} + +type OrganizationsLocationsReplaysOperationsService struct { + s *Service +} + func NewOrganizationsLocationsReplaysResultsService(s *Service) *OrganizationsLocationsReplaysResultsService { rs := &OrganizationsLocationsReplaysResultsService{s: s} return rs @@ -271,6 +295,7 @@ type ProjectsLocationsService struct { func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysService { rs := &ProjectsLocationsReplaysService{s: s} + rs.Operations = NewProjectsLocationsReplaysOperationsService(s) rs.Results = NewProjectsLocationsReplaysResultsService(s) return rs } @@ -278,9 +303,20 @@ func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysSer type ProjectsLocationsReplaysService struct { s *Service + Operations *ProjectsLocationsReplaysOperationsService + Results *ProjectsLocationsReplaysResultsService } +func NewProjectsLocationsReplaysOperationsService(s *Service) *ProjectsLocationsReplaysOperationsService { + rs := &ProjectsLocationsReplaysOperationsService{s: s} + return rs +} + +type ProjectsLocationsReplaysOperationsService struct { + s *Service +} + func NewProjectsLocationsReplaysResultsService(s *Service) *ProjectsLocationsReplaysResultsService { rs := &ProjectsLocationsReplaysResultsService{s: s} return rs @@ -2032,53 +2068,32 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "policysimulator.folders.locations.replays.results.list": +// method id "policysimulator.folders.locations.replays.operations.get": -type FoldersLocationsReplaysResultsListCall struct { +type FoldersLocationsReplaysOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the results of running a Replay. +// Get: 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. // -// - parent: The Replay whose results are listed, in the following -// format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}` Example: -// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 -// 3-479ce1833c36`. -func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { - c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of ReplayResult objects to return. Defaults to 5000. The maximum -// value is 5000; values above 5000 are rounded down to 5000. -func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous Simulator.ListReplayResults call. Provide -// this token to retrieve the next page of results. When paginating, all -// other parameters provided to [Simulator.ListReplayResults[] must -// match the call that provided the page token. -func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2088,7 +2103,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { +func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2096,21 +2111,21 @@ func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2123,7 +2138,7 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/results") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2131,22 +2146,19 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.results.list" call. -// Exactly one of -// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse.ServerResp -// onse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse, error) { +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2165,7 +2177,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2177,36 +2189,25 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists the results of running a Replay.", - // "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + // "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": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.results.list", + // "id": "policysimulator.folders.locations.replays.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/results", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2215,30 +2216,9 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "policysimulator.operations.get": +// method id "policysimulator.folders.locations.replays.operations.list": -type OperationsGetCall struct { +type FoldersLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2247,21 +2227,49 @@ type OperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2271,7 +2279,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2279,21 +2287,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2319,14 +2327,15 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2345,7 +2354,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2357,25 +2366,41 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2384,55 +2409,66 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OperationsListCall struct { +// method id "policysimulator.folders.locations.replays.results.list": + +type FoldersLocationsReplaysResultsListCall struct { s *Service + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. -func (r *OperationsService) List() *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// Name sets the optional parameter "name": The name of the operation's -// parent resource. -func (c *OperationsListCall) Name(name string) *OperationsListCall { - c.urlParams_.Set("name", name) +// List: Lists the results of running a Replay. +// +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { + c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2440,7 +2476,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2450,7 +2486,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2458,21 +2494,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2485,25 +2521,30 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/results") 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 "policysimulator.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.folders.locations.replays.results.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2522,7 +2563,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2534,37 +2575,36 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1beta1/operations", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", - // "parameterOrder": [], + // "id": "policysimulator.folders.locations.replays.results.list", + // "parameterOrder": [ + // "parent" + // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "query", - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta1/operations", + // "path": "v1beta1/{+parent}/results", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2576,7 +2616,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2594,90 +2634,97 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.replays.create": +// method id "policysimulator.operations.get": -type OrganizationsLocationsReplaysCreateCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates and starts a Replay using the given ReplayConfig. +// 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. // -// - parent: The parent resource where this Replay will be created. This -// resource must be a project, folder, or organization with a -// location. Example: `projects/my-example-project/locations/global`. -func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay) *OrganizationsLocationsReplaysCreateCall { - c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1beta1replay = googlecloudpolicysimulatorv1beta1replay +// - 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 *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall { +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 *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall { +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 *OrganizationsLocationsReplaysCreateCall) Header() http.Header { +func (c *OperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1beta1replay) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replays") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.create" call. +// Do executes the "policysimulator.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2708,26 +2755,23 @@ func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Creates and starts a Replay using the given ReplayConfig.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays", - // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.replays.create", + // "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": "v1beta1/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/replays", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1beta1Replay" - // }, + // "path": "v1beta1/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -2738,9 +2782,9 @@ func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOptio } -// method id "policysimulator.organizations.locations.replays.get": +// method id "policysimulator.operations.list": -type OrganizationsLocationsReplaysGetCall struct { +type OperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2749,25 +2793,49 @@ type OrganizationsLocationsReplaysGetCall struct { header_ http.Header } -// Get: Gets the specified Replay. Each `Replay` is available for at -// least 7 days. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The name of the Replay to retrieve, in the following format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}`, where `{resource-id}` is the ID of the project, -// folder, or organization that owns the `Replay`. Example: -// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- -// 4d7d-8e03-479ce1833c36`. -func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall { - c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { + 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 *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall { +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2777,7 +2845,7 @@ func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *Org // 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 *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall { +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2785,21 +2853,21 @@ func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall { +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header { +func (c *OperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2825,15 +2893,15 @@ func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.get" call. -// Exactly one of *GoogleCloudPolicysimulatorV1beta1Replay or error will +// Do executes the "policysimulator.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudPolicysimulatorV1beta1Replay.ServerResponse.Header or (if +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1Replay, error) { +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2852,7 +2920,7 @@ func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1beta1Replay{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2864,26 +2932,207 @@ func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta1/operations", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.get", + // "id": "policysimulator.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta1/{+name}", // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "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 *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.create": + +type OrganizationsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates and starts a Replay using the given ReplayConfig. +// +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay) *OrganizationsLocationsReplaysCreateCall { + c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1beta1replay = googlecloudpolicysimulatorv1beta1replay + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall { + 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 *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysCreateCall) 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.googlecloudpolicysimulatorv1beta1replay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/replays", + // "request": { // "$ref": "GoogleCloudPolicysimulatorV1beta1Replay" // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -2891,53 +3140,899 @@ func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) } -// method id "policysimulator.organizations.locations.replays.results.list": +// method id "policysimulator.organizations.locations.replays.get": -type OrganizationsLocationsReplaysResultsListCall struct { +type OrganizationsLocationsReplaysGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the results of running a Replay. +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. // -// - parent: The Replay whose results are listed, in the following -// format: +// - name: The name of the Replay to retrieve, in the following format: // `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}` Example: -// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 -// 3-479ce1833c36`. -func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall { - c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall { + c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of ReplayResult objects to return. Defaults to 5000. The maximum -// value is 5000; values above 5000 are rounded down to 5000. -func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous Simulator.ListReplayResults call. Provide -// this token to retrieve the next page of results. When paginating, all -// other parameters provided to [Simulator.ListReplayResults[] must -// match the call that provided the page token. -func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall { + c.ifNoneMatch_ = entityTag return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall { +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1beta1Replay or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1beta1Replay.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1Replay, error) { + gensupport.SetOptions(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 := &GoogleCloudPolicysimulatorV1beta1Replay{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1beta1Replay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.operations.get": + +type OrganizationsLocationsReplaysOperationsGetCall 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 *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall { + c := &OrganizationsLocationsReplaysOperationsGetCall{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 *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall { + 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 *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall { + 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 *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.operations.list": + +type OrganizationsLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall { + c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall { + 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 *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "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 *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.results.list": + +type OrganizationsLocationsReplaysResultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the results of running a Replay. +// +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall { + c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall { + 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 *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall { + 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 *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall { + 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 *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/results") + 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 "policysimulator.organizations.locations.replays.results.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse, error) { + gensupport.SetOptions(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 := &GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.results.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/results", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse" + // }, + // "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 *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.projects.locations.replays.create": + +type ProjectsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates and starts a Replay using the given ReplayConfig. +// +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay) *ProjectsLocationsReplaysCreateCall { + c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1beta1replay = googlecloudpolicysimulatorv1beta1replay + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall { + 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 *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReplaysCreateCall) 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.googlecloudpolicysimulatorv1beta1replay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.projects.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.projects.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1beta1Replay" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.projects.locations.replays.get": + +type ProjectsLocationsReplaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. +// +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall { + c := &ProjectsLocationsReplaysGetCall{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 *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2947,7 +4042,7 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Fie // 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 *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall { +func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2955,21 +4050,21 @@ func (c *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall { +func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysGetCall) 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_ { @@ -2982,7 +4077,7 @@ func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/results") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2990,22 +4085,20 @@ func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.results.list" call. -// Exactly one of -// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse.ServerResp -// onse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse, error) { +// Do executes the "policysimulator.projects.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1beta1Replay or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1beta1Replay.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1Replay, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3024,7 +4117,7 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse{ + ret := &GoogleCloudPolicysimulatorV1beta1Replay{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3036,36 +4129,25 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists the results of running a Replay.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.results.list", + // "id": "policysimulator.projects.locations.replays.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/results", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1beta1Replay" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3074,111 +4156,97 @@ func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.Call } -// 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 *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "policysimulator.projects.locations.replays.create": +// method id "policysimulator.projects.locations.replays.operations.get": -type ProjectsLocationsReplaysCreateCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReplaysOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates and starts a Replay using the given ReplayConfig. +// 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. // -// - parent: The parent resource where this Replay will be created. This -// resource must be a project, folder, or organization with a -// location. Example: `projects/my-example-project/locations/global`. -func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1beta1replay *GoogleCloudPolicysimulatorV1beta1Replay) *ProjectsLocationsReplaysCreateCall { - c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1beta1replay = googlecloudpolicysimulatorv1beta1replay +// - name: The name of the operation resource. +func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall { + c := &ProjectsLocationsReplaysOperationsGetCall{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 *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall { 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 *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall { + 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 *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) 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.googlecloudpolicysimulatorv1beta1replay) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/replays") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.create" call. +// Do executes the "policysimulator.projects.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3209,26 +4277,23 @@ func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates and starts a Replay using the given ReplayConfig.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays", - // "httpMethod": "POST", - // "id": "policysimulator.projects.locations.replays.create", + // "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.projects.locations.replays.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/replays", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1beta1Replay" - // }, + // "path": "v1beta1/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -3239,9 +4304,9 @@ func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "policysimulator.projects.locations.replays.get": +// method id "policysimulator.projects.locations.replays.operations.list": -type ProjectsLocationsReplaysGetCall struct { +type ProjectsLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3250,25 +4315,49 @@ type ProjectsLocationsReplaysGetCall struct { header_ http.Header } -// Get: Gets the specified Replay. Each `Replay` is available for at -// least 7 days. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The name of the Replay to retrieve, in the following format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}`, where `{resource-id}` is the ID of the project, -// folder, or organization that owns the `Replay`. Example: -// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- -// 4d7d-8e03-479ce1833c36`. -func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall { - c := &ProjectsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall { + c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall { + 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 *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3278,7 +4367,7 @@ func (c *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *Projects // 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 *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3286,21 +4375,21 @@ func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *Project // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsListCall) 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_ { @@ -3326,15 +4415,15 @@ func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.get" call. -// Exactly one of *GoogleCloudPolicysimulatorV1beta1Replay or error will +// Do executes the "policysimulator.projects.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudPolicysimulatorV1beta1Replay.ServerResponse.Header or (if +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1beta1Replay, error) { +func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3353,7 +4442,7 @@ func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1beta1Replay{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3365,25 +4454,41 @@ func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.replays.get", + // "id": "policysimulator.projects.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1beta1Replay" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3392,6 +4497,27 @@ func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goo } +// 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 *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "policysimulator.projects.locations.replays.results.list": type ProjectsLocationsReplaysResultsListCall struct { diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 058e8f6c162..3ea5083f585 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -1780,7 +1780,7 @@ } } }, - "revision": "20221107", + "revision": "20221110", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2193,6 +2193,20 @@ "description": "Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed.", "type": "string" }, + "retrievableOption": { + "description": "If RETRIEVABLE_ENABLED, attribute values will be retrievabled in the search results.", + "enum": [ + "RETRIEVABLE_OPTION_UNSPECIFIED", + "RETRIEVABLE_ENABLED", + "RETRIEVABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to RETRIEVABLE_DISABLED.", + "Retrievable option enabled for an attribute.", + "Retrievable option disabled for an attribute." + ], + "type": "string" + }, "searchableOption": { "description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes. Must be specified, otherwise throws INVALID_FORMAT error.", "enum": [ diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index a64f31988b2..efdd856ec06 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -1085,6 +1085,18 @@ type GoogleCloudRetailV2CatalogAttribute struct { // `attributes.abc-xyz` cannot be indexed. Key string `json:"key,omitempty"` + // RetrievableOption: If RETRIEVABLE_ENABLED, attribute values will be + // retrievabled in the search results. + // + // Possible values: + // "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset. Defaults + // to RETRIEVABLE_DISABLED. + // "RETRIEVABLE_ENABLED" - Retrievable option enabled for an + // attribute. + // "RETRIEVABLE_DISABLED" - Retrievable option disabled for an + // attribute. + RetrievableOption string `json:"retrievableOption,omitempty"` + // SearchableOption: When AttributesConfig.attribute_config_level is // CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute // values are searchable by text queries in SearchService.Search. If diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 29c102c3196..ee13e67745e 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2095,7 +2095,7 @@ } } }, - "revision": "20221107", + "revision": "20221110", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2789,6 +2789,20 @@ ], "type": "string" }, + "retrievableOption": { + "description": "If RETRIEVABLE_ENABLED, attribute values will be retrievabled in the search results.", + "enum": [ + "RETRIEVABLE_OPTION_UNSPECIFIED", + "RETRIEVABLE_ENABLED", + "RETRIEVABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to RETRIEVABLE_DISABLED.", + "Retrievable option enabled for an attribute.", + "Retrievable option disabled for an attribute." + ], + "type": "string" + }, "searchableOption": { "description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes. Must be specified, otherwise throws INVALID_FORMAT error.", "enum": [ diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 26829093a66..9d1d3d8c5ac 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -1628,6 +1628,18 @@ type GoogleCloudRetailV2alphaCatalogAttribute struct { // enabled. RecommendationsFilteringOption string `json:"recommendationsFilteringOption,omitempty"` + // RetrievableOption: If RETRIEVABLE_ENABLED, attribute values will be + // retrievabled in the search results. + // + // Possible values: + // "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset. Defaults + // to RETRIEVABLE_DISABLED. + // "RETRIEVABLE_ENABLED" - Retrievable option enabled for an + // attribute. + // "RETRIEVABLE_DISABLED" - Retrievable option disabled for an + // attribute. + RetrievableOption string `json:"retrievableOption,omitempty"` + // SearchableOption: When AttributesConfig.attribute_config_level is // CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute // values are searchable by text queries in SearchService.Search. If diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 414dbc398ae..7d9cc789aca 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2024,7 +2024,7 @@ } } }, - "revision": "20221107", + "revision": "20221110", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3362,6 +3362,20 @@ ], "type": "string" }, + "retrievableOption": { + "description": "If RETRIEVABLE_ENABLED, attribute values will be retrievabled in the search results.", + "enum": [ + "RETRIEVABLE_OPTION_UNSPECIFIED", + "RETRIEVABLE_ENABLED", + "RETRIEVABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset. Defaults to RETRIEVABLE_DISABLED.", + "Retrievable option enabled for an attribute.", + "Retrievable option disabled for an attribute." + ], + "type": "string" + }, "searchableOption": { "description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes. Must be specified, otherwise throws INVALID_FORMAT error.", "enum": [ diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index acfb6b36ab0..c8338e70659 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -2782,6 +2782,18 @@ type GoogleCloudRetailV2betaCatalogAttribute struct { // enabled. RecommendationsFilteringOption string `json:"recommendationsFilteringOption,omitempty"` + // RetrievableOption: If RETRIEVABLE_ENABLED, attribute values will be + // retrievabled in the search results. + // + // Possible values: + // "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset. Defaults + // to RETRIEVABLE_DISABLED. + // "RETRIEVABLE_ENABLED" - Retrievable option enabled for an + // attribute. + // "RETRIEVABLE_DISABLED" - Retrievable option disabled for an + // attribute. + RetrievableOption string `json:"retrievableOption,omitempty"` + // SearchableOption: When AttributesConfig.attribute_config_level is // CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute // values are searchable by text queries in SearchService.Search. If diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index f8aaa4abdda..cbe3da07e56 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -542,7 +542,7 @@ } } }, - "revision": "20220907", + "revision": "20221115", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -777,6 +777,11 @@ "description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", "type": "string" }, + "minDeadline": { + "description": "Deprecated, do not use.", + "format": "double", + "type": "number" + }, "operationDeadline": { "description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", "format": "double", @@ -855,6 +860,105 @@ "properties": {}, "type": "object" }, + "ClientLibrarySettings": { + "description": "Details about how and where to publish client libraries.", + "id": "ClientLibrarySettings", + "properties": { + "cppSettings": { + "$ref": "CppSettings", + "description": "Settings for C++ client libraries." + }, + "dotnetSettings": { + "$ref": "DotnetSettings", + "description": "Settings for .NET client libraries." + }, + "goSettings": { + "$ref": "GoSettings", + "description": "Settings for Go client libraries." + }, + "javaSettings": { + "$ref": "JavaSettings", + "description": "Settings for legacy Java features, supported in the Service YAML." + }, + "launchStage": { + "description": "Launch stage of this version of the API.", + "enum": [ + "LAUNCH_STAGE_UNSPECIFIED", + "UNIMPLEMENTED", + "PRELAUNCH", + "EARLY_ACCESS", + "ALPHA", + "BETA", + "GA", + "DEPRECATED" + ], + "enumDescriptions": [ + "Do not use this default value.", + "The feature is not yet implemented. Users can not use it.", + "Prelaunch features are hidden from users and are only visible internally.", + "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", + "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", + "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", + "GA features are open to all developers and are considered stable and fully qualified for production use.", + "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." + ], + "type": "string" + }, + "nodeSettings": { + "$ref": "NodeSettings", + "description": "Settings for Node client libraries." + }, + "phpSettings": { + "$ref": "PhpSettings", + "description": "Settings for PHP client libraries." + }, + "pythonSettings": { + "$ref": "PythonSettings", + "description": "Settings for Python client libraries." + }, + "restNumericEnums": { + "description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", + "type": "boolean" + }, + "rubySettings": { + "$ref": "RubySettings", + "description": "Settings for Ruby client libraries." + }, + "version": { + "description": "Version of the API to apply these settings to.", + "type": "string" + } + }, + "type": "object" + }, + "CommonLanguageSettings": { + "description": "Required information for every language.", + "id": "CommonLanguageSettings", + "properties": { + "destinations": { + "description": "The destination where API teams want this client library to be published.", + "items": { + "enum": [ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + "GITHUB", + "PACKAGE_MANAGER" + ], + "enumDescriptions": [ + "Client libraries will neither be generated nor published to package managers.", + "Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", + "Publish the library to package managers like nuget.org and npmjs.com." + ], + "type": "string" + }, + "type": "array" + }, + "referenceDocsUri": { + "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", + "type": "string" + } + }, + "type": "object" + }, "Context": { "description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", "id": "Context", @@ -909,7 +1013,7 @@ "type": "object" }, "Control": { - "description": "Selects and configures the service controller used by the service. The service controller handles two things: - **What is allowed:** for each API request, Chemist checks the project status, activation status, abuse status, billing status, service status, location restrictions, VPC Service Controls, SuperQuota, and other policies. - **What has happened:** for each API response, Chemist reports the telemetry data to analytics, auditing, billing, eventing, logging, monitoring, sawmill, and tracing. Chemist also accepts telemetry data not associated with API traffic, such as billing metrics. Example: control: environment: servicecontrol.googleapis.com", + "description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", "id": "Control", "properties": { "environment": { @@ -919,6 +1023,17 @@ }, "type": "object" }, + "CppSettings": { + "description": "Settings for C++ client libraries.", + "id": "CppSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "CreateTenancyUnitRequest": { "description": "Request to create a tenancy unit for a service consumer of a managed service.", "id": "CreateTenancyUnitRequest", @@ -1048,6 +1163,17 @@ }, "type": "object" }, + "DotnetSettings": { + "description": "Settings for Dotnet client libraries.", + "id": "DotnetSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1058,6 +1184,13 @@ "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", "id": "Endpoint", "properties": { + "aliases": { + "description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, "allowCors": { "description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", "type": "boolean" @@ -1243,6 +1376,17 @@ }, "type": "object" }, + "GoSettings": { + "description": "Settings for Go client libraries.", + "id": "GoSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Http": { "description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", "id": "Http", @@ -1311,6 +1455,28 @@ }, "type": "object" }, + "JavaSettings": { + "description": "Settings for Java client libraries.", + "id": "JavaSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + }, + "libraryPackage": { + "description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", + "type": "string" + }, + "serviceClassNames": { + "additionalProperties": { + "type": "string" + }, + "description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", + "type": "object" + } + }, + "type": "object" + }, "JwtLocation": { "description": "Specifies a location to extract JWT from an API request.", "id": "JwtLocation", @@ -1464,6 +1630,33 @@ }, "type": "object" }, + "LongRunning": { + "description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", + "id": "LongRunning", + "properties": { + "initialPollDelay": { + "description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", + "format": "google-duration", + "type": "string" + }, + "maxPollDelay": { + "description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", + "format": "google-duration", + "type": "string" + }, + "pollDelayMultiplier": { + "description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", + "format": "float", + "type": "number" + }, + "totalPollTimeout": { + "description": "Total polling timeout. Default value: 5 minutes.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -1510,6 +1703,21 @@ }, "type": "object" }, + "MethodSettings": { + "description": "Describes the generator configuration for a method.", + "id": "MethodSettings", + "properties": { + "longRunning": { + "$ref": "LongRunning", + "description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_behavior: - selector: CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes" + }, + "selector": { + "description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.", + "type": "string" + } + }, + "type": "object" + }, "MetricDescriptor": { "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", "id": "MetricDescriptor", @@ -1785,6 +1993,17 @@ }, "type": "object" }, + "NodeSettings": { + "description": "Settings for Node client libraries.", + "id": "NodeSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "OAuthRequirements": { "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", @@ -1872,6 +2091,17 @@ }, "type": "object" }, + "PhpSettings": { + "description": "Settings for Php client libraries.", + "id": "PhpSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "PolicyBinding": { "description": "Translates to IAM Policy bindings (without auditing at this level)", "id": "PolicyBinding", @@ -1890,6 +2120,83 @@ }, "type": "object" }, + "Publishing": { + "description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", + "id": "Publishing", + "properties": { + "apiShortName": { + "description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", + "type": "string" + }, + "codeownerGithubTeams": { + "description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", + "items": { + "type": "string" + }, + "type": "array" + }, + "docTagPrefix": { + "description": "A prefix used in sample code when demarking regions to be included in documentation.", + "type": "string" + }, + "documentationUri": { + "description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", + "type": "string" + }, + "githubLabel": { + "description": "GitHub label to apply to issues and pull requests opened for this API.", + "type": "string" + }, + "librarySettings": { + "description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", + "items": { + "$ref": "ClientLibrarySettings" + }, + "type": "array" + }, + "methodSettings": { + "description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", + "items": { + "$ref": "MethodSettings" + }, + "type": "array" + }, + "newIssueUri": { + "description": "Link to a place that API users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", + "type": "string" + }, + "organization": { + "description": "For whom the client library is being published.", + "enum": [ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + "CLOUD", + "ADS", + "PHOTOS", + "STREET_VIEW" + ], + "enumDescriptions": [ + "Not useful.", + "Google Cloud Platform Org.", + "Ads (Advertising) Org.", + "Photos Org.", + "Street View Org." + ], + "type": "string" + } + }, + "type": "object" + }, + "PythonSettings": { + "description": "Settings for Python client libraries.", + "id": "PythonSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Quota": { "description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", "id": "Quota", @@ -1976,6 +2283,17 @@ }, "type": "object" }, + "RubySettings": { + "description": "Settings for Ruby client libraries.", + "id": "RubySettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "SearchTenancyUnitsResponse": { "description": "Response for the search query.", "id": "SearchTenancyUnitsResponse", @@ -2097,6 +2415,10 @@ "description": "The Google project that owns this service.", "type": "string" }, + "publishing": { + "$ref": "Publishing", + "description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." + }, "quota": { "$ref": "Quota", "description": "Quota configuration." diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index fd709fef10c..49d9a9b971a 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -629,6 +629,9 @@ type BackendRule struct { // "authorization" header, and sent to the backend. JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Deprecated, do not use. + MinDeadline float64 `json:"minDeadline,omitempty"` + // OperationDeadline: The number of seconds to wait for the completion // of a long running operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` @@ -704,6 +707,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { type NoMethod BackendRule var s1 struct { Deadline gensupport.JSONFloat64 `json:"deadline"` + MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` *NoMethod } @@ -712,6 +716,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return err } s.Deadline = float64(s1.Deadline) + s.MinDeadline = float64(s1.MinDeadline) s.OperationDeadline = float64(s1.OperationDeadline) return nil } @@ -835,6 +840,143 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ClientLibrarySettings: Details about how and where to publish client +// libraries. +type ClientLibrarySettings struct { + // CppSettings: Settings for C++ client libraries. + CppSettings *CppSettings `json:"cppSettings,omitempty"` + + // DotnetSettings: Settings for .NET client libraries. + DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` + + // GoSettings: Settings for Go client libraries. + GoSettings *GoSettings `json:"goSettings,omitempty"` + + // JavaSettings: Settings for legacy Java features, supported in the + // Service YAML. + JavaSettings *JavaSettings `json:"javaSettings,omitempty"` + + // LaunchStage: Launch stage of this version of the API. + // + // Possible values: + // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. + // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not + // use it. + // "PRELAUNCH" - Prelaunch features are hidden from users and are only + // visible internally. + // "EARLY_ACCESS" - Early Access features are limited to a closed + // group of testers. To use these features, you must sign up in advance + // and sign a Trusted Tester agreement (which includes confidentiality + // provisions). These features may be unstable, changed in + // backward-incompatible ways, and are not guaranteed to be released. + // "ALPHA" - Alpha is a limited availability test for releases before + // they are cleared for widespread use. By Alpha, all significant design + // issues are resolved and we are in the process of verifying + // functionality. Alpha customers need to apply for access, agree to + // applicable terms, and have their projects allowlisted. Alpha releases + // don't have to be feature complete, no SLAs are provided, and there + // are no technical support obligations, but they will be far enough + // along that customers can actually use them in test environments or + // for limited-use tests -- just like they would in normal production + // cases. + // "BETA" - Beta is the point at which we are ready to open a release + // for any customer to use. There are no SLA or technical support + // obligations in a Beta release. Products will be complete from a + // feature perspective, but may have some open outstanding issues. Beta + // releases are suitable for limited production use cases. + // "GA" - GA features are open to all developers and are considered + // stable and fully qualified for production use. + // "DEPRECATED" - Deprecated features are scheduled to be shut down + // and removed. For more information, see the "Deprecation Policy" + // section of our [Terms of Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage string `json:"launchStage,omitempty"` + + // NodeSettings: Settings for Node client libraries. + NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` + + // PhpSettings: Settings for PHP client libraries. + PhpSettings *PhpSettings `json:"phpSettings,omitempty"` + + // PythonSettings: Settings for Python client libraries. + PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` + + // RestNumericEnums: When using transport=rest, the client request will + // encode enums as numbers rather than strings. + RestNumericEnums bool `json:"restNumericEnums,omitempty"` + + // RubySettings: Settings for Ruby client libraries. + RubySettings *RubySettings `json:"rubySettings,omitempty"` + + // Version: Version of the API to apply these settings to. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CppSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CppSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientLibrarySettings) MarshalJSON() ([]byte, error) { + type NoMethod ClientLibrarySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CommonLanguageSettings: Required information for every language. +type CommonLanguageSettings struct { + // Destinations: The destination where API teams want this client + // library to be published. + // + // Possible values: + // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will + // neither be generated nor published to package managers. + // "GITHUB" - Generate the client library in a repo under + // github.com/googleapis, but don't publish it to package managers. + // "PACKAGE_MANAGER" - Publish the library to package managers like + // nuget.org and npmjs.com. + Destinations []string `json:"destinations,omitempty"` + + // ReferenceDocsUri: Link to automatically generated reference + // documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommonLanguageSettings) MarshalJSON() ([]byte, error) { + type NoMethod CommonLanguageSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Context: `Context` defines which contexts an API requests. Example: // context: rules: - selector: "*" requested: - // google.rpc.context.ProjectContext - google.rpc.context.OriginContext @@ -928,15 +1070,7 @@ func (s *ContextRule) MarshalJSON() ([]byte, error) { } // Control: Selects and configures the service controller used by the -// service. The service controller handles two things: - **What is -// allowed:** for each API request, Chemist checks the project status, -// activation status, abuse status, billing status, service status, -// location restrictions, VPC Service Controls, SuperQuota, and other -// policies. - **What has happened:** for each API response, Chemist -// reports the telemetry data to analytics, auditing, billing, eventing, -// logging, monitoring, sawmill, and tracing. Chemist also accepts -// telemetry data not associated with API traffic, such as billing -// metrics. Example: control: environment: servicecontrol.googleapis.com +// service. Example: control: environment: servicecontrol.googleapis.com type Control struct { // Environment: The service controller environment to use. If empty, no // control plane feature (like quota and billing) will be enabled. The @@ -966,6 +1100,34 @@ func (s *Control) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CppSettings: Settings for C++ client libraries. +type CppSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CppSettings) MarshalJSON() ([]byte, error) { + type NoMethod CppSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateTenancyUnitRequest: Request to create a tenancy unit for a // service consumer of a managed service. type CreateTenancyUnitRequest struct { @@ -1270,6 +1432,34 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DotnetSettings: Settings for Dotnet client libraries. +type DotnetSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DotnetSettings) MarshalJSON() ([]byte, error) { + type NoMethod DotnetSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1296,6 +1486,12 @@ type Empty struct { // whether the subsequent cross-origin request is allowed # to proceed. // allow_cors: true type Endpoint struct { + // Aliases: Unimplemented. Dot not use. DEPRECATED: This field is no + // longer supported. Instead of using aliases, please specify multiple + // google.api.Endpoint for each of the intended aliases. Additional + // names that this endpoint will be hosted on. + Aliases []string `json:"aliases,omitempty"` + // AllowCors: Allowing CORS // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka // cross-domain traffic, would allow the backends served from this @@ -1314,7 +1510,7 @@ type Endpoint struct { // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCors") to + // ForceSendFields is a list of field names (e.g. "Aliases") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1322,7 +1518,7 @@ type Endpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCors") to include in + // NullFields is a list of field names (e.g. "Aliases") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1503,6 +1699,34 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoSettings: Settings for Go client libraries. +type GoSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Http: Defines the HTTP configuration for an API service. It contains // a list of HttpRule, each specifying the mapping of an RPC method to // one or more HTTP REST API methods. @@ -1767,6 +1991,53 @@ func (s *HttpRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JavaSettings: Settings for Java client libraries. +type JavaSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // LibraryPackage: The package name to use in Java. Clobbers the + // java_package option set in the protobuf. This should be used **only** + // by APIs who have already set the language_settings.java.package_name" + // field in gapic.yaml. API teams should use the protobuf java_package + // option where possible. Example of a YAML configuration:: publishing: + // java_settings: library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `json:"libraryPackage,omitempty"` + + // ServiceClassNames: Configure the Java class name to use instead of + // the service's for its corresponding generated GAPIC client. Keys are + // fully-qualified service names as they appear in the protobuf + // (including the full the language_settings.java.interface_names" field + // in gapic.yaml. API teams should otherwise use the service name as it + // appears in the protobuf. Example of a YAML configuration:: + // publishing: java_settings: service_class_names: - + // google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: + // SubscriptionAdmin + ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JavaSettings) MarshalJSON() ([]byte, error) { + type NoMethod JavaSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JwtLocation: Specifies a location to extract JWT from an API request. type JwtLocation struct { // Cookie: Specifies cookie name to extract JWT token. @@ -2056,6 +2327,64 @@ func (s *LoggingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LongRunning: Describes settings to use when generating API methods +// that use the long-running operation pattern. All default values below +// are from those used in the client library generators (e.g. Java +// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type LongRunning struct { + // InitialPollDelay: Initial delay after which the first poll request + // will be made. Default value: 5 seconds. + InitialPollDelay string `json:"initialPollDelay,omitempty"` + + // MaxPollDelay: Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay string `json:"maxPollDelay,omitempty"` + + // PollDelayMultiplier: Multiplier to gradually increase delay between + // subsequent polls until it reaches max_poll_delay. Default value: 1.5. + PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` + + // TotalPollTimeout: Total polling timeout. Default value: 5 minutes. + TotalPollTimeout string `json:"totalPollTimeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InitialPollDelay") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LongRunning) MarshalJSON() ([]byte, error) { + type NoMethod LongRunning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *LongRunning) UnmarshalJSON(data []byte) error { + type NoMethod LongRunning + var s1 struct { + PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) + return nil +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -2106,6 +2435,45 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodSettings: Describes the generator configuration for a method. +type MethodSettings struct { + // LongRunning: Describes settings to use for long-running operations + // when generating API methods for RPCs. Complements RPCs that use the + // annotations in google/longrunning/operations.proto. Example of a YAML + // configuration:: publishing: method_behavior: - selector: + // CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 + // minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 + // minutes total_poll_timeout: seconds: 54000 # 90 minutes + LongRunning *LongRunning `json:"longRunning,omitempty"` + + // Selector: The fully qualified name of the method, for which the + // options below apply. This is used to find the method to apply the + // options. + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LongRunning") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LongRunning") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MethodSettings) MarshalJSON() ([]byte, error) { + type NoMethod MethodSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetricDescriptor: Defines a metric type and its schema. Once a metric // descriptor is created, deleting or altering it stops data collection // and makes the metric type's existing data unusable. @@ -2683,6 +3051,34 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodeSettings: Settings for Node client libraries. +type NodeSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeSettings) MarshalJSON() ([]byte, error) { + type NoMethod NodeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthRequirements: OAuth scopes are a way to define data and // permissions on data. For example, there are scopes defined for // "Read-only access to Google Calendar" and "Access to Cloud Platform". @@ -2876,6 +3272,34 @@ func (s *Page) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PhpSettings: Settings for Php client libraries. +type PhpSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PhpSettings) MarshalJSON() ([]byte, error) { + type NoMethod PhpSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PolicyBinding: Translates to IAM Policy bindings (without auditing at // this level) type PolicyBinding struct { @@ -2911,6 +3335,108 @@ func (s *PolicyBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Publishing: This message configures the settings for publishing +// Google Cloud Client libraries +// (https://cloud.google.com/apis/docs/cloud-client-libraries) generated +// from the service config. +type Publishing struct { + // ApiShortName: Used as a tracking tag when collecting data about the + // APIs developer relations artifacts like docs, packages delivered to + // package managers, etc. Example: "speech". + ApiShortName string `json:"apiShortName,omitempty"` + + // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the + // directory in GitHub containing source code for the client libraries + // for this API. + CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` + + // DocTagPrefix: A prefix used in sample code when demarking regions to + // be included in documentation. + DocTagPrefix string `json:"docTagPrefix,omitempty"` + + // DocumentationUri: Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `json:"documentationUri,omitempty"` + + // GithubLabel: GitHub label to apply to issues and pull requests opened + // for this API. + GithubLabel string `json:"githubLabel,omitempty"` + + // LibrarySettings: Client library settings. If the same version string + // appears multiple times in this list, then the last one wins. Settings + // from earlier settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` + + // MethodSettings: A list of API method settings, e.g. the behavior for + // methods that use the long-running operation pattern. + MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` + + // NewIssueUri: Link to a place that API users can report issues. + // Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `json:"newIssueUri,omitempty"` + + // Organization: For whom the client library is being published. + // + // Possible values: + // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. + // "CLOUD" - Google Cloud Platform Org. + // "ADS" - Ads (Advertising) Org. + // "PHOTOS" - Photos Org. + // "STREET_VIEW" - Street View Org. + Organization string `json:"organization,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiShortName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiShortName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Publishing) MarshalJSON() ([]byte, error) { + type NoMethod Publishing + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PythonSettings: Settings for Python client libraries. +type PythonSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PythonSettings) MarshalJSON() ([]byte, error) { + type NoMethod PythonSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Quota: Quota configuration helps to achieve fairness and budgeting in // service usage. The metric based quota configuration works this way: - // The service configuration defines a set of metrics. - For API calls, @@ -3088,6 +3614,34 @@ func (s *RemoveTenantProjectRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RubySettings: Settings for Ruby client libraries. +type RubySettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RubySettings) MarshalJSON() ([]byte, error) { + type NoMethod RubySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SearchTenancyUnitsResponse: Response for the search query. type SearchTenancyUnitsResponse struct { // NextPageToken: Pagination token for large results. @@ -3219,6 +3773,11 @@ type Service struct { // ProducerProjectId: The Google project that owns this service. ProducerProjectId string `json:"producerProjectId,omitempty"` + // Publishing: Settings for Google Cloud Client libraries + // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated + // from APIs defined as protocol buffers. + Publishing *Publishing `json:"publishing,omitempty"` + // Quota: Quota configuration. Quota *Quota `json:"quota,omitempty"` diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 29af57f6ae3..0c9e3a4c64d 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -500,7 +500,7 @@ } } }, - "revision": "20220907", + "revision": "20221115", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -686,6 +686,11 @@ "description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", "type": "string" }, + "minDeadline": { + "description": "Deprecated, do not use.", + "format": "double", + "type": "number" + }, "operationDeadline": { "description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", "format": "double", @@ -747,6 +752,105 @@ }, "type": "object" }, + "ClientLibrarySettings": { + "description": "Details about how and where to publish client libraries.", + "id": "ClientLibrarySettings", + "properties": { + "cppSettings": { + "$ref": "CppSettings", + "description": "Settings for C++ client libraries." + }, + "dotnetSettings": { + "$ref": "DotnetSettings", + "description": "Settings for .NET client libraries." + }, + "goSettings": { + "$ref": "GoSettings", + "description": "Settings for Go client libraries." + }, + "javaSettings": { + "$ref": "JavaSettings", + "description": "Settings for legacy Java features, supported in the Service YAML." + }, + "launchStage": { + "description": "Launch stage of this version of the API.", + "enum": [ + "LAUNCH_STAGE_UNSPECIFIED", + "UNIMPLEMENTED", + "PRELAUNCH", + "EARLY_ACCESS", + "ALPHA", + "BETA", + "GA", + "DEPRECATED" + ], + "enumDescriptions": [ + "Do not use this default value.", + "The feature is not yet implemented. Users can not use it.", + "Prelaunch features are hidden from users and are only visible internally.", + "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", + "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", + "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", + "GA features are open to all developers and are considered stable and fully qualified for production use.", + "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." + ], + "type": "string" + }, + "nodeSettings": { + "$ref": "NodeSettings", + "description": "Settings for Node client libraries." + }, + "phpSettings": { + "$ref": "PhpSettings", + "description": "Settings for PHP client libraries." + }, + "pythonSettings": { + "$ref": "PythonSettings", + "description": "Settings for Python client libraries." + }, + "restNumericEnums": { + "description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", + "type": "boolean" + }, + "rubySettings": { + "$ref": "RubySettings", + "description": "Settings for Ruby client libraries." + }, + "version": { + "description": "Version of the API to apply these settings to.", + "type": "string" + } + }, + "type": "object" + }, + "CommonLanguageSettings": { + "description": "Required information for every language.", + "id": "CommonLanguageSettings", + "properties": { + "destinations": { + "description": "The destination where API teams want this client library to be published.", + "items": { + "enum": [ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + "GITHUB", + "PACKAGE_MANAGER" + ], + "enumDescriptions": [ + "Client libraries will neither be generated nor published to package managers.", + "Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", + "Publish the library to package managers like nuget.org and npmjs.com." + ], + "type": "string" + }, + "type": "array" + }, + "referenceDocsUri": { + "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", + "type": "string" + } + }, + "type": "object" + }, "Context": { "description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", "id": "Context", @@ -801,7 +905,7 @@ "type": "object" }, "Control": { - "description": "Selects and configures the service controller used by the service. The service controller handles two things: - **What is allowed:** for each API request, Chemist checks the project status, activation status, abuse status, billing status, service status, location restrictions, VPC Service Controls, SuperQuota, and other policies. - **What has happened:** for each API response, Chemist reports the telemetry data to analytics, auditing, billing, eventing, logging, monitoring, sawmill, and tracing. Chemist also accepts telemetry data not associated with API traffic, such as billing metrics. Example: control: environment: servicecontrol.googleapis.com", + "description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", "id": "Control", "properties": { "environment": { @@ -811,6 +915,17 @@ }, "type": "object" }, + "CppSettings": { + "description": "Settings for C++ client libraries.", + "id": "CppSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "CustomError": { "description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", "id": "CustomError", @@ -918,6 +1033,17 @@ }, "type": "object" }, + "DotnetSettings": { + "description": "Settings for Dotnet client libraries.", + "id": "DotnetSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -928,6 +1054,13 @@ "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", "id": "Endpoint", "properties": { + "aliases": { + "description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, "allowCors": { "description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", "type": "boolean" @@ -1113,6 +1246,17 @@ }, "type": "object" }, + "GoSettings": { + "description": "Settings for Go client libraries.", + "id": "GoSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Http": { "description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", "id": "Http", @@ -1181,6 +1325,28 @@ }, "type": "object" }, + "JavaSettings": { + "description": "Settings for Java client libraries.", + "id": "JavaSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + }, + "libraryPackage": { + "description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", + "type": "string" + }, + "serviceClassNames": { + "additionalProperties": { + "type": "string" + }, + "description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", + "type": "object" + } + }, + "type": "object" + }, "JwtLocation": { "description": "Specifies a location to extract JWT from an API request.", "id": "JwtLocation", @@ -1298,6 +1464,33 @@ }, "type": "object" }, + "LongRunning": { + "description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", + "id": "LongRunning", + "properties": { + "initialPollDelay": { + "description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", + "format": "google-duration", + "type": "string" + }, + "maxPollDelay": { + "description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", + "format": "google-duration", + "type": "string" + }, + "pollDelayMultiplier": { + "description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", + "format": "float", + "type": "number" + }, + "totalPollTimeout": { + "description": "Total polling timeout. Default value: 5 minutes.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -1344,6 +1537,21 @@ }, "type": "object" }, + "MethodSettings": { + "description": "Describes the generator configuration for a method.", + "id": "MethodSettings", + "properties": { + "longRunning": { + "$ref": "LongRunning", + "description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_behavior: - selector: CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes" + }, + "selector": { + "description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.", + "type": "string" + } + }, + "type": "object" + }, "MetricDescriptor": { "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", "id": "MetricDescriptor", @@ -1619,6 +1827,17 @@ }, "type": "object" }, + "NodeSettings": { + "description": "Settings for Node client libraries.", + "id": "NodeSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "OAuthRequirements": { "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", @@ -1706,6 +1925,94 @@ }, "type": "object" }, + "PhpSettings": { + "description": "Settings for Php client libraries.", + "id": "PhpSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, + "Publishing": { + "description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", + "id": "Publishing", + "properties": { + "apiShortName": { + "description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", + "type": "string" + }, + "codeownerGithubTeams": { + "description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", + "items": { + "type": "string" + }, + "type": "array" + }, + "docTagPrefix": { + "description": "A prefix used in sample code when demarking regions to be included in documentation.", + "type": "string" + }, + "documentationUri": { + "description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", + "type": "string" + }, + "githubLabel": { + "description": "GitHub label to apply to issues and pull requests opened for this API.", + "type": "string" + }, + "librarySettings": { + "description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", + "items": { + "$ref": "ClientLibrarySettings" + }, + "type": "array" + }, + "methodSettings": { + "description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", + "items": { + "$ref": "MethodSettings" + }, + "type": "array" + }, + "newIssueUri": { + "description": "Link to a place that API users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", + "type": "string" + }, + "organization": { + "description": "For whom the client library is being published.", + "enum": [ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + "CLOUD", + "ADS", + "PHOTOS", + "STREET_VIEW" + ], + "enumDescriptions": [ + "Not useful.", + "Google Cloud Platform Org.", + "Ads (Advertising) Org.", + "Photos Org.", + "Street View Org." + ], + "type": "string" + } + }, + "type": "object" + }, + "PythonSettings": { + "description": "Settings for Python client libraries.", + "id": "PythonSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Quota": { "description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", "id": "Quota", @@ -1781,6 +2088,17 @@ }, "type": "object" }, + "RubySettings": { + "description": "Settings for Ruby client libraries.", + "id": "RubySettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Service": { "description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", "id": "Service", @@ -1884,6 +2202,10 @@ "description": "The Google project that owns this service.", "type": "string" }, + "publishing": { + "$ref": "Publishing", + "description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." + }, "quota": { "$ref": "Quota", "description": "Quota configuration." diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 385fa10ffd0..a74a0b8e835 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -544,6 +544,9 @@ type BackendRule struct { // "authorization" header, and sent to the backend. JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Deprecated, do not use. + MinDeadline float64 `json:"minDeadline,omitempty"` + // OperationDeadline: The number of seconds to wait for the completion // of a long running operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` @@ -619,6 +622,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { type NoMethod BackendRule var s1 struct { Deadline gensupport.JSONFloat64 `json:"deadline"` + MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` *NoMethod } @@ -627,6 +631,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return err } s.Deadline = float64(s1.Deadline) + s.MinDeadline = float64(s1.MinDeadline) s.OperationDeadline = float64(s1.OperationDeadline) return nil } @@ -714,6 +719,143 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ClientLibrarySettings: Details about how and where to publish client +// libraries. +type ClientLibrarySettings struct { + // CppSettings: Settings for C++ client libraries. + CppSettings *CppSettings `json:"cppSettings,omitempty"` + + // DotnetSettings: Settings for .NET client libraries. + DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` + + // GoSettings: Settings for Go client libraries. + GoSettings *GoSettings `json:"goSettings,omitempty"` + + // JavaSettings: Settings for legacy Java features, supported in the + // Service YAML. + JavaSettings *JavaSettings `json:"javaSettings,omitempty"` + + // LaunchStage: Launch stage of this version of the API. + // + // Possible values: + // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. + // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not + // use it. + // "PRELAUNCH" - Prelaunch features are hidden from users and are only + // visible internally. + // "EARLY_ACCESS" - Early Access features are limited to a closed + // group of testers. To use these features, you must sign up in advance + // and sign a Trusted Tester agreement (which includes confidentiality + // provisions). These features may be unstable, changed in + // backward-incompatible ways, and are not guaranteed to be released. + // "ALPHA" - Alpha is a limited availability test for releases before + // they are cleared for widespread use. By Alpha, all significant design + // issues are resolved and we are in the process of verifying + // functionality. Alpha customers need to apply for access, agree to + // applicable terms, and have their projects allowlisted. Alpha releases + // don't have to be feature complete, no SLAs are provided, and there + // are no technical support obligations, but they will be far enough + // along that customers can actually use them in test environments or + // for limited-use tests -- just like they would in normal production + // cases. + // "BETA" - Beta is the point at which we are ready to open a release + // for any customer to use. There are no SLA or technical support + // obligations in a Beta release. Products will be complete from a + // feature perspective, but may have some open outstanding issues. Beta + // releases are suitable for limited production use cases. + // "GA" - GA features are open to all developers and are considered + // stable and fully qualified for production use. + // "DEPRECATED" - Deprecated features are scheduled to be shut down + // and removed. For more information, see the "Deprecation Policy" + // section of our [Terms of Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage string `json:"launchStage,omitempty"` + + // NodeSettings: Settings for Node client libraries. + NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` + + // PhpSettings: Settings for PHP client libraries. + PhpSettings *PhpSettings `json:"phpSettings,omitempty"` + + // PythonSettings: Settings for Python client libraries. + PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` + + // RestNumericEnums: When using transport=rest, the client request will + // encode enums as numbers rather than strings. + RestNumericEnums bool `json:"restNumericEnums,omitempty"` + + // RubySettings: Settings for Ruby client libraries. + RubySettings *RubySettings `json:"rubySettings,omitempty"` + + // Version: Version of the API to apply these settings to. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CppSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CppSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientLibrarySettings) MarshalJSON() ([]byte, error) { + type NoMethod ClientLibrarySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CommonLanguageSettings: Required information for every language. +type CommonLanguageSettings struct { + // Destinations: The destination where API teams want this client + // library to be published. + // + // Possible values: + // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will + // neither be generated nor published to package managers. + // "GITHUB" - Generate the client library in a repo under + // github.com/googleapis, but don't publish it to package managers. + // "PACKAGE_MANAGER" - Publish the library to package managers like + // nuget.org and npmjs.com. + Destinations []string `json:"destinations,omitempty"` + + // ReferenceDocsUri: Link to automatically generated reference + // documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommonLanguageSettings) MarshalJSON() ([]byte, error) { + type NoMethod CommonLanguageSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Context: `Context` defines which contexts an API requests. Example: // context: rules: - selector: "*" requested: - // google.rpc.context.ProjectContext - google.rpc.context.OriginContext @@ -807,15 +949,7 @@ func (s *ContextRule) MarshalJSON() ([]byte, error) { } // Control: Selects and configures the service controller used by the -// service. The service controller handles two things: - **What is -// allowed:** for each API request, Chemist checks the project status, -// activation status, abuse status, billing status, service status, -// location restrictions, VPC Service Controls, SuperQuota, and other -// policies. - **What has happened:** for each API response, Chemist -// reports the telemetry data to analytics, auditing, billing, eventing, -// logging, monitoring, sawmill, and tracing. Chemist also accepts -// telemetry data not associated with API traffic, such as billing -// metrics. Example: control: environment: servicecontrol.googleapis.com +// service. Example: control: environment: servicecontrol.googleapis.com type Control struct { // Environment: The service controller environment to use. If empty, no // control plane feature (like quota and billing) will be enabled. The @@ -845,6 +979,34 @@ func (s *Control) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CppSettings: Settings for C++ client libraries. +type CppSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CppSettings) MarshalJSON() ([]byte, error) { + type NoMethod CppSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CustomError: Customize service error responses. For example, list any // service specific protobuf types that can appear in error detail lists // of error responses. Example: custom_error: types: - @@ -1084,6 +1246,34 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DotnetSettings: Settings for Dotnet client libraries. +type DotnetSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DotnetSettings) MarshalJSON() ([]byte, error) { + type NoMethod DotnetSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1107,6 +1297,12 @@ type Empty struct { // whether the subsequent cross-origin request is allowed # to proceed. // allow_cors: true type Endpoint struct { + // Aliases: Unimplemented. Dot not use. DEPRECATED: This field is no + // longer supported. Instead of using aliases, please specify multiple + // google.api.Endpoint for each of the intended aliases. Additional + // names that this endpoint will be hosted on. + Aliases []string `json:"aliases,omitempty"` + // AllowCors: Allowing CORS // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka // cross-domain traffic, would allow the backends served from this @@ -1125,7 +1321,7 @@ type Endpoint struct { // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCors") to + // ForceSendFields is a list of field names (e.g. "Aliases") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1133,7 +1329,7 @@ type Endpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCors") to include in + // NullFields is a list of field names (e.g. "Aliases") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1314,6 +1510,34 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoSettings: Settings for Go client libraries. +type GoSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Http: Defines the HTTP configuration for an API service. It contains // a list of HttpRule, each specifying the mapping of an RPC method to // one or more HTTP REST API methods. @@ -1578,6 +1802,53 @@ func (s *HttpRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JavaSettings: Settings for Java client libraries. +type JavaSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // LibraryPackage: The package name to use in Java. Clobbers the + // java_package option set in the protobuf. This should be used **only** + // by APIs who have already set the language_settings.java.package_name" + // field in gapic.yaml. API teams should use the protobuf java_package + // option where possible. Example of a YAML configuration:: publishing: + // java_settings: library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `json:"libraryPackage,omitempty"` + + // ServiceClassNames: Configure the Java class name to use instead of + // the service's for its corresponding generated GAPIC client. Keys are + // fully-qualified service names as they appear in the protobuf + // (including the full the language_settings.java.interface_names" field + // in gapic.yaml. API teams should otherwise use the service name as it + // appears in the protobuf. Example of a YAML configuration:: + // publishing: java_settings: service_class_names: - + // google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: + // SubscriptionAdmin + ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JavaSettings) MarshalJSON() ([]byte, error) { + type NoMethod JavaSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JwtLocation: Specifies a location to extract JWT from an API request. type JwtLocation struct { // Cookie: Specifies cookie name to extract JWT token. @@ -1795,6 +2066,64 @@ func (s *LoggingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LongRunning: Describes settings to use when generating API methods +// that use the long-running operation pattern. All default values below +// are from those used in the client library generators (e.g. Java +// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type LongRunning struct { + // InitialPollDelay: Initial delay after which the first poll request + // will be made. Default value: 5 seconds. + InitialPollDelay string `json:"initialPollDelay,omitempty"` + + // MaxPollDelay: Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay string `json:"maxPollDelay,omitempty"` + + // PollDelayMultiplier: Multiplier to gradually increase delay between + // subsequent polls until it reaches max_poll_delay. Default value: 1.5. + PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` + + // TotalPollTimeout: Total polling timeout. Default value: 5 minutes. + TotalPollTimeout string `json:"totalPollTimeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InitialPollDelay") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LongRunning) MarshalJSON() ([]byte, error) { + type NoMethod LongRunning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *LongRunning) UnmarshalJSON(data []byte) error { + type NoMethod LongRunning + var s1 struct { + PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) + return nil +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -1845,6 +2174,45 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodSettings: Describes the generator configuration for a method. +type MethodSettings struct { + // LongRunning: Describes settings to use for long-running operations + // when generating API methods for RPCs. Complements RPCs that use the + // annotations in google/longrunning/operations.proto. Example of a YAML + // configuration:: publishing: method_behavior: - selector: + // CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 + // minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 + // minutes total_poll_timeout: seconds: 54000 # 90 minutes + LongRunning *LongRunning `json:"longRunning,omitempty"` + + // Selector: The fully qualified name of the method, for which the + // options below apply. This is used to find the method to apply the + // options. + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LongRunning") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LongRunning") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MethodSettings) MarshalJSON() ([]byte, error) { + type NoMethod MethodSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetricDescriptor: Defines a metric type and its schema. Once a metric // descriptor is created, deleting or altering it stops data collection // and makes the metric type's existing data unusable. @@ -2422,6 +2790,34 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodeSettings: Settings for Node client libraries. +type NodeSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeSettings) MarshalJSON() ([]byte, error) { + type NoMethod NodeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthRequirements: OAuth scopes are a way to define data and // permissions on data. For example, there are scopes defined for // "Read-only access to Google Calendar" and "Access to Cloud Platform". @@ -2615,6 +3011,136 @@ func (s *Page) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PhpSettings: Settings for Php client libraries. +type PhpSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PhpSettings) MarshalJSON() ([]byte, error) { + type NoMethod PhpSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Publishing: This message configures the settings for publishing +// Google Cloud Client libraries +// (https://cloud.google.com/apis/docs/cloud-client-libraries) generated +// from the service config. +type Publishing struct { + // ApiShortName: Used as a tracking tag when collecting data about the + // APIs developer relations artifacts like docs, packages delivered to + // package managers, etc. Example: "speech". + ApiShortName string `json:"apiShortName,omitempty"` + + // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the + // directory in GitHub containing source code for the client libraries + // for this API. + CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` + + // DocTagPrefix: A prefix used in sample code when demarking regions to + // be included in documentation. + DocTagPrefix string `json:"docTagPrefix,omitempty"` + + // DocumentationUri: Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `json:"documentationUri,omitempty"` + + // GithubLabel: GitHub label to apply to issues and pull requests opened + // for this API. + GithubLabel string `json:"githubLabel,omitempty"` + + // LibrarySettings: Client library settings. If the same version string + // appears multiple times in this list, then the last one wins. Settings + // from earlier settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` + + // MethodSettings: A list of API method settings, e.g. the behavior for + // methods that use the long-running operation pattern. + MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` + + // NewIssueUri: Link to a place that API users can report issues. + // Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `json:"newIssueUri,omitempty"` + + // Organization: For whom the client library is being published. + // + // Possible values: + // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. + // "CLOUD" - Google Cloud Platform Org. + // "ADS" - Ads (Advertising) Org. + // "PHOTOS" - Photos Org. + // "STREET_VIEW" - Street View Org. + Organization string `json:"organization,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiShortName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiShortName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Publishing) MarshalJSON() ([]byte, error) { + type NoMethod Publishing + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PythonSettings: Settings for Python client libraries. +type PythonSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PythonSettings) MarshalJSON() ([]byte, error) { + type NoMethod PythonSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Quota: Quota configuration helps to achieve fairness and budgeting in // service usage. The metric based quota configuration works this way: - // The service configuration defines a set of metrics. - For API calls, @@ -2763,6 +3289,34 @@ func (s *QuotaLimit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RubySettings: Settings for Ruby client libraries. +type RubySettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RubySettings) MarshalJSON() ([]byte, error) { + type NoMethod RubySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Service: `Service` is the root object of Google API service // configuration (service config). It describes the basic information // about a logical service, such as the service name and the user-facing @@ -2859,6 +3413,11 @@ type Service struct { // ProducerProjectId: The Google project that owns this service. ProducerProjectId string `json:"producerProjectId,omitempty"` + // Publishing: Settings for Google Cloud Client libraries + // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated + // from APIs defined as protocol buffers. + Publishing *Publishing `json:"publishing,omitempty"` + // Quota: Quota configuration. Quota *Quota `json:"quota,omitempty"` diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index b20e57f150a..df0676133af 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -865,7 +865,7 @@ } } }, - "revision": "20220904", + "revision": "20221115", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1236,6 +1236,11 @@ "description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", "type": "string" }, + "minDeadline": { + "description": "Deprecated, do not use.", + "format": "double", + "type": "number" + }, "operationDeadline": { "description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", "format": "double", @@ -1303,6 +1308,77 @@ "properties": {}, "type": "object" }, + "ClientLibrarySettings": { + "description": "Details about how and where to publish client libraries.", + "id": "ClientLibrarySettings", + "properties": { + "cppSettings": { + "$ref": "CppSettings", + "description": "Settings for C++ client libraries." + }, + "dotnetSettings": { + "$ref": "DotnetSettings", + "description": "Settings for .NET client libraries." + }, + "goSettings": { + "$ref": "GoSettings", + "description": "Settings for Go client libraries." + }, + "javaSettings": { + "$ref": "JavaSettings", + "description": "Settings for legacy Java features, supported in the Service YAML." + }, + "launchStage": { + "description": "Launch stage of this version of the API.", + "enum": [ + "LAUNCH_STAGE_UNSPECIFIED", + "UNIMPLEMENTED", + "PRELAUNCH", + "EARLY_ACCESS", + "ALPHA", + "BETA", + "GA", + "DEPRECATED" + ], + "enumDescriptions": [ + "Do not use this default value.", + "The feature is not yet implemented. Users can not use it.", + "Prelaunch features are hidden from users and are only visible internally.", + "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", + "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", + "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", + "GA features are open to all developers and are considered stable and fully qualified for production use.", + "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." + ], + "type": "string" + }, + "nodeSettings": { + "$ref": "NodeSettings", + "description": "Settings for Node client libraries." + }, + "phpSettings": { + "$ref": "PhpSettings", + "description": "Settings for PHP client libraries." + }, + "pythonSettings": { + "$ref": "PythonSettings", + "description": "Settings for Python client libraries." + }, + "restNumericEnums": { + "description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", + "type": "boolean" + }, + "rubySettings": { + "$ref": "RubySettings", + "description": "Settings for Ruby client libraries." + }, + "version": { + "description": "Version of the API to apply these settings to.", + "type": "string" + } + }, + "type": "object" + }, "CloudSQLConfig": { "description": "Cloud SQL configuration.", "id": "CloudSQLConfig", @@ -1323,6 +1399,34 @@ }, "type": "object" }, + "CommonLanguageSettings": { + "description": "Required information for every language.", + "id": "CommonLanguageSettings", + "properties": { + "destinations": { + "description": "The destination where API teams want this client library to be published.", + "items": { + "enum": [ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + "GITHUB", + "PACKAGE_MANAGER" + ], + "enumDescriptions": [ + "Client libraries will neither be generated nor published to package managers.", + "Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", + "Publish the library to package managers like nuget.org and npmjs.com." + ], + "type": "string" + }, + "type": "array" + }, + "referenceDocsUri": { + "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", + "type": "string" + } + }, + "type": "object" + }, "Connection": { "description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", "id": "Connection", @@ -1495,7 +1599,7 @@ "type": "object" }, "Control": { - "description": "Selects and configures the service controller used by the service. The service controller handles two things: - **What is allowed:** for each API request, Chemist checks the project status, activation status, abuse status, billing status, service status, location restrictions, VPC Service Controls, SuperQuota, and other policies. - **What has happened:** for each API response, Chemist reports the telemetry data to analytics, auditing, billing, eventing, logging, monitoring, sawmill, and tracing. Chemist also accepts telemetry data not associated with API traffic, such as billing metrics. Example: control: environment: servicecontrol.googleapis.com", + "description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", "id": "Control", "properties": { "environment": { @@ -1505,6 +1609,17 @@ }, "type": "object" }, + "CppSettings": { + "description": "Settings for C++ client libraries.", + "id": "CppSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "CustomError": { "description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", "id": "CustomError", @@ -1688,6 +1803,17 @@ }, "type": "object" }, + "DotnetSettings": { + "description": "Settings for Dotnet client libraries.", + "id": "DotnetSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1709,6 +1835,13 @@ "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", "id": "Endpoint", "properties": { + "aliases": { + "description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, "allowCors": { "description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", "type": "boolean" @@ -1894,6 +2027,17 @@ }, "type": "object" }, + "GoSettings": { + "description": "Settings for Go client libraries.", + "id": "GoSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange": { "description": "Allocated IP address ranges for this private service access connection.", "id": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange", @@ -2031,6 +2175,28 @@ }, "type": "object" }, + "JavaSettings": { + "description": "Settings for Java client libraries.", + "id": "JavaSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + }, + "libraryPackage": { + "description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", + "type": "string" + }, + "serviceClassNames": { + "additionalProperties": { + "type": "string" + }, + "description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", + "type": "object" + } + }, + "type": "object" + }, "JwtLocation": { "description": "Specifies a location to extract JWT from an API request.", "id": "JwtLocation", @@ -2194,6 +2360,33 @@ }, "type": "object" }, + "LongRunning": { + "description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", + "id": "LongRunning", + "properties": { + "initialPollDelay": { + "description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", + "format": "google-duration", + "type": "string" + }, + "maxPollDelay": { + "description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", + "format": "google-duration", + "type": "string" + }, + "pollDelayMultiplier": { + "description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", + "format": "float", + "type": "number" + }, + "totalPollTimeout": { + "description": "Total polling timeout. Default value: 5 minutes.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -2240,6 +2433,21 @@ }, "type": "object" }, + "MethodSettings": { + "description": "Describes the generator configuration for a method.", + "id": "MethodSettings", + "properties": { + "longRunning": { + "$ref": "LongRunning", + "description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_behavior: - selector: CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes" + }, + "selector": { + "description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.", + "type": "string" + } + }, + "type": "object" + }, "MetricDescriptor": { "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", "id": "MetricDescriptor", @@ -2515,6 +2723,17 @@ }, "type": "object" }, + "NodeSettings": { + "description": "Settings for Node client libraries.", + "id": "NodeSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "OAuthRequirements": { "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", @@ -2629,6 +2848,17 @@ "properties": {}, "type": "object" }, + "PhpSettings": { + "description": "Settings for Php client libraries.", + "id": "PhpSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "PolicyBinding": { "description": "Grouping of IAM role and IAM member.", "id": "PolicyBinding", @@ -2644,6 +2874,83 @@ }, "type": "object" }, + "Publishing": { + "description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", + "id": "Publishing", + "properties": { + "apiShortName": { + "description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", + "type": "string" + }, + "codeownerGithubTeams": { + "description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", + "items": { + "type": "string" + }, + "type": "array" + }, + "docTagPrefix": { + "description": "A prefix used in sample code when demarking regions to be included in documentation.", + "type": "string" + }, + "documentationUri": { + "description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", + "type": "string" + }, + "githubLabel": { + "description": "GitHub label to apply to issues and pull requests opened for this API.", + "type": "string" + }, + "librarySettings": { + "description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", + "items": { + "$ref": "ClientLibrarySettings" + }, + "type": "array" + }, + "methodSettings": { + "description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", + "items": { + "$ref": "MethodSettings" + }, + "type": "array" + }, + "newIssueUri": { + "description": "Link to a place that API users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", + "type": "string" + }, + "organization": { + "description": "For whom the client library is being published.", + "enum": [ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + "CLOUD", + "ADS", + "PHOTOS", + "STREET_VIEW" + ], + "enumDescriptions": [ + "Not useful.", + "Google Cloud Platform Org.", + "Ads (Advertising) Org.", + "Photos Org.", + "Street View Org." + ], + "type": "string" + } + }, + "type": "object" + }, + "PythonSettings": { + "description": "Settings for Python client libraries.", + "id": "PythonSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Quota": { "description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", "id": "Quota", @@ -2849,6 +3156,17 @@ }, "type": "object" }, + "RubySettings": { + "description": "Settings for Ruby client libraries.", + "id": "RubySettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "SearchRangeRequest": { "description": "Request to search for an unused range within allocated ranges.", "id": "SearchRangeRequest", @@ -3005,6 +3323,10 @@ "description": "The Google project that owns this service.", "type": "string" }, + "publishing": { + "$ref": "Publishing", + "description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." + }, "quota": { "$ref": "Quota", "description": "Quota configuration." diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index de596217e69..3c560e29b9a 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -949,6 +949,9 @@ type BackendRule struct { // "authorization" header, and sent to the backend. JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Deprecated, do not use. + MinDeadline float64 `json:"minDeadline,omitempty"` + // OperationDeadline: The number of seconds to wait for the completion // of a long running operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` @@ -1024,6 +1027,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { type NoMethod BackendRule var s1 struct { Deadline gensupport.JSONFloat64 `json:"deadline"` + MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` *NoMethod } @@ -1032,6 +1036,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return err } s.Deadline = float64(s1.Deadline) + s.MinDeadline = float64(s1.MinDeadline) s.OperationDeadline = float64(s1.OperationDeadline) return nil } @@ -1124,6 +1129,101 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ClientLibrarySettings: Details about how and where to publish client +// libraries. +type ClientLibrarySettings struct { + // CppSettings: Settings for C++ client libraries. + CppSettings *CppSettings `json:"cppSettings,omitempty"` + + // DotnetSettings: Settings for .NET client libraries. + DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` + + // GoSettings: Settings for Go client libraries. + GoSettings *GoSettings `json:"goSettings,omitempty"` + + // JavaSettings: Settings for legacy Java features, supported in the + // Service YAML. + JavaSettings *JavaSettings `json:"javaSettings,omitempty"` + + // LaunchStage: Launch stage of this version of the API. + // + // Possible values: + // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. + // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not + // use it. + // "PRELAUNCH" - Prelaunch features are hidden from users and are only + // visible internally. + // "EARLY_ACCESS" - Early Access features are limited to a closed + // group of testers. To use these features, you must sign up in advance + // and sign a Trusted Tester agreement (which includes confidentiality + // provisions). These features may be unstable, changed in + // backward-incompatible ways, and are not guaranteed to be released. + // "ALPHA" - Alpha is a limited availability test for releases before + // they are cleared for widespread use. By Alpha, all significant design + // issues are resolved and we are in the process of verifying + // functionality. Alpha customers need to apply for access, agree to + // applicable terms, and have their projects allowlisted. Alpha releases + // don't have to be feature complete, no SLAs are provided, and there + // are no technical support obligations, but they will be far enough + // along that customers can actually use them in test environments or + // for limited-use tests -- just like they would in normal production + // cases. + // "BETA" - Beta is the point at which we are ready to open a release + // for any customer to use. There are no SLA or technical support + // obligations in a Beta release. Products will be complete from a + // feature perspective, but may have some open outstanding issues. Beta + // releases are suitable for limited production use cases. + // "GA" - GA features are open to all developers and are considered + // stable and fully qualified for production use. + // "DEPRECATED" - Deprecated features are scheduled to be shut down + // and removed. For more information, see the "Deprecation Policy" + // section of our [Terms of Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage string `json:"launchStage,omitempty"` + + // NodeSettings: Settings for Node client libraries. + NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` + + // PhpSettings: Settings for PHP client libraries. + PhpSettings *PhpSettings `json:"phpSettings,omitempty"` + + // PythonSettings: Settings for Python client libraries. + PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` + + // RestNumericEnums: When using transport=rest, the client request will + // encode enums as numbers rather than strings. + RestNumericEnums bool `json:"restNumericEnums,omitempty"` + + // RubySettings: Settings for Ruby client libraries. + RubySettings *RubySettings `json:"rubySettings,omitempty"` + + // Version: Version of the API to apply these settings to. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CppSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CppSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientLibrarySettings) MarshalJSON() ([]byte, error) { + type NoMethod ClientLibrarySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CloudSQLConfig: Cloud SQL configuration. type CloudSQLConfig struct { // Service: Peering service used for peering with the Cloud SQL project. @@ -1160,6 +1260,48 @@ func (s *CloudSQLConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CommonLanguageSettings: Required information for every language. +type CommonLanguageSettings struct { + // Destinations: The destination where API teams want this client + // library to be published. + // + // Possible values: + // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will + // neither be generated nor published to package managers. + // "GITHUB" - Generate the client library in a repo under + // github.com/googleapis, but don't publish it to package managers. + // "PACKAGE_MANAGER" - Publish the library to package managers like + // nuget.org and npmjs.com. + Destinations []string `json:"destinations,omitempty"` + + // ReferenceDocsUri: Link to automatically generated reference + // documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommonLanguageSettings) MarshalJSON() ([]byte, error) { + type NoMethod CommonLanguageSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Connection: Represents a private connection resource. A private // connection is implemented as a VPC Network Peering connection between // a service producer's VPC network and a service consumer's VPC @@ -1429,15 +1571,7 @@ func (s *ContextRule) MarshalJSON() ([]byte, error) { } // Control: Selects and configures the service controller used by the -// service. The service controller handles two things: - **What is -// allowed:** for each API request, Chemist checks the project status, -// activation status, abuse status, billing status, service status, -// location restrictions, VPC Service Controls, SuperQuota, and other -// policies. - **What has happened:** for each API response, Chemist -// reports the telemetry data to analytics, auditing, billing, eventing, -// logging, monitoring, sawmill, and tracing. Chemist also accepts -// telemetry data not associated with API traffic, such as billing -// metrics. Example: control: environment: servicecontrol.googleapis.com +// service. Example: control: environment: servicecontrol.googleapis.com type Control struct { // Environment: The service controller environment to use. If empty, no // control plane feature (like quota and billing) will be enabled. The @@ -1467,6 +1601,34 @@ func (s *Control) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CppSettings: Settings for C++ client libraries. +type CppSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CppSettings) MarshalJSON() ([]byte, error) { + type NoMethod CppSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CustomError: Customize service error responses. For example, list any // service specific protobuf types that can appear in error detail lists // of error responses. Example: custom_error: types: - @@ -1858,6 +2020,34 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DotnetSettings: Settings for Dotnet client libraries. +type DotnetSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DotnetSettings) MarshalJSON() ([]byte, error) { + type NoMethod DotnetSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1917,6 +2107,12 @@ func (s *EnableVpcServiceControlsRequest) MarshalJSON() ([]byte, error) { // whether the subsequent cross-origin request is allowed # to proceed. // allow_cors: true type Endpoint struct { + // Aliases: Unimplemented. Dot not use. DEPRECATED: This field is no + // longer supported. Instead of using aliases, please specify multiple + // google.api.Endpoint for each of the intended aliases. Additional + // names that this endpoint will be hosted on. + Aliases []string `json:"aliases,omitempty"` + // AllowCors: Allowing CORS // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka // cross-domain traffic, would allow the backends served from this @@ -1935,7 +2131,7 @@ type Endpoint struct { // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCors") to + // ForceSendFields is a list of field names (e.g. "Aliases") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1943,7 +2139,7 @@ type Endpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCors") to include in + // NullFields is a list of field names (e.g. "Aliases") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2124,6 +2320,34 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoSettings: Settings for Go client libraries. +type GoSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudServicenetworkingV1ConsumerConfigReservedRange: Allocated // IP address ranges for this private service access connection. type GoogleCloudServicenetworkingV1ConsumerConfigReservedRange struct { @@ -2519,6 +2743,53 @@ func (s *HttpRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JavaSettings: Settings for Java client libraries. +type JavaSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // LibraryPackage: The package name to use in Java. Clobbers the + // java_package option set in the protobuf. This should be used **only** + // by APIs who have already set the language_settings.java.package_name" + // field in gapic.yaml. API teams should use the protobuf java_package + // option where possible. Example of a YAML configuration:: publishing: + // java_settings: library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `json:"libraryPackage,omitempty"` + + // ServiceClassNames: Configure the Java class name to use instead of + // the service's for its corresponding generated GAPIC client. Keys are + // fully-qualified service names as they appear in the protobuf + // (including the full the language_settings.java.interface_names" field + // in gapic.yaml. API teams should otherwise use the service name as it + // appears in the protobuf. Example of a YAML configuration:: + // publishing: java_settings: service_class_names: - + // google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: + // SubscriptionAdmin + ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JavaSettings) MarshalJSON() ([]byte, error) { + type NoMethod JavaSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JwtLocation: Specifies a location to extract JWT from an API request. type JwtLocation struct { // Cookie: Specifies cookie name to extract JWT token. @@ -2840,6 +3111,64 @@ func (s *LoggingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LongRunning: Describes settings to use when generating API methods +// that use the long-running operation pattern. All default values below +// are from those used in the client library generators (e.g. Java +// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type LongRunning struct { + // InitialPollDelay: Initial delay after which the first poll request + // will be made. Default value: 5 seconds. + InitialPollDelay string `json:"initialPollDelay,omitempty"` + + // MaxPollDelay: Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay string `json:"maxPollDelay,omitempty"` + + // PollDelayMultiplier: Multiplier to gradually increase delay between + // subsequent polls until it reaches max_poll_delay. Default value: 1.5. + PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` + + // TotalPollTimeout: Total polling timeout. Default value: 5 minutes. + TotalPollTimeout string `json:"totalPollTimeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InitialPollDelay") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LongRunning) MarshalJSON() ([]byte, error) { + type NoMethod LongRunning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *LongRunning) UnmarshalJSON(data []byte) error { + type NoMethod LongRunning + var s1 struct { + PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) + return nil +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -2890,6 +3219,45 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodSettings: Describes the generator configuration for a method. +type MethodSettings struct { + // LongRunning: Describes settings to use for long-running operations + // when generating API methods for RPCs. Complements RPCs that use the + // annotations in google/longrunning/operations.proto. Example of a YAML + // configuration:: publishing: method_behavior: - selector: + // CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 + // minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 + // minutes total_poll_timeout: seconds: 54000 # 90 minutes + LongRunning *LongRunning `json:"longRunning,omitempty"` + + // Selector: The fully qualified name of the method, for which the + // options below apply. This is used to find the method to apply the + // options. + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LongRunning") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LongRunning") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MethodSettings) MarshalJSON() ([]byte, error) { + type NoMethod MethodSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetricDescriptor: Defines a metric type and its schema. Once a metric // descriptor is created, deleting or altering it stops data collection // and makes the metric type's existing data unusable. @@ -3467,6 +3835,34 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodeSettings: Settings for Node client libraries. +type NodeSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeSettings) MarshalJSON() ([]byte, error) { + type NoMethod NodeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthRequirements: OAuth scopes are a way to define data and // permissions on data. For example, there are scopes defined for // "Read-only access to Google Calendar" and "Access to Cloud Platform". @@ -3708,6 +4104,34 @@ func (s *PeeredDnsDomain) MarshalJSON() ([]byte, error) { type PeeredDnsDomainMetadata struct { } +// PhpSettings: Settings for Php client libraries. +type PhpSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PhpSettings) MarshalJSON() ([]byte, error) { + type NoMethod PhpSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PolicyBinding: Grouping of IAM role and IAM member. type PolicyBinding struct { // Member: Required. Member to bind the role with. See @@ -3746,6 +4170,108 @@ func (s *PolicyBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Publishing: This message configures the settings for publishing +// Google Cloud Client libraries +// (https://cloud.google.com/apis/docs/cloud-client-libraries) generated +// from the service config. +type Publishing struct { + // ApiShortName: Used as a tracking tag when collecting data about the + // APIs developer relations artifacts like docs, packages delivered to + // package managers, etc. Example: "speech". + ApiShortName string `json:"apiShortName,omitempty"` + + // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the + // directory in GitHub containing source code for the client libraries + // for this API. + CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` + + // DocTagPrefix: A prefix used in sample code when demarking regions to + // be included in documentation. + DocTagPrefix string `json:"docTagPrefix,omitempty"` + + // DocumentationUri: Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `json:"documentationUri,omitempty"` + + // GithubLabel: GitHub label to apply to issues and pull requests opened + // for this API. + GithubLabel string `json:"githubLabel,omitempty"` + + // LibrarySettings: Client library settings. If the same version string + // appears multiple times in this list, then the last one wins. Settings + // from earlier settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` + + // MethodSettings: A list of API method settings, e.g. the behavior for + // methods that use the long-running operation pattern. + MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` + + // NewIssueUri: Link to a place that API users can report issues. + // Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `json:"newIssueUri,omitempty"` + + // Organization: For whom the client library is being published. + // + // Possible values: + // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. + // "CLOUD" - Google Cloud Platform Org. + // "ADS" - Ads (Advertising) Org. + // "PHOTOS" - Photos Org. + // "STREET_VIEW" - Street View Org. + Organization string `json:"organization,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiShortName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiShortName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Publishing) MarshalJSON() ([]byte, error) { + type NoMethod Publishing + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PythonSettings: Settings for Python client libraries. +type PythonSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PythonSettings) MarshalJSON() ([]byte, error) { + type NoMethod PythonSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Quota: Quota configuration helps to achieve fairness and budgeting in // service usage. The metric based quota configuration works this way: - // The service configuration defines a set of metrics. - For API calls, @@ -4124,6 +4650,34 @@ func (s *Route) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RubySettings: Settings for Ruby client libraries. +type RubySettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RubySettings) MarshalJSON() ([]byte, error) { + type NoMethod RubySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SearchRangeRequest: Request to search for an unused range within // allocated ranges. type SearchRangeRequest struct { @@ -4342,6 +4896,11 @@ type Service struct { // ProducerProjectId: The Google project that owns this service. ProducerProjectId string `json:"producerProjectId,omitempty"` + // Publishing: Settings for Google Cloud Client libraries + // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated + // from APIs defined as protocol buffers. + Publishing *Publishing `json:"publishing,omitempty"` + // Quota: Quota configuration. Quota *Quota `json:"quota,omitempty"` diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json index 594e5316fba..386c19c5ccf 100644 --- a/servicenetworking/v1beta/servicenetworking-api.json +++ b/servicenetworking/v1beta/servicenetworking-api.json @@ -307,7 +307,7 @@ } } }, - "revision": "20220904", + "revision": "20221115", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -583,6 +583,11 @@ "description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", "type": "string" }, + "minDeadline": { + "description": "Deprecated, do not use.", + "format": "double", + "type": "number" + }, "operationDeadline": { "description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", "format": "double", @@ -644,6 +649,77 @@ }, "type": "object" }, + "ClientLibrarySettings": { + "description": "Details about how and where to publish client libraries.", + "id": "ClientLibrarySettings", + "properties": { + "cppSettings": { + "$ref": "CppSettings", + "description": "Settings for C++ client libraries." + }, + "dotnetSettings": { + "$ref": "DotnetSettings", + "description": "Settings for .NET client libraries." + }, + "goSettings": { + "$ref": "GoSettings", + "description": "Settings for Go client libraries." + }, + "javaSettings": { + "$ref": "JavaSettings", + "description": "Settings for legacy Java features, supported in the Service YAML." + }, + "launchStage": { + "description": "Launch stage of this version of the API.", + "enum": [ + "LAUNCH_STAGE_UNSPECIFIED", + "UNIMPLEMENTED", + "PRELAUNCH", + "EARLY_ACCESS", + "ALPHA", + "BETA", + "GA", + "DEPRECATED" + ], + "enumDescriptions": [ + "Do not use this default value.", + "The feature is not yet implemented. Users can not use it.", + "Prelaunch features are hidden from users and are only visible internally.", + "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", + "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", + "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", + "GA features are open to all developers and are considered stable and fully qualified for production use.", + "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." + ], + "type": "string" + }, + "nodeSettings": { + "$ref": "NodeSettings", + "description": "Settings for Node client libraries." + }, + "phpSettings": { + "$ref": "PhpSettings", + "description": "Settings for PHP client libraries." + }, + "pythonSettings": { + "$ref": "PythonSettings", + "description": "Settings for Python client libraries." + }, + "restNumericEnums": { + "description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", + "type": "boolean" + }, + "rubySettings": { + "$ref": "RubySettings", + "description": "Settings for Ruby client libraries." + }, + "version": { + "description": "Version of the API to apply these settings to.", + "type": "string" + } + }, + "type": "object" + }, "CloudSQLConfig": { "description": "Cloud SQL configuration.", "id": "CloudSQLConfig", @@ -664,6 +740,34 @@ }, "type": "object" }, + "CommonLanguageSettings": { + "description": "Required information for every language.", + "id": "CommonLanguageSettings", + "properties": { + "destinations": { + "description": "The destination where API teams want this client library to be published.", + "items": { + "enum": [ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + "GITHUB", + "PACKAGE_MANAGER" + ], + "enumDescriptions": [ + "Client libraries will neither be generated nor published to package managers.", + "Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", + "Publish the library to package managers like nuget.org and npmjs.com." + ], + "type": "string" + }, + "type": "array" + }, + "referenceDocsUri": { + "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", + "type": "string" + } + }, + "type": "object" + }, "Connection": { "description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", "id": "Connection", @@ -824,7 +928,7 @@ "type": "object" }, "Control": { - "description": "Selects and configures the service controller used by the service. The service controller handles two things: - **What is allowed:** for each API request, Chemist checks the project status, activation status, abuse status, billing status, service status, location restrictions, VPC Service Controls, SuperQuota, and other policies. - **What has happened:** for each API response, Chemist reports the telemetry data to analytics, auditing, billing, eventing, logging, monitoring, sawmill, and tracing. Chemist also accepts telemetry data not associated with API traffic, such as billing metrics. Example: control: environment: servicecontrol.googleapis.com", + "description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", "id": "Control", "properties": { "environment": { @@ -834,6 +938,17 @@ }, "type": "object" }, + "CppSettings": { + "description": "Settings for C++ client libraries.", + "id": "CppSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "CustomError": { "description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", "id": "CustomError", @@ -995,10 +1110,28 @@ }, "type": "object" }, + "DotnetSettings": { + "description": "Settings for Dotnet client libraries.", + "id": "DotnetSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Endpoint": { "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", "id": "Endpoint", "properties": { + "aliases": { + "description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, "allowCors": { "description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", "type": "boolean" @@ -1184,6 +1317,17 @@ }, "type": "object" }, + "GoSettings": { + "description": "Settings for Go client libraries.", + "id": "GoSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange": { "description": "Allocated IP address ranges for this private service access connection.", "id": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange", @@ -1321,6 +1465,28 @@ }, "type": "object" }, + "JavaSettings": { + "description": "Settings for Java client libraries.", + "id": "JavaSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + }, + "libraryPackage": { + "description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", + "type": "string" + }, + "serviceClassNames": { + "additionalProperties": { + "type": "string" + }, + "description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", + "type": "object" + } + }, + "type": "object" + }, "JwtLocation": { "description": "Specifies a location to extract JWT from an API request.", "id": "JwtLocation", @@ -1452,6 +1618,33 @@ }, "type": "object" }, + "LongRunning": { + "description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", + "id": "LongRunning", + "properties": { + "initialPollDelay": { + "description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", + "format": "google-duration", + "type": "string" + }, + "maxPollDelay": { + "description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", + "format": "google-duration", + "type": "string" + }, + "pollDelayMultiplier": { + "description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", + "format": "float", + "type": "number" + }, + "totalPollTimeout": { + "description": "Total polling timeout. Default value: 5 minutes.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -1498,6 +1691,21 @@ }, "type": "object" }, + "MethodSettings": { + "description": "Describes the generator configuration for a method.", + "id": "MethodSettings", + "properties": { + "longRunning": { + "$ref": "LongRunning", + "description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_behavior: - selector: CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes" + }, + "selector": { + "description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.", + "type": "string" + } + }, + "type": "object" + }, "MetricDescriptor": { "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", "id": "MetricDescriptor", @@ -1773,6 +1981,17 @@ }, "type": "object" }, + "NodeSettings": { + "description": "Settings for Node client libraries.", + "id": "NodeSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "OAuthRequirements": { "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", @@ -1887,6 +2106,17 @@ "properties": {}, "type": "object" }, + "PhpSettings": { + "description": "Settings for Php client libraries.", + "id": "PhpSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "PolicyBinding": { "description": "Grouping of IAM role and IAM member.", "id": "PolicyBinding", @@ -1902,6 +2132,83 @@ }, "type": "object" }, + "Publishing": { + "description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", + "id": "Publishing", + "properties": { + "apiShortName": { + "description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", + "type": "string" + }, + "codeownerGithubTeams": { + "description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", + "items": { + "type": "string" + }, + "type": "array" + }, + "docTagPrefix": { + "description": "A prefix used in sample code when demarking regions to be included in documentation.", + "type": "string" + }, + "documentationUri": { + "description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", + "type": "string" + }, + "githubLabel": { + "description": "GitHub label to apply to issues and pull requests opened for this API.", + "type": "string" + }, + "librarySettings": { + "description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", + "items": { + "$ref": "ClientLibrarySettings" + }, + "type": "array" + }, + "methodSettings": { + "description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", + "items": { + "$ref": "MethodSettings" + }, + "type": "array" + }, + "newIssueUri": { + "description": "Link to a place that API users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", + "type": "string" + }, + "organization": { + "description": "For whom the client library is being published.", + "enum": [ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + "CLOUD", + "ADS", + "PHOTOS", + "STREET_VIEW" + ], + "enumDescriptions": [ + "Not useful.", + "Google Cloud Platform Org.", + "Ads (Advertising) Org.", + "Photos Org.", + "Street View Org." + ], + "type": "string" + } + }, + "type": "object" + }, + "PythonSettings": { + "description": "Settings for Python client libraries.", + "id": "PythonSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Quota": { "description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", "id": "Quota", @@ -2039,6 +2346,17 @@ }, "type": "object" }, + "RubySettings": { + "description": "Settings for Ruby client libraries.", + "id": "RubySettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "SearchRangeRequest": { "description": "Request to search for an unused range within allocated ranges.", "id": "SearchRangeRequest", @@ -2172,6 +2490,10 @@ "description": "The Google project that owns this service.", "type": "string" }, + "publishing": { + "$ref": "Publishing", + "description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." + }, "quota": { "$ref": "Quota", "description": "Quota configuration." diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index 4f476a80d92..35b4163193e 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -682,6 +682,9 @@ type BackendRule struct { // "authorization" header, and sent to the backend. JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Deprecated, do not use. + MinDeadline float64 `json:"minDeadline,omitempty"` + // OperationDeadline: The number of seconds to wait for the completion // of a long running operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` @@ -757,6 +760,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { type NoMethod BackendRule var s1 struct { Deadline gensupport.JSONFloat64 `json:"deadline"` + MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` *NoMethod } @@ -765,6 +769,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return err } s.Deadline = float64(s1.Deadline) + s.MinDeadline = float64(s1.MinDeadline) s.OperationDeadline = float64(s1.OperationDeadline) return nil } @@ -852,6 +857,101 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ClientLibrarySettings: Details about how and where to publish client +// libraries. +type ClientLibrarySettings struct { + // CppSettings: Settings for C++ client libraries. + CppSettings *CppSettings `json:"cppSettings,omitempty"` + + // DotnetSettings: Settings for .NET client libraries. + DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` + + // GoSettings: Settings for Go client libraries. + GoSettings *GoSettings `json:"goSettings,omitempty"` + + // JavaSettings: Settings for legacy Java features, supported in the + // Service YAML. + JavaSettings *JavaSettings `json:"javaSettings,omitempty"` + + // LaunchStage: Launch stage of this version of the API. + // + // Possible values: + // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. + // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not + // use it. + // "PRELAUNCH" - Prelaunch features are hidden from users and are only + // visible internally. + // "EARLY_ACCESS" - Early Access features are limited to a closed + // group of testers. To use these features, you must sign up in advance + // and sign a Trusted Tester agreement (which includes confidentiality + // provisions). These features may be unstable, changed in + // backward-incompatible ways, and are not guaranteed to be released. + // "ALPHA" - Alpha is a limited availability test for releases before + // they are cleared for widespread use. By Alpha, all significant design + // issues are resolved and we are in the process of verifying + // functionality. Alpha customers need to apply for access, agree to + // applicable terms, and have their projects allowlisted. Alpha releases + // don't have to be feature complete, no SLAs are provided, and there + // are no technical support obligations, but they will be far enough + // along that customers can actually use them in test environments or + // for limited-use tests -- just like they would in normal production + // cases. + // "BETA" - Beta is the point at which we are ready to open a release + // for any customer to use. There are no SLA or technical support + // obligations in a Beta release. Products will be complete from a + // feature perspective, but may have some open outstanding issues. Beta + // releases are suitable for limited production use cases. + // "GA" - GA features are open to all developers and are considered + // stable and fully qualified for production use. + // "DEPRECATED" - Deprecated features are scheduled to be shut down + // and removed. For more information, see the "Deprecation Policy" + // section of our [Terms of Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage string `json:"launchStage,omitempty"` + + // NodeSettings: Settings for Node client libraries. + NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` + + // PhpSettings: Settings for PHP client libraries. + PhpSettings *PhpSettings `json:"phpSettings,omitempty"` + + // PythonSettings: Settings for Python client libraries. + PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` + + // RestNumericEnums: When using transport=rest, the client request will + // encode enums as numbers rather than strings. + RestNumericEnums bool `json:"restNumericEnums,omitempty"` + + // RubySettings: Settings for Ruby client libraries. + RubySettings *RubySettings `json:"rubySettings,omitempty"` + + // Version: Version of the API to apply these settings to. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CppSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CppSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientLibrarySettings) MarshalJSON() ([]byte, error) { + type NoMethod ClientLibrarySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CloudSQLConfig: Cloud SQL configuration. type CloudSQLConfig struct { // Service: Peering service used for peering with the Cloud SQL project. @@ -888,6 +988,48 @@ func (s *CloudSQLConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CommonLanguageSettings: Required information for every language. +type CommonLanguageSettings struct { + // Destinations: The destination where API teams want this client + // library to be published. + // + // Possible values: + // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will + // neither be generated nor published to package managers. + // "GITHUB" - Generate the client library in a repo under + // github.com/googleapis, but don't publish it to package managers. + // "PACKAGE_MANAGER" - Publish the library to package managers like + // nuget.org and npmjs.com. + Destinations []string `json:"destinations,omitempty"` + + // ReferenceDocsUri: Link to automatically generated reference + // documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommonLanguageSettings) MarshalJSON() ([]byte, error) { + type NoMethod CommonLanguageSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Connection: Represents a private connection resource. A private // connection is implemented as a VPC Network Peering connection between // a service producer's VPC network and a service consumer's VPC @@ -1122,15 +1264,7 @@ func (s *ContextRule) MarshalJSON() ([]byte, error) { } // Control: Selects and configures the service controller used by the -// service. The service controller handles two things: - **What is -// allowed:** for each API request, Chemist checks the project status, -// activation status, abuse status, billing status, service status, -// location restrictions, VPC Service Controls, SuperQuota, and other -// policies. - **What has happened:** for each API response, Chemist -// reports the telemetry data to analytics, auditing, billing, eventing, -// logging, monitoring, sawmill, and tracing. Chemist also accepts -// telemetry data not associated with API traffic, such as billing -// metrics. Example: control: environment: servicecontrol.googleapis.com +// service. Example: control: environment: servicecontrol.googleapis.com type Control struct { // Environment: The service controller environment to use. If empty, no // control plane feature (like quota and billing) will be enabled. The @@ -1160,6 +1294,34 @@ func (s *Control) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CppSettings: Settings for C++ client libraries. +type CppSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CppSettings) MarshalJSON() ([]byte, error) { + type NoMethod CppSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CustomError: Customize service error responses. For example, list any // service specific protobuf types that can appear in error detail lists // of error responses. Example: custom_error: types: - @@ -1484,6 +1646,34 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DotnetSettings: Settings for Dotnet client libraries. +type DotnetSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DotnetSettings) MarshalJSON() ([]byte, error) { + type NoMethod DotnetSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Endpoint: `Endpoint` describes a network address of a service that // serves a set of APIs. It is commonly known as a service endpoint. A // service may expose any number of service endpoints, and all service @@ -1499,6 +1689,12 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { // whether the subsequent cross-origin request is allowed # to proceed. // allow_cors: true type Endpoint struct { + // Aliases: Unimplemented. Dot not use. DEPRECATED: This field is no + // longer supported. Instead of using aliases, please specify multiple + // google.api.Endpoint for each of the intended aliases. Additional + // names that this endpoint will be hosted on. + Aliases []string `json:"aliases,omitempty"` + // AllowCors: Allowing CORS // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka // cross-domain traffic, would allow the backends served from this @@ -1517,7 +1713,7 @@ type Endpoint struct { // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCors") to + // ForceSendFields is a list of field names (e.g. "Aliases") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1525,7 +1721,7 @@ type Endpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCors") to include in + // NullFields is a list of field names (e.g. "Aliases") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1706,6 +1902,34 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoSettings: Settings for Go client libraries. +type GoSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudServicenetworkingV1ConsumerConfigReservedRange: Allocated // IP address ranges for this private service access connection. type GoogleCloudServicenetworkingV1ConsumerConfigReservedRange struct { @@ -2101,6 +2325,53 @@ func (s *HttpRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JavaSettings: Settings for Java client libraries. +type JavaSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // LibraryPackage: The package name to use in Java. Clobbers the + // java_package option set in the protobuf. This should be used **only** + // by APIs who have already set the language_settings.java.package_name" + // field in gapic.yaml. API teams should use the protobuf java_package + // option where possible. Example of a YAML configuration:: publishing: + // java_settings: library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `json:"libraryPackage,omitempty"` + + // ServiceClassNames: Configure the Java class name to use instead of + // the service's for its corresponding generated GAPIC client. Keys are + // fully-qualified service names as they appear in the protobuf + // (including the full the language_settings.java.interface_names" field + // in gapic.yaml. API teams should otherwise use the service name as it + // appears in the protobuf. Example of a YAML configuration:: + // publishing: java_settings: service_class_names: - + // google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: + // SubscriptionAdmin + ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JavaSettings) MarshalJSON() ([]byte, error) { + type NoMethod JavaSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JwtLocation: Specifies a location to extract JWT from an API request. type JwtLocation struct { // Cookie: Specifies cookie name to extract JWT token. @@ -2351,6 +2622,64 @@ func (s *LoggingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LongRunning: Describes settings to use when generating API methods +// that use the long-running operation pattern. All default values below +// are from those used in the client library generators (e.g. Java +// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type LongRunning struct { + // InitialPollDelay: Initial delay after which the first poll request + // will be made. Default value: 5 seconds. + InitialPollDelay string `json:"initialPollDelay,omitempty"` + + // MaxPollDelay: Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay string `json:"maxPollDelay,omitempty"` + + // PollDelayMultiplier: Multiplier to gradually increase delay between + // subsequent polls until it reaches max_poll_delay. Default value: 1.5. + PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` + + // TotalPollTimeout: Total polling timeout. Default value: 5 minutes. + TotalPollTimeout string `json:"totalPollTimeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InitialPollDelay") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LongRunning) MarshalJSON() ([]byte, error) { + type NoMethod LongRunning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *LongRunning) UnmarshalJSON(data []byte) error { + type NoMethod LongRunning + var s1 struct { + PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) + return nil +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -2401,6 +2730,45 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodSettings: Describes the generator configuration for a method. +type MethodSettings struct { + // LongRunning: Describes settings to use for long-running operations + // when generating API methods for RPCs. Complements RPCs that use the + // annotations in google/longrunning/operations.proto. Example of a YAML + // configuration:: publishing: method_behavior: - selector: + // CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 + // minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 + // minutes total_poll_timeout: seconds: 54000 # 90 minutes + LongRunning *LongRunning `json:"longRunning,omitempty"` + + // Selector: The fully qualified name of the method, for which the + // options below apply. This is used to find the method to apply the + // options. + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LongRunning") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LongRunning") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MethodSettings) MarshalJSON() ([]byte, error) { + type NoMethod MethodSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetricDescriptor: Defines a metric type and its schema. Once a metric // descriptor is created, deleting or altering it stops data collection // and makes the metric type's existing data unusable. @@ -2978,6 +3346,34 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodeSettings: Settings for Node client libraries. +type NodeSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeSettings) MarshalJSON() ([]byte, error) { + type NoMethod NodeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthRequirements: OAuth scopes are a way to define data and // permissions on data. For example, there are scopes defined for // "Read-only access to Google Calendar" and "Access to Cloud Platform". @@ -3219,6 +3615,34 @@ func (s *PeeredDnsDomain) MarshalJSON() ([]byte, error) { type PeeredDnsDomainMetadata struct { } +// PhpSettings: Settings for Php client libraries. +type PhpSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PhpSettings) MarshalJSON() ([]byte, error) { + type NoMethod PhpSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PolicyBinding: Grouping of IAM role and IAM member. type PolicyBinding struct { // Member: Required. Member to bind the role with. See @@ -3257,6 +3681,108 @@ func (s *PolicyBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Publishing: This message configures the settings for publishing +// Google Cloud Client libraries +// (https://cloud.google.com/apis/docs/cloud-client-libraries) generated +// from the service config. +type Publishing struct { + // ApiShortName: Used as a tracking tag when collecting data about the + // APIs developer relations artifacts like docs, packages delivered to + // package managers, etc. Example: "speech". + ApiShortName string `json:"apiShortName,omitempty"` + + // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the + // directory in GitHub containing source code for the client libraries + // for this API. + CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` + + // DocTagPrefix: A prefix used in sample code when demarking regions to + // be included in documentation. + DocTagPrefix string `json:"docTagPrefix,omitempty"` + + // DocumentationUri: Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `json:"documentationUri,omitempty"` + + // GithubLabel: GitHub label to apply to issues and pull requests opened + // for this API. + GithubLabel string `json:"githubLabel,omitempty"` + + // LibrarySettings: Client library settings. If the same version string + // appears multiple times in this list, then the last one wins. Settings + // from earlier settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` + + // MethodSettings: A list of API method settings, e.g. the behavior for + // methods that use the long-running operation pattern. + MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` + + // NewIssueUri: Link to a place that API users can report issues. + // Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `json:"newIssueUri,omitempty"` + + // Organization: For whom the client library is being published. + // + // Possible values: + // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. + // "CLOUD" - Google Cloud Platform Org. + // "ADS" - Ads (Advertising) Org. + // "PHOTOS" - Photos Org. + // "STREET_VIEW" - Street View Org. + Organization string `json:"organization,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiShortName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiShortName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Publishing) MarshalJSON() ([]byte, error) { + type NoMethod Publishing + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PythonSettings: Settings for Python client libraries. +type PythonSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PythonSettings) MarshalJSON() ([]byte, error) { + type NoMethod PythonSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Quota: Quota configuration helps to achieve fairness and budgeting in // service usage. The metric based quota configuration works this way: - // The service configuration defines a set of metrics. - For API calls, @@ -3501,6 +4027,34 @@ func (s *Route) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RubySettings: Settings for Ruby client libraries. +type RubySettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RubySettings) MarshalJSON() ([]byte, error) { + type NoMethod RubySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SearchRangeRequest: Request to search for an unused range within // allocated ranges. type SearchRangeRequest struct { @@ -3668,6 +4222,11 @@ type Service struct { // ProducerProjectId: The Google project that owns this service. ProducerProjectId string `json:"producerProjectId,omitempty"` + // Publishing: Settings for Google Cloud Client libraries + // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated + // from APIs defined as protocol buffers. + Publishing *Publishing `json:"publishing,omitempty"` + // Quota: Quota configuration. Quota *Quota `json:"quota,omitempty"` diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index 82c394812db..bf0dccce09a 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20220907", + "revision": "20221115", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AdminQuotaPolicy": { @@ -647,6 +647,11 @@ "description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", "type": "string" }, + "minDeadline": { + "description": "Deprecated, do not use.", + "format": "double", + "type": "number" + }, "operationDeadline": { "description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", "format": "double", @@ -791,6 +796,105 @@ "properties": {}, "type": "object" }, + "ClientLibrarySettings": { + "description": "Details about how and where to publish client libraries.", + "id": "ClientLibrarySettings", + "properties": { + "cppSettings": { + "$ref": "CppSettings", + "description": "Settings for C++ client libraries." + }, + "dotnetSettings": { + "$ref": "DotnetSettings", + "description": "Settings for .NET client libraries." + }, + "goSettings": { + "$ref": "GoSettings", + "description": "Settings for Go client libraries." + }, + "javaSettings": { + "$ref": "JavaSettings", + "description": "Settings for legacy Java features, supported in the Service YAML." + }, + "launchStage": { + "description": "Launch stage of this version of the API.", + "enum": [ + "LAUNCH_STAGE_UNSPECIFIED", + "UNIMPLEMENTED", + "PRELAUNCH", + "EARLY_ACCESS", + "ALPHA", + "BETA", + "GA", + "DEPRECATED" + ], + "enumDescriptions": [ + "Do not use this default value.", + "The feature is not yet implemented. Users can not use it.", + "Prelaunch features are hidden from users and are only visible internally.", + "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", + "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", + "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", + "GA features are open to all developers and are considered stable and fully qualified for production use.", + "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." + ], + "type": "string" + }, + "nodeSettings": { + "$ref": "NodeSettings", + "description": "Settings for Node client libraries." + }, + "phpSettings": { + "$ref": "PhpSettings", + "description": "Settings for PHP client libraries." + }, + "pythonSettings": { + "$ref": "PythonSettings", + "description": "Settings for Python client libraries." + }, + "restNumericEnums": { + "description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", + "type": "boolean" + }, + "rubySettings": { + "$ref": "RubySettings", + "description": "Settings for Ruby client libraries." + }, + "version": { + "description": "Version of the API to apply these settings to.", + "type": "string" + } + }, + "type": "object" + }, + "CommonLanguageSettings": { + "description": "Required information for every language.", + "id": "CommonLanguageSettings", + "properties": { + "destinations": { + "description": "The destination where API teams want this client library to be published.", + "items": { + "enum": [ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + "GITHUB", + "PACKAGE_MANAGER" + ], + "enumDescriptions": [ + "Client libraries will neither be generated nor published to package managers.", + "Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", + "Publish the library to package managers like nuget.org and npmjs.com." + ], + "type": "string" + }, + "type": "array" + }, + "referenceDocsUri": { + "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", + "type": "string" + } + }, + "type": "object" + }, "Context": { "description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", "id": "Context", @@ -845,7 +949,7 @@ "type": "object" }, "Control": { - "description": "Selects and configures the service controller used by the service. The service controller handles two things: - **What is allowed:** for each API request, Chemist checks the project status, activation status, abuse status, billing status, service status, location restrictions, VPC Service Controls, SuperQuota, and other policies. - **What has happened:** for each API response, Chemist reports the telemetry data to analytics, auditing, billing, eventing, logging, monitoring, sawmill, and tracing. Chemist also accepts telemetry data not associated with API traffic, such as billing metrics. Example: control: environment: servicecontrol.googleapis.com", + "description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", "id": "Control", "properties": { "environment": { @@ -855,6 +959,17 @@ }, "type": "object" }, + "CppSettings": { + "description": "Settings for C++ client libraries.", + "id": "CppSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "CreateAdminQuotaPolicyMetadata": { "description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by CreateAdminQuotaPolicy.", "id": "CreateAdminQuotaPolicyMetadata", @@ -1010,6 +1125,17 @@ }, "type": "object" }, + "DotnetSettings": { + "description": "Settings for Dotnet client libraries.", + "id": "DotnetSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1052,6 +1178,13 @@ "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", "id": "Endpoint", "properties": { + "aliases": { + "description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, "allowCors": { "description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", "type": "boolean" @@ -1266,6 +1399,17 @@ }, "type": "object" }, + "GoSettings": { + "description": "Settings for Go client libraries.", + "id": "GoSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "GoogleApiService": { "description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", "id": "GoogleApiService", @@ -1369,6 +1513,10 @@ "description": "The Google project that owns this service.", "type": "string" }, + "publishing": { + "$ref": "Publishing", + "description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." + }, "quota": { "$ref": "Quota", "description": "Quota configuration." @@ -1675,6 +1823,28 @@ }, "type": "object" }, + "JavaSettings": { + "description": "Settings for Java client libraries.", + "id": "JavaSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + }, + "libraryPackage": { + "description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", + "type": "string" + }, + "serviceClassNames": { + "additionalProperties": { + "type": "string" + }, + "description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", + "type": "object" + } + }, + "type": "object" + }, "JwtLocation": { "description": "Specifies a location to extract JWT from an API request.", "id": "JwtLocation", @@ -1828,6 +1998,33 @@ }, "type": "object" }, + "LongRunning": { + "description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", + "id": "LongRunning", + "properties": { + "initialPollDelay": { + "description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", + "format": "google-duration", + "type": "string" + }, + "maxPollDelay": { + "description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", + "format": "google-duration", + "type": "string" + }, + "pollDelayMultiplier": { + "description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", + "format": "float", + "type": "number" + }, + "totalPollTimeout": { + "description": "Total polling timeout. Default value: 5 minutes.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -1874,6 +2071,21 @@ }, "type": "object" }, + "MethodSettings": { + "description": "Describes the generator configuration for a method.", + "id": "MethodSettings", + "properties": { + "longRunning": { + "$ref": "LongRunning", + "description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_behavior: - selector: CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes" + }, + "selector": { + "description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.", + "type": "string" + } + }, + "type": "object" + }, "MetricDescriptor": { "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", "id": "MetricDescriptor", @@ -2149,6 +2361,17 @@ }, "type": "object" }, + "NodeSettings": { + "description": "Settings for Node client libraries.", + "id": "NodeSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "OAuthRequirements": { "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", @@ -2250,6 +2473,94 @@ }, "type": "object" }, + "PhpSettings": { + "description": "Settings for Php client libraries.", + "id": "PhpSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, + "Publishing": { + "description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", + "id": "Publishing", + "properties": { + "apiShortName": { + "description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", + "type": "string" + }, + "codeownerGithubTeams": { + "description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", + "items": { + "type": "string" + }, + "type": "array" + }, + "docTagPrefix": { + "description": "A prefix used in sample code when demarking regions to be included in documentation.", + "type": "string" + }, + "documentationUri": { + "description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", + "type": "string" + }, + "githubLabel": { + "description": "GitHub label to apply to issues and pull requests opened for this API.", + "type": "string" + }, + "librarySettings": { + "description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", + "items": { + "$ref": "ClientLibrarySettings" + }, + "type": "array" + }, + "methodSettings": { + "description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", + "items": { + "$ref": "MethodSettings" + }, + "type": "array" + }, + "newIssueUri": { + "description": "Link to a place that API users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", + "type": "string" + }, + "organization": { + "description": "For whom the client library is being published.", + "enum": [ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + "CLOUD", + "ADS", + "PHOTOS", + "STREET_VIEW" + ], + "enumDescriptions": [ + "Not useful.", + "Google Cloud Platform Org.", + "Ads (Advertising) Org.", + "Photos Org.", + "Street View Org." + ], + "type": "string" + } + }, + "type": "object" + }, + "PythonSettings": { + "description": "Settings for Python client libraries.", + "id": "PythonSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Quota": { "description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", "id": "Quota", @@ -2360,6 +2671,17 @@ }, "type": "object" }, + "RubySettings": { + "description": "Settings for Ruby client libraries.", + "id": "RubySettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "ServiceIdentity": { "description": "Service identity for a service. This is the identity that service producer should use to access consumer resources.", "id": "ServiceIdentity", diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index 6c516e39f17..9088a1dd7f6 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -582,6 +582,9 @@ type BackendRule struct { // "authorization" header, and sent to the backend. JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Deprecated, do not use. + MinDeadline float64 `json:"minDeadline,omitempty"` + // OperationDeadline: The number of seconds to wait for the completion // of a long running operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` @@ -657,6 +660,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { type NoMethod BackendRule var s1 struct { Deadline gensupport.JSONFloat64 `json:"deadline"` + MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` *NoMethod } @@ -665,6 +669,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return err } s.Deadline = float64(s1.Deadline) + s.MinDeadline = float64(s1.MinDeadline) s.OperationDeadline = float64(s1.OperationDeadline) return nil } @@ -918,6 +923,143 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ClientLibrarySettings: Details about how and where to publish client +// libraries. +type ClientLibrarySettings struct { + // CppSettings: Settings for C++ client libraries. + CppSettings *CppSettings `json:"cppSettings,omitempty"` + + // DotnetSettings: Settings for .NET client libraries. + DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` + + // GoSettings: Settings for Go client libraries. + GoSettings *GoSettings `json:"goSettings,omitempty"` + + // JavaSettings: Settings for legacy Java features, supported in the + // Service YAML. + JavaSettings *JavaSettings `json:"javaSettings,omitempty"` + + // LaunchStage: Launch stage of this version of the API. + // + // Possible values: + // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. + // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not + // use it. + // "PRELAUNCH" - Prelaunch features are hidden from users and are only + // visible internally. + // "EARLY_ACCESS" - Early Access features are limited to a closed + // group of testers. To use these features, you must sign up in advance + // and sign a Trusted Tester agreement (which includes confidentiality + // provisions). These features may be unstable, changed in + // backward-incompatible ways, and are not guaranteed to be released. + // "ALPHA" - Alpha is a limited availability test for releases before + // they are cleared for widespread use. By Alpha, all significant design + // issues are resolved and we are in the process of verifying + // functionality. Alpha customers need to apply for access, agree to + // applicable terms, and have their projects allowlisted. Alpha releases + // don't have to be feature complete, no SLAs are provided, and there + // are no technical support obligations, but they will be far enough + // along that customers can actually use them in test environments or + // for limited-use tests -- just like they would in normal production + // cases. + // "BETA" - Beta is the point at which we are ready to open a release + // for any customer to use. There are no SLA or technical support + // obligations in a Beta release. Products will be complete from a + // feature perspective, but may have some open outstanding issues. Beta + // releases are suitable for limited production use cases. + // "GA" - GA features are open to all developers and are considered + // stable and fully qualified for production use. + // "DEPRECATED" - Deprecated features are scheduled to be shut down + // and removed. For more information, see the "Deprecation Policy" + // section of our [Terms of Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage string `json:"launchStage,omitempty"` + + // NodeSettings: Settings for Node client libraries. + NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` + + // PhpSettings: Settings for PHP client libraries. + PhpSettings *PhpSettings `json:"phpSettings,omitempty"` + + // PythonSettings: Settings for Python client libraries. + PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` + + // RestNumericEnums: When using transport=rest, the client request will + // encode enums as numbers rather than strings. + RestNumericEnums bool `json:"restNumericEnums,omitempty"` + + // RubySettings: Settings for Ruby client libraries. + RubySettings *RubySettings `json:"rubySettings,omitempty"` + + // Version: Version of the API to apply these settings to. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CppSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CppSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientLibrarySettings) MarshalJSON() ([]byte, error) { + type NoMethod ClientLibrarySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CommonLanguageSettings: Required information for every language. +type CommonLanguageSettings struct { + // Destinations: The destination where API teams want this client + // library to be published. + // + // Possible values: + // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will + // neither be generated nor published to package managers. + // "GITHUB" - Generate the client library in a repo under + // github.com/googleapis, but don't publish it to package managers. + // "PACKAGE_MANAGER" - Publish the library to package managers like + // nuget.org and npmjs.com. + Destinations []string `json:"destinations,omitempty"` + + // ReferenceDocsUri: Link to automatically generated reference + // documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommonLanguageSettings) MarshalJSON() ([]byte, error) { + type NoMethod CommonLanguageSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Context: `Context` defines which contexts an API requests. Example: // context: rules: - selector: "*" requested: - // google.rpc.context.ProjectContext - google.rpc.context.OriginContext @@ -1011,15 +1153,7 @@ func (s *ContextRule) MarshalJSON() ([]byte, error) { } // Control: Selects and configures the service controller used by the -// service. The service controller handles two things: - **What is -// allowed:** for each API request, Chemist checks the project status, -// activation status, abuse status, billing status, service status, -// location restrictions, VPC Service Controls, SuperQuota, and other -// policies. - **What has happened:** for each API response, Chemist -// reports the telemetry data to analytics, auditing, billing, eventing, -// logging, monitoring, sawmill, and tracing. Chemist also accepts -// telemetry data not associated with API traffic, such as billing -// metrics. Example: control: environment: servicecontrol.googleapis.com +// service. Example: control: environment: servicecontrol.googleapis.com type Control struct { // Environment: The service controller environment to use. If empty, no // control plane feature (like quota and billing) will be enabled. The @@ -1049,6 +1183,34 @@ func (s *Control) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CppSettings: Settings for C++ client libraries. +type CppSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CppSettings) MarshalJSON() ([]byte, error) { + type NoMethod CppSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateAdminQuotaPolicyMetadata: Metadata message that provides // information such as progress, partial failures, and similar // information on each GetOperation call of LRO returned by @@ -1380,6 +1542,34 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DotnetSettings: Settings for Dotnet client libraries. +type DotnetSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DotnetSettings) MarshalJSON() ([]byte, error) { + type NoMethod DotnetSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1472,6 +1662,12 @@ func (s *EnableServiceResponse) MarshalJSON() ([]byte, error) { // whether the subsequent cross-origin request is allowed # to proceed. // allow_cors: true type Endpoint struct { + // Aliases: Unimplemented. Dot not use. DEPRECATED: This field is no + // longer supported. Instead of using aliases, please specify multiple + // google.api.Endpoint for each of the intended aliases. Additional + // names that this endpoint will be hosted on. + Aliases []string `json:"aliases,omitempty"` + // AllowCors: Allowing CORS // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka // cross-domain traffic, would allow the backends served from this @@ -1490,7 +1686,7 @@ type Endpoint struct { // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCors") to + // ForceSendFields is a list of field names (e.g. "Aliases") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1498,7 +1694,7 @@ type Endpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCors") to include in + // NullFields is a list of field names (e.g. "Aliases") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1724,6 +1920,34 @@ func (s *GetServiceIdentityResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoSettings: Settings for Go client libraries. +type GoSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleApiService: `Service` is the root object of Google API service // configuration (service config). It describes the basic information // about a logical service, such as the service name and the user-facing @@ -1820,6 +2044,11 @@ type GoogleApiService struct { // ProducerProjectId: The Google project that owns this service. ProducerProjectId string `json:"producerProjectId,omitempty"` + // Publishing: Settings for Google Cloud Client libraries + // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated + // from APIs defined as protocol buffers. + Publishing *Publishing `json:"publishing,omitempty"` + // Quota: Quota configuration. Quota *Quota `json:"quota,omitempty"` @@ -2473,6 +2702,53 @@ func (s *ImportConsumerOverridesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JavaSettings: Settings for Java client libraries. +type JavaSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // LibraryPackage: The package name to use in Java. Clobbers the + // java_package option set in the protobuf. This should be used **only** + // by APIs who have already set the language_settings.java.package_name" + // field in gapic.yaml. API teams should use the protobuf java_package + // option where possible. Example of a YAML configuration:: publishing: + // java_settings: library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `json:"libraryPackage,omitempty"` + + // ServiceClassNames: Configure the Java class name to use instead of + // the service's for its corresponding generated GAPIC client. Keys are + // fully-qualified service names as they appear in the protobuf + // (including the full the language_settings.java.interface_names" field + // in gapic.yaml. API teams should otherwise use the service name as it + // appears in the protobuf. Example of a YAML configuration:: + // publishing: java_settings: service_class_names: - + // google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: + // SubscriptionAdmin + ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JavaSettings) MarshalJSON() ([]byte, error) { + type NoMethod JavaSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JwtLocation: Specifies a location to extract JWT from an API request. type JwtLocation struct { // Cookie: Specifies cookie name to extract JWT token. @@ -2763,6 +3039,64 @@ func (s *LoggingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LongRunning: Describes settings to use when generating API methods +// that use the long-running operation pattern. All default values below +// are from those used in the client library generators (e.g. Java +// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type LongRunning struct { + // InitialPollDelay: Initial delay after which the first poll request + // will be made. Default value: 5 seconds. + InitialPollDelay string `json:"initialPollDelay,omitempty"` + + // MaxPollDelay: Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay string `json:"maxPollDelay,omitempty"` + + // PollDelayMultiplier: Multiplier to gradually increase delay between + // subsequent polls until it reaches max_poll_delay. Default value: 1.5. + PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` + + // TotalPollTimeout: Total polling timeout. Default value: 5 minutes. + TotalPollTimeout string `json:"totalPollTimeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InitialPollDelay") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LongRunning) MarshalJSON() ([]byte, error) { + type NoMethod LongRunning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *LongRunning) UnmarshalJSON(data []byte) error { + type NoMethod LongRunning + var s1 struct { + PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) + return nil +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -2813,6 +3147,45 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodSettings: Describes the generator configuration for a method. +type MethodSettings struct { + // LongRunning: Describes settings to use for long-running operations + // when generating API methods for RPCs. Complements RPCs that use the + // annotations in google/longrunning/operations.proto. Example of a YAML + // configuration:: publishing: method_behavior: - selector: + // CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 + // minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 + // minutes total_poll_timeout: seconds: 54000 # 90 minutes + LongRunning *LongRunning `json:"longRunning,omitempty"` + + // Selector: The fully qualified name of the method, for which the + // options below apply. This is used to find the method to apply the + // options. + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LongRunning") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LongRunning") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MethodSettings) MarshalJSON() ([]byte, error) { + type NoMethod MethodSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetricDescriptor: Defines a metric type and its schema. Once a metric // descriptor is created, deleting or altering it stops data collection // and makes the metric type's existing data unusable. @@ -3390,6 +3763,34 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodeSettings: Settings for Node client libraries. +type NodeSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeSettings) MarshalJSON() ([]byte, error) { + type NoMethod NodeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthRequirements: OAuth scopes are a way to define data and // permissions on data. For example, there are scopes defined for // "Read-only access to Google Calendar" and "Access to Cloud Platform". @@ -3613,6 +4014,136 @@ func (s *Page) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PhpSettings: Settings for Php client libraries. +type PhpSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PhpSettings) MarshalJSON() ([]byte, error) { + type NoMethod PhpSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Publishing: This message configures the settings for publishing +// Google Cloud Client libraries +// (https://cloud.google.com/apis/docs/cloud-client-libraries) generated +// from the service config. +type Publishing struct { + // ApiShortName: Used as a tracking tag when collecting data about the + // APIs developer relations artifacts like docs, packages delivered to + // package managers, etc. Example: "speech". + ApiShortName string `json:"apiShortName,omitempty"` + + // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the + // directory in GitHub containing source code for the client libraries + // for this API. + CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` + + // DocTagPrefix: A prefix used in sample code when demarking regions to + // be included in documentation. + DocTagPrefix string `json:"docTagPrefix,omitempty"` + + // DocumentationUri: Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `json:"documentationUri,omitempty"` + + // GithubLabel: GitHub label to apply to issues and pull requests opened + // for this API. + GithubLabel string `json:"githubLabel,omitempty"` + + // LibrarySettings: Client library settings. If the same version string + // appears multiple times in this list, then the last one wins. Settings + // from earlier settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` + + // MethodSettings: A list of API method settings, e.g. the behavior for + // methods that use the long-running operation pattern. + MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` + + // NewIssueUri: Link to a place that API users can report issues. + // Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `json:"newIssueUri,omitempty"` + + // Organization: For whom the client library is being published. + // + // Possible values: + // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. + // "CLOUD" - Google Cloud Platform Org. + // "ADS" - Ads (Advertising) Org. + // "PHOTOS" - Photos Org. + // "STREET_VIEW" - Street View Org. + Organization string `json:"organization,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiShortName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiShortName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Publishing) MarshalJSON() ([]byte, error) { + type NoMethod Publishing + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PythonSettings: Settings for Python client libraries. +type PythonSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PythonSettings) MarshalJSON() ([]byte, error) { + type NoMethod PythonSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Quota: Quota configuration helps to achieve fairness and budgeting in // service usage. The metric based quota configuration works this way: - // The service configuration defines a set of metrics. - For API calls, @@ -3837,6 +4368,34 @@ func (s *QuotaOverride) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RubySettings: Settings for Ruby client libraries. +type RubySettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RubySettings) MarshalJSON() ([]byte, error) { + type NoMethod RubySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ServiceIdentity: Service identity for a service. This is the identity // that service producer should use to access consumer resources. type ServiceIdentity struct { diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index 23a50ceb451..0e8d968d56c 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -959,7 +959,7 @@ } } }, - "revision": "20220907", + "revision": "20221115", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AdminQuotaPolicy": { @@ -1180,6 +1180,11 @@ "description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", "type": "string" }, + "minDeadline": { + "description": "Deprecated, do not use.", + "format": "double", + "type": "number" + }, "operationDeadline": { "description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", "format": "double", @@ -1304,6 +1309,105 @@ }, "type": "object" }, + "ClientLibrarySettings": { + "description": "Details about how and where to publish client libraries.", + "id": "ClientLibrarySettings", + "properties": { + "cppSettings": { + "$ref": "CppSettings", + "description": "Settings for C++ client libraries." + }, + "dotnetSettings": { + "$ref": "DotnetSettings", + "description": "Settings for .NET client libraries." + }, + "goSettings": { + "$ref": "GoSettings", + "description": "Settings for Go client libraries." + }, + "javaSettings": { + "$ref": "JavaSettings", + "description": "Settings for legacy Java features, supported in the Service YAML." + }, + "launchStage": { + "description": "Launch stage of this version of the API.", + "enum": [ + "LAUNCH_STAGE_UNSPECIFIED", + "UNIMPLEMENTED", + "PRELAUNCH", + "EARLY_ACCESS", + "ALPHA", + "BETA", + "GA", + "DEPRECATED" + ], + "enumDescriptions": [ + "Do not use this default value.", + "The feature is not yet implemented. Users can not use it.", + "Prelaunch features are hidden from users and are only visible internally.", + "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", + "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", + "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", + "GA features are open to all developers and are considered stable and fully qualified for production use.", + "Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." + ], + "type": "string" + }, + "nodeSettings": { + "$ref": "NodeSettings", + "description": "Settings for Node client libraries." + }, + "phpSettings": { + "$ref": "PhpSettings", + "description": "Settings for PHP client libraries." + }, + "pythonSettings": { + "$ref": "PythonSettings", + "description": "Settings for Python client libraries." + }, + "restNumericEnums": { + "description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", + "type": "boolean" + }, + "rubySettings": { + "$ref": "RubySettings", + "description": "Settings for Ruby client libraries." + }, + "version": { + "description": "Version of the API to apply these settings to.", + "type": "string" + } + }, + "type": "object" + }, + "CommonLanguageSettings": { + "description": "Required information for every language.", + "id": "CommonLanguageSettings", + "properties": { + "destinations": { + "description": "The destination where API teams want this client library to be published.", + "items": { + "enum": [ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + "GITHUB", + "PACKAGE_MANAGER" + ], + "enumDescriptions": [ + "Client libraries will neither be generated nor published to package managers.", + "Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", + "Publish the library to package managers like nuget.org and npmjs.com." + ], + "type": "string" + }, + "type": "array" + }, + "referenceDocsUri": { + "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", + "type": "string" + } + }, + "type": "object" + }, "ConsumerQuotaLimit": { "description": "Consumer quota settings for a quota limit.", "id": "ConsumerQuotaLimit", @@ -1436,7 +1540,7 @@ "type": "object" }, "Control": { - "description": "Selects and configures the service controller used by the service. The service controller handles two things: - **What is allowed:** for each API request, Chemist checks the project status, activation status, abuse status, billing status, service status, location restrictions, VPC Service Controls, SuperQuota, and other policies. - **What has happened:** for each API response, Chemist reports the telemetry data to analytics, auditing, billing, eventing, logging, monitoring, sawmill, and tracing. Chemist also accepts telemetry data not associated with API traffic, such as billing metrics. Example: control: environment: servicecontrol.googleapis.com", + "description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", "id": "Control", "properties": { "environment": { @@ -1446,6 +1550,17 @@ }, "type": "object" }, + "CppSettings": { + "description": "Settings for C++ client libraries.", + "id": "CppSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "CreateAdminQuotaPolicyMetadata": { "description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by CreateAdminQuotaPolicy.", "id": "CreateAdminQuotaPolicyMetadata", @@ -1582,6 +1697,17 @@ }, "type": "object" }, + "DotnetSettings": { + "description": "Settings for Dotnet client libraries.", + "id": "DotnetSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1624,6 +1750,13 @@ "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", "id": "Endpoint", "properties": { + "aliases": { + "description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, "allowCors": { "description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", "type": "boolean" @@ -1838,6 +1971,17 @@ }, "type": "object" }, + "GoSettings": { + "description": "Settings for Go client libraries.", + "id": "GoSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "GoogleApiService": { "description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", "id": "GoogleApiService", @@ -1941,6 +2085,10 @@ "description": "The Google project that owns this service.", "type": "string" }, + "publishing": { + "$ref": "Publishing", + "description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." + }, "quota": { "$ref": "Quota", "description": "Quota configuration." @@ -2311,6 +2459,28 @@ }, "type": "object" }, + "JavaSettings": { + "description": "Settings for Java client libraries.", + "id": "JavaSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + }, + "libraryPackage": { + "description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", + "type": "string" + }, + "serviceClassNames": { + "additionalProperties": { + "type": "string" + }, + "description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", + "type": "object" + } + }, + "type": "object" + }, "JwtLocation": { "description": "Specifies a location to extract JWT from an API request.", "id": "JwtLocation", @@ -2518,6 +2688,33 @@ }, "type": "object" }, + "LongRunning": { + "description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", + "id": "LongRunning", + "properties": { + "initialPollDelay": { + "description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", + "format": "google-duration", + "type": "string" + }, + "maxPollDelay": { + "description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", + "format": "google-duration", + "type": "string" + }, + "pollDelayMultiplier": { + "description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", + "format": "float", + "type": "number" + }, + "totalPollTimeout": { + "description": "Total polling timeout. Default value: 5 minutes.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -2564,6 +2761,21 @@ }, "type": "object" }, + "MethodSettings": { + "description": "Describes the generator configuration for a method.", + "id": "MethodSettings", + "properties": { + "longRunning": { + "$ref": "LongRunning", + "description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_behavior: - selector: CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes" + }, + "selector": { + "description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.", + "type": "string" + } + }, + "type": "object" + }, "MetricDescriptor": { "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", "id": "MetricDescriptor", @@ -2839,6 +3051,17 @@ }, "type": "object" }, + "NodeSettings": { + "description": "Settings for Node client libraries.", + "id": "NodeSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "OAuthRequirements": { "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", @@ -2954,6 +3177,94 @@ }, "type": "object" }, + "PhpSettings": { + "description": "Settings for Php client libraries.", + "id": "PhpSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, + "Publishing": { + "description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", + "id": "Publishing", + "properties": { + "apiShortName": { + "description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", + "type": "string" + }, + "codeownerGithubTeams": { + "description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", + "items": { + "type": "string" + }, + "type": "array" + }, + "docTagPrefix": { + "description": "A prefix used in sample code when demarking regions to be included in documentation.", + "type": "string" + }, + "documentationUri": { + "description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", + "type": "string" + }, + "githubLabel": { + "description": "GitHub label to apply to issues and pull requests opened for this API.", + "type": "string" + }, + "librarySettings": { + "description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", + "items": { + "$ref": "ClientLibrarySettings" + }, + "type": "array" + }, + "methodSettings": { + "description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", + "items": { + "$ref": "MethodSettings" + }, + "type": "array" + }, + "newIssueUri": { + "description": "Link to a place that API users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", + "type": "string" + }, + "organization": { + "description": "For whom the client library is being published.", + "enum": [ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + "CLOUD", + "ADS", + "PHOTOS", + "STREET_VIEW" + ], + "enumDescriptions": [ + "Not useful.", + "Google Cloud Platform Org.", + "Ads (Advertising) Org.", + "Photos Org.", + "Street View Org." + ], + "type": "string" + } + }, + "type": "object" + }, + "PythonSettings": { + "description": "Settings for Python client libraries.", + "id": "PythonSettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Quota": { "description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", "id": "Quota", @@ -3100,6 +3411,17 @@ }, "type": "object" }, + "RubySettings": { + "description": "Settings for Ruby client libraries.", + "id": "RubySettings", + "properties": { + "common": { + "$ref": "CommonLanguageSettings", + "description": "Some settings." + } + }, + "type": "object" + }, "Service": { "description": "A service that is available for use by the consumer.", "id": "Service", diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index b8f3d2a95f8..bd8a376fe0d 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -630,6 +630,9 @@ type BackendRule struct { // "authorization" header, and sent to the backend. JwtAudience string `json:"jwtAudience,omitempty"` + // MinDeadline: Deprecated, do not use. + MinDeadline float64 `json:"minDeadline,omitempty"` + // OperationDeadline: The number of seconds to wait for the completion // of a long running operation. The default is no deadline. OperationDeadline float64 `json:"operationDeadline,omitempty"` @@ -705,6 +708,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { type NoMethod BackendRule var s1 struct { Deadline gensupport.JSONFloat64 `json:"deadline"` + MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` *NoMethod } @@ -713,6 +717,7 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return err } s.Deadline = float64(s1.Deadline) + s.MinDeadline = float64(s1.MinDeadline) s.OperationDeadline = float64(s1.OperationDeadline) return nil } @@ -930,6 +935,143 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ClientLibrarySettings: Details about how and where to publish client +// libraries. +type ClientLibrarySettings struct { + // CppSettings: Settings for C++ client libraries. + CppSettings *CppSettings `json:"cppSettings,omitempty"` + + // DotnetSettings: Settings for .NET client libraries. + DotnetSettings *DotnetSettings `json:"dotnetSettings,omitempty"` + + // GoSettings: Settings for Go client libraries. + GoSettings *GoSettings `json:"goSettings,omitempty"` + + // JavaSettings: Settings for legacy Java features, supported in the + // Service YAML. + JavaSettings *JavaSettings `json:"javaSettings,omitempty"` + + // LaunchStage: Launch stage of this version of the API. + // + // Possible values: + // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. + // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not + // use it. + // "PRELAUNCH" - Prelaunch features are hidden from users and are only + // visible internally. + // "EARLY_ACCESS" - Early Access features are limited to a closed + // group of testers. To use these features, you must sign up in advance + // and sign a Trusted Tester agreement (which includes confidentiality + // provisions). These features may be unstable, changed in + // backward-incompatible ways, and are not guaranteed to be released. + // "ALPHA" - Alpha is a limited availability test for releases before + // they are cleared for widespread use. By Alpha, all significant design + // issues are resolved and we are in the process of verifying + // functionality. Alpha customers need to apply for access, agree to + // applicable terms, and have their projects allowlisted. Alpha releases + // don't have to be feature complete, no SLAs are provided, and there + // are no technical support obligations, but they will be far enough + // along that customers can actually use them in test environments or + // for limited-use tests -- just like they would in normal production + // cases. + // "BETA" - Beta is the point at which we are ready to open a release + // for any customer to use. There are no SLA or technical support + // obligations in a Beta release. Products will be complete from a + // feature perspective, but may have some open outstanding issues. Beta + // releases are suitable for limited production use cases. + // "GA" - GA features are open to all developers and are considered + // stable and fully qualified for production use. + // "DEPRECATED" - Deprecated features are scheduled to be shut down + // and removed. For more information, see the "Deprecation Policy" + // section of our [Terms of Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage string `json:"launchStage,omitempty"` + + // NodeSettings: Settings for Node client libraries. + NodeSettings *NodeSettings `json:"nodeSettings,omitempty"` + + // PhpSettings: Settings for PHP client libraries. + PhpSettings *PhpSettings `json:"phpSettings,omitempty"` + + // PythonSettings: Settings for Python client libraries. + PythonSettings *PythonSettings `json:"pythonSettings,omitempty"` + + // RestNumericEnums: When using transport=rest, the client request will + // encode enums as numbers rather than strings. + RestNumericEnums bool `json:"restNumericEnums,omitempty"` + + // RubySettings: Settings for Ruby client libraries. + RubySettings *RubySettings `json:"rubySettings,omitempty"` + + // Version: Version of the API to apply these settings to. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CppSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CppSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientLibrarySettings) MarshalJSON() ([]byte, error) { + type NoMethod ClientLibrarySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CommonLanguageSettings: Required information for every language. +type CommonLanguageSettings struct { + // Destinations: The destination where API teams want this client + // library to be published. + // + // Possible values: + // "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" - Client libraries will + // neither be generated nor published to package managers. + // "GITHUB" - Generate the client library in a repo under + // github.com/googleapis, but don't publish it to package managers. + // "PACKAGE_MANAGER" - Publish the library to package managers like + // nuget.org and npmjs.com. + Destinations []string `json:"destinations,omitempty"` + + // ReferenceDocsUri: Link to automatically generated reference + // documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommonLanguageSettings) MarshalJSON() ([]byte, error) { + type NoMethod CommonLanguageSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ConsumerQuotaLimit: Consumer quota settings for a quota limit. type ConsumerQuotaLimit struct { // AllowsAdminOverrides: Whether admin overrides are allowed on this @@ -1149,15 +1291,7 @@ func (s *ContextRule) MarshalJSON() ([]byte, error) { } // Control: Selects and configures the service controller used by the -// service. The service controller handles two things: - **What is -// allowed:** for each API request, Chemist checks the project status, -// activation status, abuse status, billing status, service status, -// location restrictions, VPC Service Controls, SuperQuota, and other -// policies. - **What has happened:** for each API response, Chemist -// reports the telemetry data to analytics, auditing, billing, eventing, -// logging, monitoring, sawmill, and tracing. Chemist also accepts -// telemetry data not associated with API traffic, such as billing -// metrics. Example: control: environment: servicecontrol.googleapis.com +// service. Example: control: environment: servicecontrol.googleapis.com type Control struct { // Environment: The service controller environment to use. If empty, no // control plane feature (like quota and billing) will be enabled. The @@ -1187,6 +1321,34 @@ func (s *Control) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CppSettings: Settings for C++ client libraries. +type CppSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CppSettings) MarshalJSON() ([]byte, error) { + type NoMethod CppSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateAdminQuotaPolicyMetadata: Metadata message that provides // information such as progress, partial failures, and similar // information on each GetOperation call of LRO returned by @@ -1475,6 +1637,34 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DotnetSettings: Settings for Dotnet client libraries. +type DotnetSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DotnetSettings) MarshalJSON() ([]byte, error) { + type NoMethod DotnetSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1564,6 +1754,12 @@ func (s *EnableServiceResponse) MarshalJSON() ([]byte, error) { // whether the subsequent cross-origin request is allowed # to proceed. // allow_cors: true type Endpoint struct { + // Aliases: Unimplemented. Dot not use. DEPRECATED: This field is no + // longer supported. Instead of using aliases, please specify multiple + // google.api.Endpoint for each of the intended aliases. Additional + // names that this endpoint will be hosted on. + Aliases []string `json:"aliases,omitempty"` + // AllowCors: Allowing CORS // (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka // cross-domain traffic, would allow the backends served from this @@ -1582,7 +1778,7 @@ type Endpoint struct { // "8.8.8.8" or "myservice.appspot.com". Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCors") to + // ForceSendFields is a list of field names (e.g. "Aliases") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1590,7 +1786,7 @@ type Endpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCors") to include in + // NullFields is a list of field names (e.g. "Aliases") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1816,6 +2012,34 @@ func (s *GetServiceIdentityResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoSettings: Settings for Go client libraries. +type GoSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleApiService: `Service` is the root object of Google API service // configuration (service config). It describes the basic information // about a logical service, such as the service name and the user-facing @@ -1912,6 +2136,11 @@ type GoogleApiService struct { // ProducerProjectId: The Google project that owns this service. ProducerProjectId string `json:"producerProjectId,omitempty"` + // Publishing: Settings for Google Cloud Client libraries + // (https://cloud.google.com/apis/docs/cloud-client-libraries) generated + // from APIs defined as protocol buffers. + Publishing *Publishing `json:"publishing,omitempty"` + // Quota: Quota configuration. Quota *Quota `json:"quota,omitempty"` @@ -2662,6 +2891,53 @@ func (s *ImportConsumerOverridesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JavaSettings: Settings for Java client libraries. +type JavaSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // LibraryPackage: The package name to use in Java. Clobbers the + // java_package option set in the protobuf. This should be used **only** + // by APIs who have already set the language_settings.java.package_name" + // field in gapic.yaml. API teams should use the protobuf java_package + // option where possible. Example of a YAML configuration:: publishing: + // java_settings: library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `json:"libraryPackage,omitempty"` + + // ServiceClassNames: Configure the Java class name to use instead of + // the service's for its corresponding generated GAPIC client. Keys are + // fully-qualified service names as they appear in the protobuf + // (including the full the language_settings.java.interface_names" field + // in gapic.yaml. API teams should otherwise use the service name as it + // appears in the protobuf. Example of a YAML configuration:: + // publishing: java_settings: service_class_names: - + // google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: + // SubscriptionAdmin + ServiceClassNames map[string]string `json:"serviceClassNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JavaSettings) MarshalJSON() ([]byte, error) { + type NoMethod JavaSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JwtLocation: Specifies a location to extract JWT from an API request. type JwtLocation struct { // Cookie: Specifies cookie name to extract JWT token. @@ -3062,6 +3338,64 @@ func (s *LoggingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LongRunning: Describes settings to use when generating API methods +// that use the long-running operation pattern. All default values below +// are from those used in the client library generators (e.g. Java +// (https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type LongRunning struct { + // InitialPollDelay: Initial delay after which the first poll request + // will be made. Default value: 5 seconds. + InitialPollDelay string `json:"initialPollDelay,omitempty"` + + // MaxPollDelay: Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay string `json:"maxPollDelay,omitempty"` + + // PollDelayMultiplier: Multiplier to gradually increase delay between + // subsequent polls until it reaches max_poll_delay. Default value: 1.5. + PollDelayMultiplier float64 `json:"pollDelayMultiplier,omitempty"` + + // TotalPollTimeout: Total polling timeout. Default value: 5 minutes. + TotalPollTimeout string `json:"totalPollTimeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InitialPollDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InitialPollDelay") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LongRunning) MarshalJSON() ([]byte, error) { + type NoMethod LongRunning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *LongRunning) UnmarshalJSON(data []byte) error { + type NoMethod LongRunning + var s1 struct { + PollDelayMultiplier gensupport.JSONFloat64 `json:"pollDelayMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PollDelayMultiplier = float64(s1.PollDelayMultiplier) + return nil +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -3112,6 +3446,45 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodSettings: Describes the generator configuration for a method. +type MethodSettings struct { + // LongRunning: Describes settings to use for long-running operations + // when generating API methods for RPCs. Complements RPCs that use the + // annotations in google/longrunning/operations.proto. Example of a YAML + // configuration:: publishing: method_behavior: - selector: + // CreateAdDomain long_running: initial_poll_delay: seconds: 60 # 1 + // minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 + // minutes total_poll_timeout: seconds: 54000 # 90 minutes + LongRunning *LongRunning `json:"longRunning,omitempty"` + + // Selector: The fully qualified name of the method, for which the + // options below apply. This is used to find the method to apply the + // options. + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LongRunning") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LongRunning") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MethodSettings) MarshalJSON() ([]byte, error) { + type NoMethod MethodSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetricDescriptor: Defines a metric type and its schema. Once a metric // descriptor is created, deleting or altering it stops data collection // and makes the metric type's existing data unusable. @@ -3689,6 +4062,34 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodeSettings: Settings for Node client libraries. +type NodeSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeSettings) MarshalJSON() ([]byte, error) { + type NoMethod NodeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthRequirements: OAuth scopes are a way to define data and // permissions on data. For example, there are scopes defined for // "Read-only access to Google Calendar" and "Access to Cloud Platform". @@ -3943,6 +4344,136 @@ func (s *Page) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PhpSettings: Settings for Php client libraries. +type PhpSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PhpSettings) MarshalJSON() ([]byte, error) { + type NoMethod PhpSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Publishing: This message configures the settings for publishing +// Google Cloud Client libraries +// (https://cloud.google.com/apis/docs/cloud-client-libraries) generated +// from the service config. +type Publishing struct { + // ApiShortName: Used as a tracking tag when collecting data about the + // APIs developer relations artifacts like docs, packages delivered to + // package managers, etc. Example: "speech". + ApiShortName string `json:"apiShortName,omitempty"` + + // CodeownerGithubTeams: GitHub teams to be added to CODEOWNERS in the + // directory in GitHub containing source code for the client libraries + // for this API. + CodeownerGithubTeams []string `json:"codeownerGithubTeams,omitempty"` + + // DocTagPrefix: A prefix used in sample code when demarking regions to + // be included in documentation. + DocTagPrefix string `json:"docTagPrefix,omitempty"` + + // DocumentationUri: Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `json:"documentationUri,omitempty"` + + // GithubLabel: GitHub label to apply to issues and pull requests opened + // for this API. + GithubLabel string `json:"githubLabel,omitempty"` + + // LibrarySettings: Client library settings. If the same version string + // appears multiple times in this list, then the last one wins. Settings + // from earlier settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `json:"librarySettings,omitempty"` + + // MethodSettings: A list of API method settings, e.g. the behavior for + // methods that use the long-running operation pattern. + MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` + + // NewIssueUri: Link to a place that API users can report issues. + // Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `json:"newIssueUri,omitempty"` + + // Organization: For whom the client library is being published. + // + // Possible values: + // "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" - Not useful. + // "CLOUD" - Google Cloud Platform Org. + // "ADS" - Ads (Advertising) Org. + // "PHOTOS" - Photos Org. + // "STREET_VIEW" - Street View Org. + Organization string `json:"organization,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiShortName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiShortName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Publishing) MarshalJSON() ([]byte, error) { + type NoMethod Publishing + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PythonSettings: Settings for Python client libraries. +type PythonSettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PythonSettings) MarshalJSON() ([]byte, error) { + type NoMethod PythonSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Quota: Quota configuration helps to achieve fairness and budgeting in // service usage. The metric based quota configuration works this way: - // The service configuration defines a set of metrics. - For API calls, @@ -4220,6 +4751,34 @@ func (s *QuotaOverride) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RubySettings: Settings for Ruby client libraries. +type RubySettings struct { + // Common: Some settings. + Common *CommonLanguageSettings `json:"common,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Common") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Common") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RubySettings) MarshalJSON() ([]byte, error) { + type NoMethod RubySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Service: A service that is available for use by the consumer. type Service struct { // Config: The service configuration of the available service. Some